Skip to content

fix: reuse cached pnpm archives during CI setup - #150782

Merged
steipete merged 4 commits into
mainfrom
upd/ci-pnpm-archive-cache
Sep 17, 2026
Merged

steipete merged 4 commits into
mainfrom
upd/ci-pnpm-archive-cache

Conversation

@steipete

@steipete steipete commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

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.
  • After the final tracker-binding lint correction, 23 focused tests passed: both package guards plus the complete shared archive-fixture suite. SHA-512 checks and corrupt-archive rejection remain intact; the full-file runs above cover the remaining cases.
  • check:changed and the assertion-safety ratchet passed. Fresh Codex committed-branch review (--mode branch --base origin/main --max-priority P1) is scoped-clean for 15472d6af5434b55cace9af864a46df3329d6ce1; artifact: package-guards-branch-autoreview.txt.
Hosted proof Setup wall time Pinned archive downloads Result
#150725 warm baseline 22 s Not instrumented Existing hosted store hit
This branch cold 18 s 2 Cache miss; hosted job passed and saved the store
This branch warm 18 s 0 Exact store hit; both archives restored; 1,440 packages reused, 0 downloaded

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 15472d6af5434b55cace9af864a46df3329d6ce1 is complete and green: run 35217823757. The native watcher reported rollup=green, github_rollup=SUCCESS, pending=0, and GREEN; 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.

@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 17, 2026 09:50
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M maintainer Maintainer-authored PR labels Sep 17, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 17, 2026, 8:15 AM ET / 12:15 UTC (Revision 4).

ClawSweeper review

What this changes

Restore 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
Reviewed head: 15472d6af5434b55cace9af864a46df3329d6ce1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with applicable hosted proof and resolved prior findings meets the normal good-quality bar.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The linked hosted cold/warm runs exercise the shared setup action and report successful cache population followed by bootstrap with zero archive downloads. GitHub confirms both jobs succeeded, and all four production blobs match the reviewed head; raw-log access was host-blocked.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The linked hosted cold/warm runs exercise the shared setup action and report successful cache population followed by bootstrap with zero archive downloads. GitHub confirms both jobs succeeded, and all four production blobs match the reviewed head; raw-log access was host-blocked.
Evidence reviewed 8 items Current main still needs the fix: At fetched main, pnpm preparation precedes store resolution and cache restoration. The merged native-dependency caching work at #150725 supplies infrastructure but does not resolve this bootstrap ordering.
Latest release comparison: The action retrieved at v2026.9.4 likewise prepares pnpm before restoring the store; this release does not contain the requested cache-first bootstrap.
Cache authentication and ownership: The bootstrap copies candidate archives into private staging and checks the existing pinned SHA-512 digests before extraction. Missing or invalid cache bytes fall through to the existing image/download paths. The separate warmer remains the publisher; action references, permissions, dependency pins, and registry destinations are unchanged.
Findings None None.
Security None None.

How this fits together

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

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Tests +154, Docs +10, Config +20. Total +184 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 5 321 167 +154
Docs 2 12 2 +10
Config 4 73 53 +20
Generated 0 0 0 0
Other 0 0 0 0
Total 11 406 222 +184

Review metrics

Metric Value Why it matters
Cache reseeding 2 cache generations advanced Store v2 and exact-dependency v4 force one fresh population of the expanded archive payload.
Production versus test growth Production/tooling +20 net lines; tests/support +154 net lines Production growth extends the existing authenticated bootstrap owner; test growth covers cache reuse, corruption fallback, and isolated fixtures.

Stored data model

Persistent data-model change detected: migration/backfill/repair: .github/actions/setup-node-env/install-dependencies.sh, serialized state: .github/actions/setup-pnpm-store-cache/action.yml, unknown-data-model-change: .github/actions/setup-pnpm-store-cache/action.yml, unknown-data-model-change: .github/actions/setup-pnpm-store-cache/seed-pnpm-from-image.mjs. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best 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.

Labels

Label justifications:

  • P2: This bounded CI reliability repair reduces bootstrap dependence on registry availability without changing application behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The linked hosted cold/warm runs exercise the shared setup action and report successful cache population followed by bootstrap with zero archive downloads. GitHub confirms both jobs succeeded, and all four production blobs match the reviewed head; raw-log access was host-blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient. The linked hosted cold/warm runs exercise the shared setup action and report successful cache population followed by bootstrap with zero archive downloads. GitHub confirms both jobs succeeded, and all four production blobs match the reviewed head; raw-log access was host-blocked.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-17T10:03:07.539Z sha 4a8679c309f81a606f96bfae7dd5dcef291cace6 :: blocked before merge. :: [P2] Isolate the existing image fixture's pnpm store
  • reviewed 2026-09-17T10:14:46.985Z sha 73e5689 :: blocked before merge. :: none
  • reviewed 2026-09-17T10:23:22.933Z sha 73e5689 :: blocked before merge. :: [P2] [P2] Complete the package-acceptance test cutover

@steipete
steipete force-pushed the upd/ci-pnpm-archive-cache branch from 4a8679c to 73e5689 Compare September 17, 2026 10:07
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 17, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 17, 2026
@clawsweeper clawsweeper Bot added the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Sep 17, 2026
@steipete
steipete merged commit c801737 into main Sep 17, 2026
178 checks passed
@steipete
steipete deleted the upd/ci-pnpm-archive-cache branch September 17, 2026 12:26
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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