Skip to content

test(vscode): keep E2E fixture installs under the release-age gate - #56

Merged
fi3ework merged 1 commit into
mainfrom
fix/e2e-fixture-release-age
Sep 14, 2026
Merged

test(vscode): keep E2E fixture installs under the release-age gate#56
fi3ework merged 1 commit into
mainfrom
fix/e2e-fixture-release-age

Conversation

@fi3ework

Copy link
Copy Markdown
Member

Summary

The dependency-recovery E2E tests failed on every main push 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.mjs resolved fixture lockfiles with --config.minimumReleaseAge=0, so a lockfile could contain packages younger than pnpm 11's default minimumReleaseAge (1440 min). The recovery tests then copy the fixture to the OS tmpdir and run pnpm install --frozen-lockfile --ignore-scripts under the default policy. pnpm 11 re-verifies every lockfile entry against minimumReleaseAge even when frozen and rejects the young entry (ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION). The root pnpm-workspace.yaml exclusions do not apply in the tmpdir copy. CI only showed Command failed: pnpm install ... because pnpm 11 prints its errors to stdout and execFile's error message carries only stderr.

CI run Time (UTC) Release inside the 24h window Result
PR #51 09-08 07:55 none pass
main 72b3184 09-08 09:10 @rspack/core@2.2.3 (09-08 08:48) fail
PR #53 09-13 04:19 none pass
main ca374a3 09-14 02:16 @tybys/wasm-util@0.10.4 (09-13 08:00) fail

Fix:

  • Every E2E fixture carries a committed, settings-only pnpm-workspace.yaml that makes the fixture its own workspace root and exempts the Rstack family via minimumReleaseAgeExclude. 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.mjs drops --ignore-workspace (pnpm 11 ignores the file's settings under it; verified) and --config.minimumReleaseAge=0.
  • Root pnpm-workspace.yaml adds @rspack/*; the fixture files repeat the root list verbatim.
  • Both recovery tests install through a shared e2e/pnpmInstall.ts helper 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-lockfile in 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 full pnpm test:e2e vscode lint all pass.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T05:03:20.441507Z 6be6324 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@fi3ework
fi3ework merged commit 02f4be1 into main Sep 14, 2026
3 checks passed
@fi3ework
fi3ework deleted the fix/e2e-fixture-release-age branch September 14, 2026 05:15
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