Repository navigation
fix(ci): reuse candidate artifacts for published-driver updates - #162765
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: blocked before merge. Reviewed October 1, 2026, 10:37 AM ET / 14:37 UTC. ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherThe 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]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +108, Docs +8, Config +68, Other +4. Total +188 across 8 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…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.
|
Landed (squash |
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.
…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.
…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.
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-artifactsalready 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-buildpacker 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.shacheckout,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
timeoutbounds 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 on1c95e958d9200cabc659650ea2fdd863cad573bc.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.pnpm build:ci-artifactsopenclaw updatewithin that cellThe 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:
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.tstook 188.198s of test time andci-git-owner.test.tstook 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 andgit diff --checkpassed. 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.ymlis 409,974 bytes, below the 480,000-byte guard. Auto-merge is off.