Skip to content

fix(e2e): release lanes fail on a missing scheduler entry and stale service state - #160306

Merged
steipete merged 12 commits into
mainfrom
fix/release-lane-harnesses
Sep 28, 2026
Merged

steipete merged 12 commits into
mainfrom
fix/release-lane-harnesses

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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:

  • Docker release-path 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_lane deleted the systemd unit without daemon-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's openclaw gateway install --force was refused by the published driver, with both streams redirected.
  • update-restart-auth: prepare-recovery-service refused 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

  • Emit infra/gateway-scheduler from the Docker-harness entries. Add a generic guard that every dist/... import in Docker clients resolves to an emitted entry.
  • Run a checked systemctl --user daemon-reload after lane reset, and print service-install output on failure.
  • Stop the service through the existing verified-shutdown helper (stop_update_restart_probe_gateway) before recovery preparation. Restart and auth assertions are unchanged.

Evidence

  • Six new regression cases, each failing on the original code: test/scripts/tsdown-runtime-config.test.ts, test/scripts/upgrade-survivor-systemd.test.ts, test/scripts/upgrade-survivor-recovery-phase.test.ts.
  • Testbox tbx_01m3kjhk7nrvt60x13ry9ythqp: pnpm test <file> --maxWorkers=1 walls 7.7 s warm (31.9 s cold compile, 192 ms tests), 13.6 s, 1.9 s. 64 focused tests passed.
  • Formatting, shell syntax, scoped lint, pnpm tsgo:scripts, pnpm tsgo:test:root, and git diff --check passed. Independent Codex autoreview is clean through P2.
  • Exact-lane proof (targeted agent-bundle-mcp-tools, update-first-hop-compat-2026.9.1, update-restart-auth against merged main) follows after landing. The first-hop lanes also depend on the companion update fixes.

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.
@clawsweeper

clawsweeper Bot commented Sep 28, 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 scripts Repository scripts size: S labels Sep 28, 2026
@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 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 28, 2026, 12:54 PM ET / 16:54 UTC (Revision 10).

ClawSweeper review

What this changes

The 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 provenance

Possible 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
Reviewed head: 3b44a57477ab7e9363e42433f204d7f6dd165458

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch and regressions are convincing, while real-lane proof covers only two of the three affected paths.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 7 items Docker client dependency: The OpenClaw Docker test client imports the Gateway scheduler from a built dist path. This establishes the build-entry requirement within the target repository.
Introduced harness repairs: The pinned base-to-head diff adds the scheduler build entry, reloads the deleted service fixture, and invokes the existing verified-stop helper before recovery preparation.
Current main still needs the change: At fetched main, the Docker harness entries omit the scheduler, and first-hop reset removes the unit without daemon-reload.
Findings None None.
Security None None.

How this fits together

OpenClaw 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
Loading

Before merge

  • Resolve merge risk (P1) - The first-hop lane may still stop after its negative control or fail service reinstall under a published updater; no complete published-driver × candidate run demonstrates both positive upgrade hops.
  • Complete next step (P2) - Capture the complete published-driver × candidate first-hop result through negative control, service reinstall, and both positive upgrades.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Tests +156, Other +8. Total +164 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 7 168 12 +156
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 9 1 +8
Total 10 177 13 +164

Review metrics

Metric Value Why it matters
Tooling and test growth tooling +9/−1 lines; tests +168/−12 lines The small tooling change has focused regression coverage, while the first-hop end-to-end result remains to be shown.

Stored data model

Persistent data-model change detected: migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/run.sh. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Prove the complete first hop (recommended)
    Capture a source-pinned published-updater run that passes the negative control, service reinstall, and both positive upgrades before merging.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded release-validation harness repair without a demonstrated user-facing runtime outage.
  • merge-risk: 🚨 automation: The changed build and service fixtures control release-lane results, and the complete first-hop path has not yet been observed after the repair.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

What I checked:

  • Docker client dependency: The OpenClaw Docker test client imports the Gateway scheduler from a built dist path. This establishes the build-entry requirement within the target repository. (test/e2e/qa-lab/runtime/agent-bundle-mcp-tools-docker-client.ts:18, 3b44a57477ab)
  • Introduced harness repairs: The pinned base-to-head diff adds the scheduler build entry, reloads the deleted service fixture, and invokes the existing verified-stop helper before recovery preparation. (scripts/e2e/lib/upgrade-survivor/update-first-hop-compat.sh:227, 3b44a57477ab)
  • Current main still needs the change: At fetched main, the Docker harness entries omit the scheduler, and first-hop reset removes the unit without daemon-reload. (tsdown.config.ts:508, 4f94275e92cc)
  • First-hop contract: The first-hop script runs an expected negative control before reinstalling the service and checking positive upgrade hops. (scripts/e2e/lib/upgrade-survivor/update-first-hop-compat.sh:230, 3b44a57477ab)
  • Targeted lane observations: The earlier branch head f8d1bcc passed targeted agent-bundle-mcp-tools and update-restart-auth Docker jobs in runs 36409504656 and 36409508329. Those runs do not exercise first-hop compatibility. (f8d1bcc8ee7e)
  • Remaining proof gap: The PR body says exact first-hop lane proof follows after landing. The previous completed ClawSweeper review specifically requested a complete published-updater run through negative control, reinstall, and both positive hops; the captured discussion supplies no later result. (8d3bc08cc9cc)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RoboClaw: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a linked, source-pinned first-hop run covering negative control, service reinstall, and both positive upgrade hops.

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.

History

Review history (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-28T09:26:57.648Z sha 85d9a4b :: blocked before merge. :: [P2] Cover script-side Docker clients in the dist guard
  • reviewed 2026-09-28T10:14:19.264Z sha de7b927 :: blocked before merge. :: [P2] Cover script-side Docker clients in the dist guard
  • reviewed 2026-09-28T10:30:04.396Z sha f8d1bcc :: blocked before merge. :: none
  • reviewed 2026-09-28T11:30:02.474Z sha df6ba90 :: blocked before merge. :: none
  • reviewed 2026-09-28T13:28:27.155Z sha cce21d1 :: blocked before merge. :: none
  • reviewed 2026-09-28T13:52:00.631Z sha ee4d5c7 :: blocked before merge. :: none
  • reviewed 2026-09-28T14:37:17.505Z sha 4cb129a :: blocked before merge. :: none
  • reviewed 2026-09-28T16:32:42.189Z sha 8d3bc08 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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 28, 2026
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.
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 28, 2026
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.
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

CI note: df6ba90 failed only test/scripts/run-node-lifecycle.test.ts > preserves native watch signal loss while a private-pipe worker survives ("Native signal fixture still owns processes"), which this PR does not touch. Re-running the failed job once. Pre-merge lane proof from this branch: agent-bundle-mcp-tools (run 36409504656) and update-restart-auth (run 36409508329) both passed. The ci-changed-node-test-plan timeout that blocked earlier heads is being fixed at its owner separately.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

CI note: ee4d5c7 failed only src/logging/diagnostic-heap-profile.test.ts > attributes retained allocations and opt-in collected allocations within the byte cap (shard core-runtime-infra-process), which this harness PR does not touch. One recorded rerun of that job.

@steipete

Copy link
Copy Markdown
Contributor Author

CI note for 4cb129a (run 36436336838), recorded as one-off main-side UI e2e failures (none touch this harness PR):

  • checks-ui-e2e (5/9): ui/src/e2e/chat-flow.sidebar-presentation.e2e.test.ts > replaces an intermediate running subtitle …
  • checks-ui-e2e (6/9): ui/src/e2e/session-owner-filter-keyboard.e2e.test.ts > navigates session filters and display controls with Tab, arrows, Space, and Esc
  • checks-ui-e2e (7/9): ui/src/e2e/model-catalog-partial-refresh.e2e.test.ts > keeps usable effort controls when the selected …
    The remaining failure is test/scripts/ci-changed-node-test-plan.integration.test.ts > retains every PR-exempt file… (137 s vs 120 s on hosted runners), being fixed at its owner separately; one gh run rerun --failed will follow together with that fix.

@steipete steipete self-assigned this Sep 28, 2026
@steipete
steipete merged commit c7ff009 into main Sep 28, 2026
185 checks passed
@steipete
steipete deleted the fix/release-lane-harnesses branch September 28, 2026 17:41
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts 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