Skip to content

fix: reuse warmed JavaScript bytecode in CI build jobs - #154113

Merged
steipete merged 1 commit into
mainfrom
codex/ci-cache-publisher-hillclimb
Sep 20, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ci-cache-publisher-hillclimb

Conversation

@steipete

@steipete steipete commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Related: #154108

What Problem This Solves

Build and QA CI jobs restore a Node bytecode cache namespace that the protected warmer never publishes.

User Impact

No product behavior changes. CI build and QA tooling can reuse the existing protected seed instead of repeatedly starting with an unpopulated archive namespace.

Why This Change Was Made

The warmer already compiles build tools before collecting tests and publishing its test archive. All consumers now share that seed; the unused namespace selector and daily build epoch are removed. Existing archive keys remain usable, ordinary jobs remain restore-only, and Vitest children still disable bytecode caching to preserve coverage accuracy.

Evidence

  • The revised cache-owner guard failed before the repair and passes afterward.
  • Full workflow guards: 624 passed, 12 existing skips; one-worker command wall 292.53 seconds (Vitest 291.09 seconds). This is the existing workflow contract suite; no additional runtime test was added. The focused cache pair took 15.28 seconds including imports.
  • Workflow validation, formatting, docs inventory, and git diff --check passed.
  • Changed-file gate passed on Blacksmith Testbox tbx_01m30datt7q0rvjxhg5jrpxbb6 (command 5m40s, exit 0; backing run https://github.com/openclaw/openclaw/actions/runs/35540312562). The one-shot lease was stopped after success.
  • Independent isolated review: no actionable P0–P2 findings.
  • Hosted exact-head CI and post-merge restore timings will determine the measured performance impact; this PR makes no wall-time savings claim.

@clawsweeper

clawsweeper Bot commented Sep 20, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: S maintainer Maintainer-authored PR labels Sep 20, 2026
@steipete
steipete marked this pull request as ready for review September 20, 2026 22:11
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 20, 2026
@clawsweeper

clawsweeper Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 20, 2026, 6:19 PM ET / 22:19 UTC.

ClawSweeper review

What this changes

Build and QA jobs reuse the existing protected JavaScript bytecode cache, while the branch removes the unused cache selector and updates workflow guards and documentation.

Merge readiness

✅ Ready for maintainer review

The repair remains useful: current main still has the cache namespace mismatch. No actionable correctness or security findings were identified, and the protected maintainer PR should proceed through normal review.

Priority: P2
Reviewed head: c3ba8773989671952b443956f2c9c690a11e1c15

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with coherent caller, guard, and documentation updates and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored CI repair is exempt from the external-contributor proof gate. Workflow guards support the setup-action change; actual restored-bytecode reuse and net timing gains remain unmeasured and are not claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored CI repair is exempt from the external-contributor proof gate. Workflow guards support the setup-action change; actual restored-bytecode reuse and net timing gains remain unmeasured and are not claimed.
Evidence reviewed 7 items Introduced change verified: Inspected the pinned merge-base-to-head diff. The change unifies cache readers without changing action pins, permissions, publication conditions, dependencies, or runner capacity. The supplied stale test merge was not used to infer removals from main.
Still necessary on main and latest release: Fetched main retains the scope-dependent compile-cache key and daily build epoch. The latest supplied release, v2026.9.5, also retains that selector. Neither inspection establishes an already-landed replacement.
Publisher and reader contracts align: The warmer enables the shared compile cache before its full build and later saves the setup action’s primary key using the same archive path. Ordinary consumers contain no compile-cache save step. The existing test namespace, OS, architecture, Node selector, and restore prefix remain compatible.
Findings None None.
Security None None.

How this fits together

OpenClaw’s shared Node setup action restores cached bytecode before CI runs build tools and tests. A separate trusted warmer publishes these archives; ordinary CI jobs only restore them.

flowchart LR
  A[Trusted warmer] --> B[Build and test collection]
  B --> C[Protected bytecode archive]
  C --> D[Shared Node setup]
  D --> E[Build and QA tools]
  D --> F[Test orchestration]
  F --> G[Vitest children disable bytecode caching]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -6, Docs +3, Config -21. Total -24 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 12 18 -6
Docs 3 7 4 +3
Config 3 5 26 -21
Generated 0 0 0 0
Other 0 0 0 0
Total 7 24 48 -24

Review metrics

None.

Root-cause cluster

Relationship: partial_overlap
Canonical: #154108
Summary: This patch addresses one concrete cache mismatch within the broader CI improvement issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep one protected bytecode publisher and matching readers, then assess actual restore and build costs through subsequent CI measurements.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main’s build consumers request a namespace the protected warmer does not publish. No runtime reproduction was executed during this review.

Is this the best way to solve the issue?

Yes: reusing the existing publisher’s namespace is a narrow repair that avoids another publisher and preserves existing archive keys.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5acd64bd5e16.

Labels

Label changes:

  • add P2: This repairs a concrete CI cache inefficiency without changing product behavior or addressing an urgent outage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored CI repair is exempt from the external-contributor proof gate. Workflow guards support the setup-action change; actual restored-bytecode reuse and net timing gains remain unmeasured and are not claimed.

Label justifications:

  • P2: This repairs a concrete CI cache inefficiency without changing product behavior or addressing an urgent outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored CI repair is exempt from the external-contributor proof gate. Workflow guards support the setup-action change; actual restored-bytecode reuse and net timing gains remain unmeasured and are not claimed.

Evidence

What I checked:

  • Introduced change verified: Inspected the pinned merge-base-to-head diff. The change unifies cache readers without changing action pins, permissions, publication conditions, dependencies, or runner capacity. The supplied stale test merge was not used to infer removals from main. (.github/actions/setup-node-env/action.yml:294, c3ba87739896)
  • Still necessary on main and latest release: Fetched main retains the scope-dependent compile-cache key and daily build epoch. The latest supplied release, v2026.9.5, also retains that selector. Neither inspection establishes an already-landed replacement. (.github/actions/setup-node-env/action.yml:310, 5acd64bd5e16)
  • Publisher and reader contracts align: The warmer enables the shared compile cache before its full build and later saves the setup action’s primary key using the same archive path. Ordinary consumers contain no compile-cache save step. The existing test namespace, OS, architecture, Node selector, and restore prefix remain compatible. (.github/workflows/vitest-cache-warm.yml:192, c3ba87739896)
  • Coverage safeguard and complete caller cutover: The repository-wide search found the retired selector only in assertions prohibiting it. The unchanged Vitest environment owner disables inherited bytecode caching and removes its environment variables before spawning Vitest. (scripts/lib/vitest-process-env.mts:196, c3ba87739896)
  • Validation and evidence limits: The captured PR body reports a failing-before/passing-after cache guard, 624 passing workflow guards, 12 existing skips, and a 292.53-second one-worker wall time. Its Testbox backing run is cancelled, consistent with the reported stopped lease, so that run status independently proves neither the claimed command result nor cache performance. No tests were executed in this read-only review; the introduced diff passed git diff --check and the checkout remained clean. (test/scripts/ci-workflow-guards.test.ts:8857, c3ba87739896)
  • Related work remains broader: The linked open issue CI: align cache publishers and improve measured test scheduling #154108 also covers hosted transform publication, dependency fingerprints, and measured scheduling. This PR addresses its build-bytecode namespace mismatch only; those other concerns are not introduced regressions.

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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.

@steipete
steipete merged commit 5f97ef7 into main Sep 20, 2026
231 checks passed
@steipete
steipete deleted the codex/ci-cache-publisher-hillclimb branch September 20, 2026 23:45
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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