Repository navigation
fix: reuse cached pnpm archives during CI setup - #150782
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
Codex review: blocked before merge. Reviewed September 17, 2026, 8:15 AM ET / 12:15 UTC (Revision 4). ClawSweeper reviewWhat this changesRestore cached pnpm installation archives before CI bootstrap, verify them before extraction, preserve them during dependency repair, and update the associated tests and documentation. Merge readiness⛔ Blocked before merge - 1 item remains This PR remains useful: current main and the latest release still activate pnpm before restoring its store. Both prior findings are addressed, the hosted proof remains applicable, and no actionable correctness finding remains. Priority: P2 Review scores
Verification
How this fits togetherThe shared CI setup actions prepare Node, pnpm, and workspace dependencies before checks run. A separate cache warmer publishes reusable archives, while ordinary jobs restore them and retain image or registry fallback. flowchart TD
A[Package manager pin] --> B[Restore dependency or store cache]
B --> C[Verify pnpm archives]
D[Runner image or registry fallback] --> C
C --> E[Activate private pnpm installation]
E --> F[Reconcile workspace dependencies]
F --> G[Run CI checks]
F --> H[Authorized cache warmer]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +154, Docs +10, Config +20. Total +184 across 11 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep authenticated bootstrap archives within the existing warmed store, with private verification, existing fallback behavior, and a single cache publisher. Do we have a high-confidence way to reproduce the issue? Yes, the source establishes the trigger: a job without image archives must download pnpm before its warmed store is restored, exposing bootstrap to registry failure. This review did not execute a failing current-main run. Is this the best way to solve the issue? Yes. Reordering the existing restore and reusing its authenticated archive owner addresses the bootstrap gap without introducing another downloader or publisher. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8d6decdecafe. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
4a8679c to
73e5689
Compare
|
Merged via squash.
|
Restore the configured pnpm store before activation so warm CI jobs reuse the pinned wrapper and native executable archives without another registry download. Verify private archive copies with the existing SHA-512 pins, retain image and registry fallback, and preserve bootstrap archives during dependency repair. The existing warmer remains the cache publisher. Update isolated archive fixtures, acceptance guards, and CI documentation for the cache-first bootstrap. Store v2 and dependency v4 entries reseed once; application behavior and user data are unchanged. Validation: exact-head CI run 35217823757 is green with no pending checks; retained hosted cold/warm proof records zero archive downloads on the warm run. The package-acceptance suite passed 558 tests on three full runs, followed by 23 final focused tests. The campaign review and exact-head ClawSweeper review report no actionable correctness findings. Related: openclaw#150752, openclaw#150725.
Related: #150752, #150725
What Problem This Solves
Fixes CI setup failing before any check runs when the pinned pnpm archive download loses its registry connection, as in job 105147230747.
User Impact
CI jobs can bootstrap the pinned pnpm version from the warmed setup cache without another archive download. There is no application behavior change. A cold or invalid cache still requires the existing image or registry fallback.
Why This Change Was Made
The shared setup action previously activated pnpm before restoring its store, so #150725's hosted store cache could not prevent bootstrap downloads. Setup now restores the configured store root first, with both the pnpm wrapper and Linux native executable archives in the same payload. The complete packageManager pin keys the store cache; private staging verifies both SHA-512 hashes before extraction. Dependency repair preserves those authenticated archives. The existing warmer remains the publisher for the separate hosted and Blacksmith cache backends; new cache generations seed the expanded payload once.
The setup fixtures now use a fresh store at a canonical filesystem path for every case instead of inheriting the CI job's store. Coverage explicitly distinguishes an empty store's registry fallback from a populated store serving missing or corrupt image archives, and verifies corrupt store archives fall through to authenticated image or registry bytes.
The package-acceptance guards evaluate the action's own cache-key expression using its pin-resolution output, runner platform/architecture, and lockfile hash. The retired pnpm retry test now exercises the shared authenticated archive fixture through image seeding, store reuse, and corrupt-store fallback to the registry.
Evidence
package-acceptance-workflow.test.ts: 558 tests passed on each of three full runs, with identical reported case order. Both repaired guards passed on every run.check:changedand the assertion-safety ratchet passed. Fresh Codex committed-branch review (--mode branch --base origin/main --max-priority P1) is scoped-clean for15472d6af5434b55cace9af864a46df3329d6ce1; artifact:package-guards-branch-autoreview.txt.The hosted measurements were taken on the original bootstrap commit
4a8679c309f81a606f96bfae7dd5dcef291cace6; production setup code is unchanged by the fixture and guard repairs. Setup timing excludes checkout and cache publication. Warm setup was 4 seconds below the 22-second baseline in this pair. Both hosted jobs succeeded; their parent dispatches were canceled afterward to stop unrelated warming.The prior baseline-ratchet job passed max-lines, line-cap, assertion-safety, and config-doc checks. It failed later because the 120-second no-output watchdog terminated state-corpus shards 1/4, 3/4, and 4/4 with exit 143. No ratchet entries or baselines required modification.
The original cache patch was preserved across the earlier refresh onto main containing #150767. Exact-head CI is now green; see the landing evidence below. No failed CI attempt was rerun.
PR LOC: production/tooling +73/-53; tests/support +321/-167; docs +12/-2. This guard follow-up changes no production code and adds/removes 197/155 test/support lines, including the shared-fixture move.
Landing evidence and review disposition
Exact-head CI for
15472d6af5434b55cace9af864a46df3329d6ce1is complete and green: run 35217823757. The native watcher reportedrollup=green,github_rollup=SUCCESS,pending=0, andGREEN; no failed attempt was rerun.ClawSweeper's exact-head review confirms both earlier findings are resolved and reports no actionable correctness finding. Its latest review has no Rank-up moves. The earlier moves are addressed by the acceptance-guard repair and the state-corpus watchdog diagnosis above; current-head CI has no remaining failure.
The generic data-model compatibility item is skipped as inapplicable to application migration: this patch changes disposable CI cache payloads, with no application schema, user state, or public configuration change. Store v2 and exact-dependency v4 keys force a fresh population instead of interpreting old payloads. The recorded cold-to-warm hosted proof demonstrates the new cache population and reuse, while missing or invalid archives retain authenticated image/registry fallback. The existing warmer remains the sole cache publisher.