Skip to content

test: port pnpm preferOffline.ts (1/1)#454

Merged
jdx merged 1 commit intomainfrom
claude/intelligent-tu-220870
May 1, 2026
Merged

test: port pnpm preferOffline.ts (1/1)#454
jdx merged 1 commit intomainfrom
claude/intelligent-tu-220870

Conversation

@jdx
Copy link
Copy Markdown
Contributor

@jdx jdx commented May 1, 2026

Summary

  • Ports the single test in pnpm/test/install/preferOffline.ts to test/pnpm_install_preferOffline.bats--prefer-offline reuses cached packument metadata even when the registry has published a newer dist-tag since the cache was populated.
  • Marks the entry in test/PNPM_TEST_IMPORT.md as done. The TODO had said "3 dist-tag uses"; the file actually holds 1 test with 2 addDistTag calls — updated.

Translation notes

  • pnpm's overloaded pnpm install <pkg> becomes a manifest-declared "@pnpm.e2e/foo": "latest" + bare aube install, so the second install's resolution is sourced from the cached packument's dist-tags.latest. Same regression guard pnpm tests.
  • File is # bats file_tags=serial + BATS_NO_PARALLELIZE_WITHIN_FILE=1 because it mutates dist-tags on the committed Verdaccio storage; teardown restores via git checkout — same pattern as test/pnpm_update.bats and test/deprecate.bats.
  • Fixture (@pnpm.e2e/foo 100.0.0 + 100.1.0) was already mirrored from earlier Tier 1 work, no new fixtures needed.

Test plan

  • cargo build (debug) succeeds
  • AUBE_TEST_REGISTRY=http://localhost:4873 ./test/bats/bin/bats test/pnpm_install_preferOffline.bats1..1 / ok 1
  • No fixture leak after run (git status clean post-test)

🤖 Generated with Claude Code


Note

Low Risk
Low risk: adds a new serial Bats test and updates test-tracking docs, with no production code or behavior changes.

Overview
Adds a new Bats port of pnpm’s install/preferOffline test to verify aube install --prefer-offline uses cached packument metadata even if the registry’s latest dist-tag changes between installs (using add_dist_tag, and restoring Verdaccio fixture state in teardown).

Updates test/PNPM_TEST_IMPORT.md to mark the preferOffline.ts port as complete and corrects the noted test/dist-tag counts.

Reviewed by Cursor Bugbot for commit dce0e65. Bugbot is set up for automated code reviews on this repo. Configure here.

Translates the single test in `pnpm/test/install/preferOffline.ts` —
`--prefer-offline` reuses cached packument metadata even when the
registry has published a newer dist-tag since the cache was populated.

Substitution note: pnpm's overloaded `pnpm install <pkg>` becomes a
manifest-declared `"@pnpm.e2e/foo": "latest"` + bare `aube install`,
so the second install's resolution is sourced from the cached
packument's `dist-tags.latest` — same regression guard.

The TODO previously called this out as "3 dist-tag uses"; in fact
the file holds 1 test with 2 `addDistTag` calls. Updated the entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 1, 2026

Greptile Summary

Ports the single preferOffline.ts test to BATS, verifying that aube install --prefer-offline resolves from the cached packument rather than the registry's updated dist-tag. The implementation correctly follows the established serial/teardown pattern from pnpm_update.bats and deprecate.bats, and the @pnpm.e2e/foo fixture is already present in Verdaccio storage.

Confidence Score: 5/5

Safe to merge — clean test port with no production code changes and correct teardown hygiene.

Both changed files are test/documentation only. The new BATS file faithfully matches the serial+teardown pattern used by existing tests, the fixture file exists, and the tracking doc correction is accurate.

No files require special attention.

Important Files Changed

Filename Overview
test/pnpm_install_preferOffline.bats New BATS test porting pnpm's prefer-offline packument-cache test; follows established serial/teardown pattern from pnpm_update.bats and deprecate.bats; fixture already present in storage.
test/PNPM_TEST_IMPORT.md Marks preferOffline.ts as done and corrects the count (1 test, 2 dist-tag uses vs. the previous incorrect "3 dist-tag uses").

Reviews (1): Last reviewed commit: "test: port pnpm preferOffline.ts (1/1)" | Re-trigger Greptile

@jdx jdx merged commit 6769405 into main May 1, 2026
20 checks passed
@jdx jdx deleted the claude/intelligent-tu-220870 branch May 1, 2026 15:36
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Benchmark changes

Public ratios: warm installs vs Bun 5x -> 9x; warm installs vs pnpm 6x -> 13x.

Benchmark aube bun pnpm
Fresh install (warm cache) 288ms -> 209ms (-27%) 1504ms -> 1950ms (+30%) 1849ms -> 2794ms (+51%)
CI install (warm cache, GVS disabled) 416ms -> 742ms (+78%) 966ms -> 2308ms (+139%) 2237ms -> 2490ms (+11%)
CI install (cold cache, GVS disabled) 5053ms -> 3843ms (-24%) 3918ms -> 4224ms (+8%) 5491ms -> 4827ms (-12%)

dce0e65 vs 0a3a22e | aube/bun/pnpm | 3 scenarios | 3 runs | 500mbit/50ms | generated by Codex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant