Skip to content

fix(ci): reuse candidate artifacts for published-driver updates - #162765

Merged
steipete merged 2 commits into
mainfrom
fix/ci-published-driver-artifact-reuse
Oct 1, 2026
Merged

steipete merged 2 commits into
mainfrom
fix/ci-published-driver-artifact-reuse

Conversation

@steipete

@steipete steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The published-driver update cell rebuilt and packaged the candidate before starting its managed update. Its ten-minute job timeout cancelled the cell and propagated cancellation to main hourly 36863974207.

Related: #162629, landed as 25972a6a2837.

User Impact

Main hourlies retain the cross-version update proof with one candidate build shared by the existing build owner. A cell deadline now produces a failed step with its active phase recorded, instead of the job-level timeout cancelling the run. Unrelated PRs continue to omit the cell. No runtime product, dependency, lockfile, schema, or product-option changes are included.

Why This Change Was Made

build-artifacts already builds the runtime but previously published only diagnostic artifacts. When the update cell is selected, that job now packages its existing build with the canonical --skip-build packer and full tarball integrity check. It exposes the uploaded artifact ID and SHA-256. The dependent cell downloads that same-run artifact and verifies the digest. Immutable producer IDs also allow a failed consumer-only retry to reuse the successful producer's artifact.

The consumer does not install workspace dependencies or compile the candidate. It retains github.sha checkout, contents: read, disabled persisted checkout credentials, cache off, and no passed secrets. The artifact download has neither a cross-run ID nor a GitHub token. Updater-tooling selections explicitly select the producer even when no ordinary Node build was otherwise needed.

A work deadline starts before checkout and reserves fifteen seconds for forced termination plus one minute for diagnostics within ten minutes. GNU timeout bounds the Docker command to the remaining budget. Exit 124 or 137 becomes exit 1 with the active phase in the error annotation and step summary; other nonzero exits remain failures. Each child phase is recorded before execution. Preparation steps and evidence upload have their own step bounds; the cancelling ten-minute job timeout is removed. No timeout increase was needed.

Evidence

Exact pushed head: f2e7a01d35abf2648a34ff523c8ea2f806865da5, based on 1c95e958d9200cabc659650ea2fdd863cad573bc.

Fresh Blacksmith Testbox tbx_01m3vw3sc61s8k4p4ts24pxh6k (lease run) fetched that SHA and installed with the frozen lockfile. Host: 8 CPUs, Node 24.19.0. The consumer used a separate checkout with no node_modules, a handed-off producer tarball, and the exact workflow update shell. Its disposable Docker container was limited through the existing helper to 4 CPUs and 8 GiB.

Measurement Result
Shared producer pnpm build:ci-artifacts PASS, 188.37s
Canonical producer packaging and integrity verification PASS, 67.59s
Consumer cell, including bare-image preparation, published-driver installation, and one managed update PASS, 285.06s
Consumer checkout, local artifact handoff, and cell together 289s
Managed openclaw update within that cell PASS, 230.396s

The cell removed 255.96s of candidate build/package work from its own execution, plus workspace installation. The cold proof fits in about 4.8 minutes without increasing the ten-minute ceiling. This is a lease measurement with a four-CPU container, not a statistical p95 or a new hosted CI run; actual GitHub artifact-transfer and setup-action latency were not measured.

Proof output:

PASS published 2026.9.7 → candidate 2026.9.7 (f2e7a01d35abf2648a34ff523c8ea2f806865da5): finished, readyz=200, running version verified
cell elapsed=285.06
consumer checkout, transfer and cell elapsed=289

Workflow sanity and zizmor passed in 16.33s. All 1,046 tests across 12 direct/nearby consumer files passed in their selected order, 551.36s wrapper wall. This includes 51 published-driver plan/timeout cases and 522 workflow-planning cases. The actual workflow shell was exercised with immediate timeout outcomes 124/137, normal failure/success, and an expired preparation budget; timeout paths return failure and record the active phase without sleeping. Plan tests prove scheduled-main selection, unrelated-PR omission, and producer selection for updater-only script changes.

The existing campaign waiver covers the pre-existing slow tooling owners encountered here: ci-workflow-planning.test.ts took 188.198s of test time and ci-git-owner.test.ts took 161.113s. No retries, sleeps, weaker assertions, or timeout increases were introduced to hide their cost.

Fresh direct-route Codex P1 review: scoped-clean, exit 0. Formatting and git diff --check passed. Both remote checkouts remained clean; review and proof leases are stopped. No CI validation run was dispatched or rerun for proof.

Change split: runtime production 0; CI/tooling +84/-15; tests and E2E diagnostics +113/-2; docs +11/-3. ci.yml is 409,974 bytes, below the 480,000-byte guard. Auto-merge is off.

@clawsweeper

clawsweeper Bot commented Oct 1, 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 scripts Repository scripts docker Docker and sandbox tooling size: M labels Oct 1, 2026
@clawsweeper clawsweeper Bot added 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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 1, 2026, 10:37 AM ET / 14:37 UTC.

ClawSweeper review

What this changes

The PR shares the existing candidate build with the published-driver update check and reports command deadlines as failures with phase diagnostics.

Merge readiness

⛔ Blocked before merge - 1 item remains

This remains a useful, focused CI repair: current main still repeats candidate preparation inside the timed update job. No introduced correctness or security defect was found, and the supplied after-fix runtime evidence supports the change.

Priority: P2
Reviewed head: f2e7a01d35abf2648a34ff523c8ea2f806865da5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with convincing runtime evidence and no actionable introduced defect.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The supplied exact-head Testbox trace exercises the changed package handoff through the real Docker runner and published updater, showing finished recovery, readyz=200, and the candidate running. Shell cases supplement deadline handling; hosted artifact-transfer latency remains outside the timing claim. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The supplied exact-head Testbox trace exercises the changed package handoff through the real Docker runner and published updater, showing finished recovery, readyz=200, and the candidate running. Shell cases supplement deadline handling; hosted artifact-transfer latency remains outside the timing claim. No stored-data contract changes.
Evidence reviewed 8 items Current main still needs the repair: Fetched main retains candidate building and packaging inside the published-driver job with a ten-minute job timeout. The merged prerequisite introduced the check; it did not implement this artifact reuse repair.
Producer and consumer cutover: The introduced patch packages the existing build, exposes the immutable artifact ID and SHA-256, makes the consumer depend on that producer, and selects the producer for updater-only changes.
Artifact execution safeguards: The consumer checks out github.sha without persisted credentials, disables dependency installation and caching, downloads without a cross-run ID or GitHub token, and checks the producer digest before invoking Docker. No new secret access, write permission, dependency source, or privileged execution route is introduced.
Findings None None.
Security None None.

How this fits together

The published-driver CI check installs a released OpenClaw version and uses its updater to install the candidate package. Its result feeds the aggregate CI gate that protects cross-version update behavior.

flowchart TD
  A[Changed paths or hourly run] --> B[CI lane selection]
  B --> C[Shared candidate build]
  C --> D[Package and upload artifact]
  D --> E[Download and verify digest]
  E --> F[Published updater in Docker]
  F --> G[Update result and phase diagnostics]
  G --> H[Aggregate CI gate]
Loading

Before merge

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

Security

None.

PR surface

Tests +108, Docs +8, Config +68, Other +4. Total +188 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 110 2 +108
Docs 1 11 3 +8
Config 2 75 7 +68
Generated 0 0 0 0
Other 3 12 8 +4
Total 8 208 20 +188

Review metrics

Metric Value Why it matters
Consumer preparation removed 255.96 seconds in the supplied cold measurement Moving build and packaging work out of the consumer provides measured headroom within its existing budget, without claiming hosted transfer timings.
Growth by responsibility Runtime production 0; CI/tooling +84/-15; tests and diagnostics +113/-2 The tooling growth implements artifact coordination and deadline reporting while leaving runtime product behavior unchanged.

Stored data model

Persistent data-model change detected: serialized state: scripts/e2e/lib/upgrade-survivor/published-driver.mjs. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep candidate preparation with the shared build owner and preserve the isolated published-updater check with bounded execution and useful failure diagnostics.

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

Unclear for an independent current-main replay: the reported hourly timeout and main's repeated build/package path establish a concrete failure route, but this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. Reusing the existing build owner removes repeated preparation while retaining canonical package validation and the published-driver boundary check.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded CI reliability repair that preserves required cross-version update coverage.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The supplied exact-head Testbox trace exercises the changed package handoff through the real Docker runner and published updater, showing finished recovery, readyz=200, and the candidate running. Shell cases supplement deadline handling; hosted artifact-transfer latency remains outside the timing claim. No stored-data contract changes.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The supplied exact-head Testbox trace exercises the changed package handoff through the real Docker runner and published updater, showing finished recovery, readyz=200, and the candidate running. Shell cases supplement deadline handling; hosted artifact-transfer latency remains outside the timing claim. No stored-data contract changes.

Label justifications:

  • P2: This is a bounded CI reliability repair that preserves required cross-version update coverage.
  • 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 (terminal): The supplied exact-head Testbox trace exercises the changed package handoff through the real Docker runner and published updater, showing finished recovery, readyz=200, and the candidate running. Shell cases supplement deadline handling; hosted artifact-transfer latency remains outside the timing claim. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied exact-head Testbox trace exercises the changed package handoff through the real Docker runner and published updater, showing finished recovery, readyz=200, and the candidate running. Shell cases supplement deadline handling; hosted artifact-transfer latency remains outside the timing claim. No stored-data contract changes.

Evidence

What I checked:

  • Current main still needs the repair: Fetched main retains candidate building and packaging inside the published-driver job with a ten-minute job timeout. The merged prerequisite introduced the check; it did not implement this artifact reuse repair. (.github/workflows/ci-published-driver-update.yml:13, e7dc869d1518)
  • Producer and consumer cutover: The introduced patch packages the existing build, exposes the immutable artifact ID and SHA-256, makes the consumer depend on that producer, and selects the producer for updater-only changes. (.github/workflows/ci.yml:1753, f2e7a01d35ab)
  • Artifact execution safeguards: The consumer checks out github.sha without persisted credentials, disables dependency installation and caching, downloads without a cross-run ID or GitHub token, and checks the producer digest before invoking Docker. No new secret access, write permission, dependency source, or privileged execution route is introduced. (.github/workflows/ci-published-driver-update.yml:25, f2e7a01d35ab)
  • Canonical package verification retained: The canonical packer skips compilation when requested but still runs the tarball checker with bundled workspace dependency verification. (scripts/package-openclaw-for-docker.mts:1117, f2e7a01d35ab)
  • After-fix production-path proof: The captured body, sourceRevision 39902c94b33b3b62f694a78440dceb0d4b9e52831e16335d66637454a3a544e4, reports exact-head Testbox execution using a separate consumer checkout without node_modules and a producer tarball. The real Docker entrypoint completed the published 2026.9.7 update, recorded finished status, returned readyz=200, and verified the running candidate. Consumer execution took 285.06 seconds; GitHub artifact-transfer and setup-action latency were explicitly unmeasured. (scripts/e2e/lib/upgrade-survivor/published-driver.mjs:179, f2e7a01d35ab)
  • Selection and deadline regression coverage: The added cases cover scheduled-main selection, producer selection without an ordinary Node lane, same-run artifact wiring, timeout exits 124/137, ordinary success/failure, exhausted preparation budget, and aggregate rejection of a failed hourly cell. These supplement the supplied runtime trace; this read-only review did not execute tests. (test/scripts/ci-published-driver-update-plan.test.ts:72, f2e7a01d35ab)

Likely related people:

  • Peter Steinberger: Raw commit 25972a6 adds .github/workflows/ci-published-driver-update.yml:1 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 25972a6a2837; files: .github/workflows/ci-published-driver-update.yml)

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 added a commit that referenced this pull request Oct 1, 2026
…e out on loaded hosts while polling fixture files (#162694)

src/infra tests for gateway locks, delivery-queue spooling, ports, session cost usage I/O, SQLite readonly/snapshot/schema workers, Tailscale parent loss, triage continuation, and the update run ledger / candidate state / database restore / managed-service handoff and triage polled marker files, PID files, and the process table against 1-10 s wall-clock deadlines, so a fixture child or worker that outlasted the bound on a loaded host failed the test.

Each wait now awaits the signal that owns it: retained ChildProcess close promises registered before the action (stop paths SIGKILL only if the child is still running in finally), pre-registered stdin finish events, worker/child readiness lines written after the fact they announce, fixture receipts with a durable-record fallback for product-owned children, and direct reads where an awaited operation guarantees the state. The managed-service handoff support gains an owned readiness relay, and the triage conflict with main's #162496 keeps its Bun preload adapter and timer ordering. Fake-clock/real-clock separation in the update tests is preserved. exec-host.native.test-support.ts (macOS-native) and the shared-state admission marker loop (the host blocks inside Worker.postMessage by design) stay unchanged. No product source, test timeout, product timeout, or assertion meaning changed.

Part of the polling audit from #162274. Proof on Blacksmith Testbox: delay probes fail the original bytes and pass these bytes, forced-abort probes reach cleanup, 20 standalone runs per touched file (triage files re-proven on the resolved head), 3/3 replays of each owning bundle, owning tsgo graphs, type-aware lint, base-aware timeout-race ratchet; Codex autoreview and ClawSweeper clean. The one red check, published-driver-update, hits its 10-minute job budget on every run including hourly main and its introducing PR #162629; #162765 owns that fix.
@steipete
steipete merged commit 779880c into main Oct 1, 2026
113 of 114 checks passed
@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Landed (squash 779880c635c2341873e218766709a28c184ddc14, head 75a1feb5e5cd): lead review scoped-clean (0.89); plan test 51/51 on macOS and Linux at this head; CodeQL neutral. No CI was re-spent.

@steipete
steipete deleted the fix/ci-published-driver-artifact-reuse branch October 1, 2026 15:04
steipete added a commit that referenced this pull request Oct 1, 2026
Remove the temporary job-budget override now that main #162765 reuses the checksummed candidate artifact and owns the bounded update cell. The prospective merge uses that workflow unchanged; application sources and completed runtime proof are unaffected.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 2, 2026
…e out on loaded hosts while polling fixture files (openclaw#162694)

src/infra tests for gateway locks, delivery-queue spooling, ports, session cost usage I/O, SQLite readonly/snapshot/schema workers, Tailscale parent loss, triage continuation, and the update run ledger / candidate state / database restore / managed-service handoff and triage polled marker files, PID files, and the process table against 1-10 s wall-clock deadlines, so a fixture child or worker that outlasted the bound on a loaded host failed the test.

Each wait now awaits the signal that owns it: retained ChildProcess close promises registered before the action (stop paths SIGKILL only if the child is still running in finally), pre-registered stdin finish events, worker/child readiness lines written after the fact they announce, fixture receipts with a durable-record fallback for product-owned children, and direct reads where an awaited operation guarantees the state. The managed-service handoff support gains an owned readiness relay, and the triage conflict with main's openclaw#162496 keeps its Bun preload adapter and timer ordering. Fake-clock/real-clock separation in the update tests is preserved. exec-host.native.test-support.ts (macOS-native) and the shared-state admission marker loop (the host blocks inside Worker.postMessage by design) stay unchanged. No product source, test timeout, product timeout, or assertion meaning changed.

Part of the polling audit from openclaw#162274. Proof on Blacksmith Testbox: delay probes fail the original bytes and pass these bytes, forced-abort probes reach cleanup, 20 standalone runs per touched file (triage files re-proven on the resolved head), 3/3 replays of each owning bundle, owning tsgo graphs, type-aware lint, base-aware timeout-race ratchet; Codex autoreview and ClawSweeper clean. The one red check, published-driver-update, hits its 10-minute job budget on every run including hourly main and its introducing PR openclaw#162629; openclaw#162765 owns that fix.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 2, 2026
…claw#162765)

The published-driver update cell rebuilt the candidate inside its own job and overran its ten-minute bound on the 12:46Z main hourly, cancelling the whole run. The cell now consumes the checksummed candidate from the same run's build-artifacts job (explicit digest comparison, portable across GNU and BSD tools), runs the managed update in about five minutes, and reports a command timeout as a job failure naming the active phase instead of cancelling the workflow. Scheduled-main coverage and omission on unrelated PRs are verified by the plan tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling docs Improvements or additions to documentation 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. scripts Repository scripts size: M 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