Repository navigation
ci: cache native dependency outputs for hosted jobs - #150725
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 September 17, 2026, 4:10 AM ET / 08:10 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR aligns dependency-cache paths, publishes completed native installation outputs earlier, adds a hosted Linux warmer in hybrid mode, and bounds Node executable discovery. Merge readiness✅ Ready for maintainer review This remains a useful, focused CI repair that fetched main does not contain. No blocking correctness or security findings were identified, and the recorded hosted runs demonstrate the intended cache reuse. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s CI setup installs Node and dependencies before checks run. A trusted warmer publishes dependency caches that later jobs restore to avoid repeated downloads and native installation work. flowchart TD
A[Trusted warmer] --> B[Select runner backend]
B --> C[Install Node and dependencies]
C --> D[Publish completed dependency store]
D --> E[CI jobs restore matching store]
E --> F[Reuse native installation outputs]
F --> G[Run checks]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +27, Docs +16, Config -4. Total +39 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Use the existing trusted warmer to seed matching hosted dependency stores while preserving cold-install fallback and platform-specific cache isolation. Do we have a high-confidence way to reproduce the issue? Yes for the cache-path mismatch: fetched main configures the publisher’s workspace store only for exact-dependency consumers, excluding hosted store-only readers. The transient CDN failure itself was not reproduced during this review. Is this the best way to solve the issue? Yes. The patch repairs the existing cache owner and consumer contract without adding downloader retries, vendored binaries, or a competing cache system. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fa9c62ecae86. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
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: #150752, #150725.
CI setup could fail before lint or tests when Matrix crypto native-library downloads hit a transient release-CDN error. Hosted store-only readers used a different cache path from the publisher, and hybrid mode seeded only the Blacksmith Linux backend. Align the existing setup action and warmer on the workspace-local pnpm store, publish completed native installation outputs before unrelated build work, and add one install-only hosted warmer row in hybrid mode. Bound installed-Node discovery to four levels to avoid traversing bundled npm dependencies. The existing warmer remains the sole publisher and PR consumers remain restore-only. Current-head hosted warm setup completed in 22 seconds with 1,436 packages reused, zero downloads, and Matrix postinstall skipped, compared with the recorded ten-job 45-second baseline median. This is an observed sample, not a measured fleet-wide median change. Cold caches and changed native inputs still require upstream assets. No application runtime, configuration, dependency, or permission changes. Validation: exact-head PR CI run 35197161825 returned GREEN; the accepted Codex review and exact-head ClawSweeper review found no actionable issues. The PR also records passing targeted Node/cache guards, workflow checks, and cold/warm native reuse proof. Related: openclaw#150637, openclaw#150526.
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.
CI setup could fail before lint or tests when Matrix crypto native-library downloads hit a transient release-CDN error. Hosted store-only readers used a different cache path from the publisher, and hybrid mode seeded only the Blacksmith Linux backend. Align the existing setup action and warmer on the workspace-local pnpm store, publish completed native installation outputs before unrelated build work, and add one install-only hosted warmer row in hybrid mode. Bound installed-Node discovery to four levels to avoid traversing bundled npm dependencies. The existing warmer remains the sole publisher and PR consumers remain restore-only. Current-head hosted warm setup completed in 22 seconds with 1,436 packages reused, zero downloads, and Matrix postinstall skipped, compared with the recorded ten-job 45-second baseline median. This is an observed sample, not a measured fleet-wide median change. Cold caches and changed native inputs still require upstream assets. No application runtime, configuration, dependency, or permission changes. Validation: exact-head PR CI run 35197161825 returned GREEN; the accepted Codex review and exact-head ClawSweeper review found no actionable issues. The PR also records passing targeted Node/cache guards, workflow checks, and cold/warm native reuse proof. Related: #150637, #150526. Co-authored-by: Peter Steinberger <[email protected]>
Related: #150637, #150526 (setup failures)
What Problem This Solves
CI lint and test jobs can fail before running when Matrix crypto's native-library download encounters a transient GitHub release-CDN error.
User Impact
Warm dependency installs reuse native build outputs, reducing setup failures in unrelated CI lanes. There is no runtime or configuration change. Cold caches and changed native build inputs still need the upstream download.
Why This Change Was Made
Pnpm already caches postinstall side effects, but hybrid mode only warmed Linux dependencies on Blacksmith while the failed checks ran on GitHub-hosted Ubuntu. Those checks restored an August 21 store. Store-only readers also used a different path from the exact-dependency publisher; Actions includes paths in cache compatibility.
Use the same workspace-local store for cached Node setup, publish the completed store before unrelated build work, and add one install-only hosted warmer row in hybrid mode. The existing warmer remains the sole publisher; PR jobs remain restore-only. Matrix stays a plugin-local dependency. This reuses the existing cache infrastructure without dependency changes, binary vendoring, or downloader retries.
Node discovery now stops at the supported toolcache executable depth (four levels), avoiding recursive walks through bundled npm dependencies before selecting an installed runtime.
Evidence
Current head:
4641aa16881d0533a6cbd08f37315707a1f33aec.Setup wall time
Current warm proof: exact same cache key and 670,583,520-byte archive as the earlier proofs;
resolved 1436, reused 1436, downloaded 0, added 1436, done. Matrix postinstall log lines: cold 4, both warm runs 0. Pnpm reports 6.6s for the latest install. The 22s setup meets the requested ≤45s threshold; it is 31s below the earlier warm sample and 23s below the baseline median. These are observed samples, not a measured fleet-wide median change.Ten-job pre-change baseline from the API
Selection: ten latest completed
Setup Node environmentsteps onubuntu-24.04in main run 35195325578, ordered by completion time and job ID descending. All ten setup steps succeeded. That run's main SHA is1c0876d2134dfc8dd05b0dbae46ac0e51319c018; its setup owners are byte-identical to pinned current maina3a2d39a8e811a7798b3dd6679e12fd115e20f2e. Jobs retain their normal optional setup flags.The representative 44s job selected Node in 1.716s, restored the old 1,671,363,660-byte store in 22.793s, downloaded 524 packages, and downloaded Matrix crypto's native library. The new store is 59.9% smaller.
Current CI plan and per-run impact
Pin:
a3a2d39a8e811a7798b3dd6679e12fd115e20f2e. Canonical, trusted same-repository ready PR or main push; hybrid backend; first attempt; all scope families selected, docs changed; successful prerequisites. This is full-scope automatic CI, not manual release qualification.setup-node-env(53 − 45) × Ubuntu consumers(22 − 45) × Ubuntu consumersThe multiplication is a point estimate for comparable setup work, not observed total workflow savings. It excludes the separate hybrid warmer's one additional hosted job per admitted warmer run (94s including checkout/setup/save in the cold proof), and does not apply the Linux baseline to macOS, Windows, or Node-only setup.
All Ubuntu jobs except
security-fast,skills-python, andopenclaw/ci-gateuse the changed action. All five macOS jobs use it. All Blacksmith jobs except dependency-freepreflightand the two Windows rows use it; four Android rows setinstall-deps:falseand install the filtered Mermaid profile separately. The two Windows rows use their separate pnpm setup path. PR Node coverage is 71 compact + 40 plugin fallback = 111 Blacksmith rows; main has 49 compact rows. The PR's extra docs row is omitted on main.Expanded job families and census verification
The census executes the real workflow manifest, Node planner, and plugin fallback planner, then uses the existing workflow-expression evaluator to expand conditions, matrices, and runners. It used a task-owned snapshot with 44,212 pinned tracked files and zero source/index drift. No dependency installation or branch change was needed.
Reconciliation with the captured Matrix-tests-scoped main run: 96 API records = 79 admitted + 17 skipped placeholders. The planner predicts 80 admitted jobs; only the final gate was not yet emitted. Unexpected admitted jobs: 0; runner mismatches: 0. That narrower run has 16 comparable Ubuntu consumers. Thus the census counts real selected rows, not matrix caps or skipped API placeholders.
Extraction alternatives assessed
--prefer-offlinepnpm store pruneThe available incident evidence records one transient CDN episode affecting at least three jobs across two PRs (#150637 and #150526); it does not establish a long-term outage rate. The latest measured common path is below the baseline median, so no positive per-job overhead is being traded against an invented outage frequency.
Validation and remaining CI
pnpm check:changed,pnpm check:workflows, andgit diff --checkpass.autoreview --mode branch --base origin/main --max-priority P1and the precommit review are both scoped-clean.0.6.6marker, with zero downloads.Total scope: CI tooling +18/-22 lines, tests +42/-15, docs +16/-0; six files and no application source changes. No landing performed.