Repository navigation
fix(ci): reuse warmed release caches across Node version aliases - #167344
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 8, 2026, 1:18 PM ET / 17:18 UTC. ClawSweeper reviewWhat this changesThe branch keys full-build caches by the installed Node version so aliases and exact pins can discover compatible warmed generations. Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR addresses a cache-discovery defect still present on current main. The narrow change preserves existing validation and publication boundaries; no actionable patch defect was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherRelease and CI builds restore previously compiled declaration artifacts from GitHub Actions caches. Node setup selects the archive namespace, while the build owner validates source, compiler, runtime, and output identity before reuse. flowchart TD
A[Requested Node version] --> B[Install Node and record version]
B --> C[Resolved runtime cache namespace]
D[Protected cache warmer] --> C
C --> E[Restore declaration archive]
E --> F[Validate inputs and output bytes]
F --> G[Reuse declarations or compile fresh]
Technical reviewBest possible solution: Keep cache discovery in shared Node setup and retain per-group validation as the authority for artifact reuse. Do we have a high-confidence way to reproduce the issue? Yes, source establishes that 24.x and 24.21.0 produce different cache namespaces even when both install 24.21.0; the contributor also reports a failing baseline regression. Is this the best way to solve the issue? Yes, using the existing installed-version output repairs discovery at the shared owner without duplicating cache policy or weakening artifact validation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3be885108e5e. Provenance checked
TestingProof path: unit tests only. Added test files: 1. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +20, Config +1. Total +21 across 2 files. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment |
|
Merged via squash.
|
What Problem This Solves
Fixes release package builds missing the protected full-build cache when their pinned Node request differs from the warmer’s version alias.
User Impact
No user-visible runtime change. Release builds can discover a compatible protected cache seed instead of missing it solely because one workflow requests
24.xand another requests24.21.0.Why This Change Was Made
Key the shared full-build cache by the installed Node version already emitted by setup, rather than the spelling of its requested version. Repository, cache scope, OS, architecture and immutable attempt boundaries are unchanged. Per-group source/compiler/runtime signatures and output validation still decide whether restored artifacts are reusable.
A protected warmer must publish a generation under the resolved-version key before alias-based seeds become discoverable by pinned consumers. Source changes can still cause a signature miss. This is a cache-discovery fix, not a measured end-to-end speedup claim.
Evidence
297f0c57ec7d0005c8fa8c9b3bf6d71d4c3f550a, the new alias/pin regression failed against the original key. After the fix, four focused cache/workflow guards passed; they also retain run-generation uniqueness and reject differing installed patch/major runtimes.pnpm test test/scripts/ci-workflow-guards.test.ts -t 'shares full-build caches|uses the workflow Node 24 pin|keeps setup cache access|warms protected caches' --maxWorkers=1 --reporter=dot: 4 passed, 7.04s command wall time.pnpm test test/scripts/ci-workflow-guards.test.ts --maxWorkers=1 --reporter=dot): 112.70s, 147 passed and one failed because the sparse checkout omitted the tracked Linux AppImage helper. After expanding the checkout, the isolated failed guard passed in 11.11s; no source fix was needed and the other 147 passing guards were not rerun. CI wall time is not yet measured; the existing regression is extended without adding a fixture, process boot or lane.pnpm check:workflows: passed (pinned actionlint, zizmor and repository workflow guards). The first validator invocation rejected an empty ambient token; removing that empty override resolved the tooling failure without source changes.737f9236424f2015fe500b2b033c393c7612269a: no actionable P0–P2 findings. Reviewed copy’s baseline and candidate trees matched the source checkout.Observed release and protected-warmer evidence
c42bd6eae5e856b5265c737e70086a71d014f08e: attempted thenode-24.21.0-full-build namespace and found no cache.pnpm buildtook 357s; declaration generation took 166.9s withrecord-unavailable.c48e883cf8b5f799ac8087eea8f838979bd1c703: restored and saved generations undernode-24.x-. The warmer itself had a declaration signature miss, demonstrating that namespace convergence alone does not guarantee artifact reuse.