test(vscode): keep E2E fixture installs under the release-age gate - #56
Merged
Conversation
The dependency-recovery E2E tests failed on main whenever a transitive third-party dependency of a fixture was younger than pnpm's minimumReleaseAge: setupFixtures.mjs resolved the lockfile with minimumReleaseAge=0, and the tests' frozen re-install in a tmpdir copy ran under pnpm 11's default policy, which re-verifies lockfile entries. - Every E2E fixture now has a committed, settings-only pnpm-workspace.yaml that makes it its own workspace root and exempts the Rstack family via minimumReleaseAgeExclude. The file takes effect at install time like the root one, and travels with the tmpdir copy, so both installs share one policy. Nothing is generated at setup. - setupFixtures.mjs drops --ignore-workspace (pnpm ignores the file's settings under it) and --config.minimumReleaseAge=0. - Add @rspack/* to the root exclude list; the fixture files repeat the root list verbatim. - Both recovery tests install through a shared e2e/pnpmInstall.ts helper that includes pnpm's stdout and stderr in the error when the install fails; pnpm 11 prints its errors to stdout.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The dependency-recovery E2E tests failed on every
mainpush since #51 (macOS and Windows) while the same code passed on PR runs. The failure is time-dependent, not random: it hits whenever a transitive third-party dependency of a fixture was published within the last 24h at run time.Cause:
setupFixtures.mjsresolved fixture lockfiles with--config.minimumReleaseAge=0, so a lockfile could contain packages younger than pnpm 11's defaultminimumReleaseAge(1440 min). The recovery tests then copy the fixture to the OS tmpdir and runpnpm install --frozen-lockfile --ignore-scriptsunder the default policy. pnpm 11 re-verifies every lockfile entry againstminimumReleaseAgeeven when frozen and rejects the young entry (ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION). The rootpnpm-workspace.yamlexclusions do not apply in the tmpdir copy. CI only showedCommand failed: pnpm install ...because pnpm 11 prints its errors to stdout andexecFile's error message carries only stderr.@rspack/core@2.2.3(09-08 08:48)@tybys/wasm-util@0.10.4(09-13 08:00)Fix:
pnpm-workspace.yamlthat makes the fixture its own workspace root and exempts the Rstack family viaminimumReleaseAgeExclude. Third-party packages stay gated. The file takes effect at install time like the root one and travels with the tmpdir copy, so the resolution and the frozen re-install share one policy. Nothing is generated at setup.setupFixtures.mjsdrops--ignore-workspace(pnpm 11 ignores the file's settings under it; verified) and--config.minimumReleaseAge=0.pnpm-workspace.yamladds@rspack/*; the fixture files repeat the root list verbatim.e2e/pnpmInstall.tshelper that appends pnpm's stdout and stderr to the error, so the next failure explains itself in CI.Rejected alternatives, all verified against pnpm 11.20.0: generating the fixture file at setup time (owner prefers static config); reading the root list at runtime via
pnpm config get; a per-fixture.npmrc(pnpm 11 only reads auth, registry and proxy keys from it); dropping--frozen-lockfilein the tests (the check still runs, and the tests must prove recovery without a lockfile change).Verified locally: reproduced the failure with a fresh-metadata resolution, then confirmed the same frozen re-install passes with the fixture file present.
pnpm lint,pnpm test:unit,pnpm test:e2e rstest, the lint dependency-recovery suite, and a fullpnpm test:e2e vscode lintall pass.Related Links
Checklist