Repository navigation
fix(e2e): release lanes fail on a missing scheduler entry and stale service state - #160306
Conversation
Emit the scheduler imported by mounted release Docker clients and guard all Docker client runtime dist references against the configured build outputs. Validation: generic guard fails on the original config; all 33 config tests pass on Blacksmith Testbox. pnpm test wall: 7.73s warm, 31.90s cold worker preparation; test time 192ms. Scoped lint, formatting, scripts/root-test types, and independent review passed.
Reload the lane systemd shim after deleting its unit so a published updater does not see a stale loaded definition. Print both captured service-install streams when setup fails, preserving effective-service admission checks. Validation: reset regression fails on original harness with the real fixture. All 17 systemd fixture tests pass on Blacksmith Testbox; pnpm test wall 13.62s, new case 556ms. Scoped formatting, lint, shell syntax, scripts/root-test types, and independent review passed.
Standalone Doctor can start a stopped service. Use the existing confirmed-shutdown helper before preparing the separate recovery update, preserving restart, auth, and inactive-only start assertions. Validation: all four new recovery cases fail on original harness and pass with the fix, including failed stop, active service, and open listener refusal. All 14 phase tests pass on Blacksmith Testbox; pnpm test wall 1.85s, new cases 15ms. Scoped checks and independent review passed.
|
🦞👀 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 September 28, 2026, 12:54 PM ET / 16:54 UTC (Revision 10). ClawSweeper reviewWhat this changesThe branch repairs Docker module emission, managed-service reset between upgrade lanes, and recovery after Doctor starts a service, with regression tests for those paths. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain Keep open. Current main still lacks these release-harness repairs. Two targeted lanes passed on an earlier branch head, but the complete published-updater first-hop sequence remains unproven. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw release validation builds Docker test clients and runs package upgrades against isolated Gateway service fixtures. The resulting checks inform release readiness. flowchart LR
A[Release package] --> B[Docker build entries]
B --> C[Docker test client]
A --> D[Published updater]
D --> E[Managed service fixture]
E --> F[Upgrade assertions]
C --> F
Before merge
Agent review detailsSecurityNone. PR surfaceTests +156, Other +8. Total +164 across 10 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep release validation tied to the real published-updater path, with the service reset and both subsequent upgrades producing an observable pass or actionable failure. Do we have a high-confidence way to reproduce the issue? Yes for the original defects: current-main source omits the required Docker build entry and service reload, and the reported release run failed in the affected lanes. I did not execute the harness in this read-only review. Is this the best way to solve the issue? Yes. Adding the missing build entry and reusing the existing service lifecycle helper are narrow repairs; the first-hop published-updater result is still needed to establish release-lane behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4f94275e92cc. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
Keep the verified shutdown phase before inference preparation. Model idempotent systemd stop in the prepared-service fixture and include the phase in companion and frozen-target harnesses without changing their auth, membership, restart, or survival contracts. Validation: origin/main passes all 55 targeted tests; original branch reproduces 17 failures. Blacksmith Testbox passes all 898 survivor tests across 42 files, including recovery-phase and cron-seed. Changed-file test walls: mobile 2.33s, parking 7.36s, membership 3.41s. Formatting, shell syntax, focused lint, and independent review pass.
Scan both Docker client roots and resolve each runtime import against its own client URL. This closes the release guard gap for scripts/e2e without adding runtime entries or duplicate tests. Validation: 33 config tests pass on Blacksmith Testbox; pnpm test wall 42.30s with cold worker compilation. Removing the scripts-only runtime-context entry passes the original guard and fails the extended guard. Formatting, scoped oxlint, and independent P2 review pass.
|
CI note: df6ba90 failed only |
|
CI note: ee4d5c7 failed only |
|
CI note for 4cb129a (run 36436336838), recorded as one-off main-side UI e2e failures (none touch this harness PR):
|
|
Merged via squash.
|
…ervice state (openclaw#160306) * fix(e2e): emit scheduler entry for Docker clients Emit the scheduler imported by mounted release Docker clients and guard all Docker client runtime dist references against the configured build outputs. Validation: generic guard fails on the original config; all 33 config tests pass on Blacksmith Testbox. pnpm test wall: 7.73s warm, 31.90s cold worker preparation; test time 192ms. Scoped lint, formatting, scripts/root-test types, and independent review passed. * fix(e2e): reload first-hop service fixture between lanes Reload the lane systemd shim after deleting its unit so a published updater does not see a stale loaded definition. Print both captured service-install streams when setup fails, preserving effective-service admission checks. Validation: reset regression fails on original harness with the real fixture. All 17 systemd fixture tests pass on Blacksmith Testbox; pnpm test wall 13.62s, new case 556ms. Scoped formatting, lint, shell syntax, scripts/root-test types, and independent review passed. * fix(e2e): stop gateway before restart recovery preparation Standalone Doctor can start a stopped service. Use the existing confirmed-shutdown helper before preparing the separate recovery update, preserving restart, auth, and inactive-only start assertions. Validation: all four new recovery cases fail on original harness and pass with the fix, including failed stop, active service, and open listener refusal. All 14 phase tests pass on Blacksmith Testbox; pnpm test wall 1.85s, new cases 15ms. Scoped checks and independent review passed. * test(e2e): stop an inactive fixture service idempotently * test(e2e): align survivor fixtures with recovery shutdown Keep the verified shutdown phase before inference preparation. Model idempotent systemd stop in the prepared-service fixture and include the phase in companion and frozen-target harnesses without changing their auth, membership, restart, or survival contracts. Validation: origin/main passes all 55 targeted tests; original branch reproduces 17 failures. Blacksmith Testbox passes all 898 survivor tests across 42 files, including recovery-phase and cron-seed. Changed-file test walls: mobile 2.33s, parking 7.36s, membership 3.41s. Formatting, shell syntax, focused lint, and independent review pass. * test(e2e): include script clients in dist-entry guard Scan both Docker client roots and resolve each runtime import against its own client URL. This closes the release guard gap for scripts/e2e without adding runtime entries or duplicate tests. Validation: 33 config tests pass on Blacksmith Testbox; pnpm test wall 42.30s with cold worker compilation. Removing the scripts-only runtime-context entry passes the original guard and fails the extended guard. Formatting, scoped oxlint, and independent P2 review pass.
What Problem This Solves
Fixes three release-lane harness bugs that made 2026.9.7 Full Release Validation (release-checks 36381536769) fail independently of the product:
core/agent-bundle-mcp-tools:ERR_MODULE_NOT_FOUND dist/infra/gateway-scheduler.js. refactor(mcp): bind idle cleanup to the lifecycle scheduler #159481 made the Docker client import that module, but the Docker-harness tsdown entries never emitted it.update-first-hop-compat-2026.9.1: after the expected negative-control failure, the lane exited silently.reset_lanedeleted the systemd unit withoutdaemon-reload. Since fix(ci): honor loaded stop policy in upgrade fixtures #160000 the systemd fixture keeps a deleted unit's loaded definition until reload, so the next lane'sopenclaw gateway install --forcewas refused by the published driver, with both streams redirected.update-restart-auth:prepare-recovery-servicerefused because "gateway service is not confirmed inactive". Standalone Doctor legitimately starts a stopped service, and the recovery preparation assumed it was still stopped.User Impact
No product change. Release validation for these lanes exercises the intended update paths again, and a failed service install in the first-hop lane now prints its output instead of exiting silently.
Why This Change Was Made
infra/gateway-schedulerfrom the Docker-harness entries. Add a generic guard that everydist/...import in Docker clients resolves to an emitted entry.systemctl --user daemon-reloadafter lane reset, and print service-install output on failure.stop_update_restart_probe_gateway) before recovery preparation. Restart and auth assertions are unchanged.Evidence
test/scripts/tsdown-runtime-config.test.ts,test/scripts/upgrade-survivor-systemd.test.ts,test/scripts/upgrade-survivor-recovery-phase.test.ts.tbx_01m3kjhk7nrvt60x13ry9ythqp:pnpm test <file> --maxWorkers=1walls 7.7 s warm (31.9 s cold compile, 192 ms tests), 13.6 s, 1.9 s. 64 focused tests passed.pnpm tsgo:scripts,pnpm tsgo:test:root, andgit diff --checkpassed. Independent Codex autoreview is clean through P2.agent-bundle-mcp-tools,update-first-hop-compat-2026.9.1,update-restart-authagainst merged main) follows after landing. The first-hop lanes also depend on the companion update fixes.