Skip to content

fix(ci): reuse warmed release caches across Node version aliases - #167344

Merged
vincentkoc merged 1 commit into
mainfrom
fix/frv-resolved-node-cache-20261009
Oct 8, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/frv-resolved-node-cache-20261009

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

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.x and another requests 24.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

  • On baseline 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.
  • Complete-file cost run (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.
  • Scoped typed oxlint: 0 errors, 0 warnings. 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.
  • Independent review of exact candidate tree 737f9236424f2015fe500b2b033c393c7612269a: no actionable P0–P2 findings. Reviewed copy’s baseline and candidate trees matched the source checkout.
Observed release and protected-warmer evidence
  • Npm producer build at source c42bd6eae5e856b5265c737e70086a71d014f08e: attempted the node-24.21.0- full-build namespace and found no cache. pnpm build took 357s; declaration generation took 166.9s with record-unavailable.
  • Protected Linux warmer at source c48e883cf8b5f799ac8087eea8f838979bd1c703: restored and saved generations under node-24.x-. The warmer itself had a declaration signature miss, demonstrating that namespace convergence alone does not guarantee artifact reuse.
  • Candidate acquisition already consumed the sealed npm package in 4s and skipped repacking OpenClaw. No artifact-publication, reuse, release-dispatch or locale-parity policy is changed.

@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review October 8, 2026 17:06
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 8, 2026, 1:18 PM ET / 17:18 UTC.

ClawSweeper review

What this changes

The branch keys full-build caches by the installed Node version so aliases and exact pins can discover compatible warmed generations.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported repair with useful regression coverage, but after-fix native cache restoration has not been demonstrated.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Reported after-fix evidence exercises YAML cache-key rendering; linked native runs describe the pre-fix mismatch rather than after-fix restoration. Existing stored artifact formats and validation are unchanged, with cold rebuilds handling namespace misses.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Release builders miss compatible warmed declarations because their Node pin is spelled differently from the warmer's alias.
Reason: The change removes an accidental discovery mismatch at the existing shared owner with minimal production growth and no new product surface.

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
Reviewed head: c9dff36636060dde34d8da053f6ab72353bd42b6

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No after-fix native warmer-to-pinned-consumer cache restoration is recorded; supplied production runs establish the original namespace mismatch. Tests were not executed during this read-only review.
Agent review details

How this fits together

Release 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]
Loading

Technical review

Best 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

Testing

Proof path: unit tests only. Added test files: 1.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

Tests +20, Config +1. Total +21 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 24 4 +20
Docs 0 0 0 0
Config 1 3 2 +1
Generated 0 0 0 0
Other 0 0 0 0
Total 2 27 6 +21

Labels

Label changes:

  • add P3: This improves internal release-cache discovery without changing product runtime behavior or blocking successful cold builds.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This improves internal release-cache discovery without changing product runtime behavior or blocking successful cold builds.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

@vincentkoc
vincentkoc merged commit 8958390 into main Oct 8, 2026
182 checks passed
@vincentkoc
vincentkoc deleted the fix/frv-resolved-node-cache-20261009 branch October 8, 2026 17:20
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

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

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant