Skip to content

fix(daemon): forced reinstall moves an unpinned Bun Gateway service to Node - #160189

Merged
steipete merged 17 commits into
mainfrom
steipete/bun-service-runtime-retention
Sep 28, 2026
Merged

steipete merged 17 commits into
mainfrom
steipete/bun-service-runtime-retention

Conversation

@steipete

@steipete steipete commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Related: #159431

What Problem This Solves

Fixes: openclaw gateway install --force (and the updater's service refresh, which runs it without runtime flags) moves an unpinned Gateway service recorded on Bun to Node. On a Bun-only host it fails with "No supported Node runtime". A first gateway install on a Bun-only host fails the same way.

User Impact

An implicit reinstall now keeps a supported Bun recorded in the managed service, just as it already kept a recorded Node. This covers gateway install --force, node install --force, and the updater's service refresh. Interactive runtime pickers in configure, Doctor's reinstall branch, and onboarding now default to the recorded runtime instead of Node. Explicit --runtime/--runtime-path, pins, and wrappers are unchanged. A recorded runtime that is missing or unsupported still falls back to today's Node selection. A first install on a Bun-only host now also works: with no pin, no recorded runtime, and no supported Node anywhere, an implicit install uses the running supported Bun. It prints a warning and writes no pin. Where a supported Node exists, Node remains the default. QuickStart reports the effective runtime from the completed install plan, so a Bun-only install announces Bun.

Why This Change Was Made

Runtime selection belongs to the service configuration: pin, then the recorded runtime, then the default. The recorded-runtime step only knew Node. A small resolveRecordedDaemonRuntime probes the recorded executable as Bun or Node and never substitutes a discovered runtime. The Gateway and node-host installers and the shared setup resolver use it. The setup resolver passes the recorded runtime to pickers as their default, so an explicit interactive choice still wins. The recorded path is used only when that runtime remains selected. No pin is written, and the pin record, config schema, and service-definition format are unchanged.

This was a follow-up from #159431, which keeps the updater's own children on Bun and relies on the service configuration for the service runtime.

Evidence

Latest QuickStart/CI follow-up: the Bun-only wizard regression failed before the repair because the install selected Bun but the note did not say “QuickStart uses Bun”; it passes after moving the note behind the real install planner. The regression mocks host probes and service installation, while exercising the real wizard service setup and install plan. The generic picker retains its <T> → Promise<T> contract with a method spy, and runtime explicitness uses an explicit undefined comparison.

Focused proof (node scripts/run-vitest.mjs <files> --maxWorkers=1, measured with /usr/bin/time -p):

Selection Test Files / Tests Measured time
setup.finalize.test.ts, gateway-setup-runtime.test.ts, daemon-install-plan.shared.test.ts, daemon-install-helpers.test.ts 4 / 177 passed 337.38s combined wall, including cold worker compilation and cleanup; wizard runner 19.84s, new regression 4.48s
doctor-gateway-daemon-flow.test.ts, doctor-gateway-services.test.ts (required plan-field fixture updates) 2 / 127 passed 93.24s combined wall; runner 66.66s, test execution about 2s
Doctor flow after moving its existing Bun-only regression into test support 1 / 49 passed 96.12s wall; runner 83.16s, test execution under 1s

The oversized Doctor test file now delegates its existing Bun-only regression to its test-support module, preserving its assertions and staying under the lint line limit without a suppression.

The wizard regression needs the real install planner to catch the original ordering defect; no sleeps, polling, timers, or live Gateway boots were added. Targeted oxlint (including gateway-setup-runtime.ts), pnpm tsgo:core, and the exact failing core-test-commands tsgo graph pass; core-test-other, core-test-commands-doctor, core-test-config-cli, and core-test-cli-update also pass. Formatting and git diff --check pass. Final Codex autoreview (high reasoning, P0–P2) is scoped-clean with no accepted/actionable findings. CI run 36400713885 failed on the PR-introduced implicit coercion and generic mock; current main has neither defect.

CI follow-up: run 36405535779 exposed a missing pair of shipped locale keys; Simplified and Traditional Chinese now include the Bun note, and the existing locale-parity suite passes (13 tests, 3.03s wall). The same run inherited ten ACP lifecycle fixture failures from main; main fix ea6bf83e821f4808e081f8ff1ffa30b34414edd7 supplies the missing typed exports, and this branch incorporates it through main 526f67dc6382bae28cb26231b0813ce755521d80.

The published-driver test also hit its 15-second child timeout in that PR run and independently in main run 36405405614 (job 108873060688). A local replay of the original 85-file CLI selection with eight workers reproduced the three driver timeouts, plus a roster integration failure and a pre-bootstrap subprocess timeout (82 files passed, 3 failed; 280.45s wall). The standalone driver suite passes after the main integration, but this is not evidence of a timeout fix; its cause remains unresolved. No timeout, retry, or assertion was weakened.

Post-integration proof: setup.finalize.test.ts, i18n/index.test.ts, gateway-setup-runtime.test.ts, and daemon-cli.update-run.test.ts passed: 4 files / 104 tests, 84.77s combined wall with --maxWorkers=1. The complete PR delta against the incorporated main head received a fresh scoped-clean P0–P2 Codex autoreview. Earlier cancelled CI coverage remains unrun; final exact-head CI is the landing gate.

Original retention regressions, each failing on main and passing on the recorded candidate (node scripts/run-vitest.mjs <file> --maxWorkers=1, wall times include compile and worker startup):

File Passed Wall
src/cli/daemon-cli/install.reinstall.test.ts 30 105.3s
src/cli/node-cli/daemon.test.ts 56 362.1s
src/commands/doctor-gateway-daemon-flow.test.ts 48 106.4s
src/commands/configure.daemon.test.ts 16 145.3s
src/wizard/setup.finalize.test.ts 70 45.3s
src/commands/gateway-setup-runtime.test.ts + non-interactive daemon-install.test.ts 13 23.7s

Covered: an unpinned supported recorded Bun is kept, with its path; a recorded Bun that is unsupported or missing falls back to Node; explicit --runtime node still selects Node; pickers default to the recorded runtime and a different choice drops the recorded path; Doctor's non-interactive fallback and quickstart keep the recorded Bun.

pnpm tsgo:core, pnpm tsgo:test:root, oxfmt, targeted lint, and git diff --check pass. A Codex review (high reasoning, P0–P2) is scoped-clean. Live proof on a Crabbox AWS Ubuntu VM with the OpenClaw Bun fork 1.4.3-canary.1+ddfce5d01. Bun-only users run in a systemd user manager whose mount namespace has no node, npm, npx, or corepack anywhere, plus a private /tmp. Candidates were built on the box from e426c54c and 69c2fa3a. Every service was installed without --runtime-path, so none is pinned.

Cell Result
Before, published 2026.9.6: unpinned Bun service, then gateway install --force --json exit 1, "No supported Node runtime"; the existing Bun service kept running
After (e426c54c): same reinstall, then doctor --fix --non-interactive --yes exit 0 / 0; the service stays on the fork Bun (ExecStart and /proc/<pid>/exe); no pin row; no Node migration proposed
Bun-only first install (69c2fa3a): no service, no Node, gateway install --force --json with no flags exit 0 with the running-Bun fallback warning; the service runs on the fork Bun, healthy; no pin row
R4 — published-driver × candidate refresh (upgrade-compatibility proof) (69c2fa3a): Node visible, unpinned Bun service, published 2026.9.6 runs update --tag <candidate> status: ok. The sampled refresh child was the candidate's gateway install --force --json --update-executor run with no runtime flags, and the Gateway restarted on the fork Bun (new PID), healthy and unpinned.

One observation I could not attribute: after doctor --fix, the Bun Gateway's health probe reported an event-loop CPU advisory. It persisted in a sample 61 seconds later with the other proof Gateways stopped (CPU 1.2–1.3); health still exited 0 and RPC succeeded. The change only selects which runtime path is written, and the service ran on the same Bun either way.

Data-model compatibility proof: the existing R4 published-driver × candidate refresh above demonstrates that the published 2026.9.6 updater refreshes the recorded Bun service and keeps it on Bun. This service is unpinned (no --runtime-path and no pin row), which exercises the retention bug directly. No schema changes or migrations are made: the pin record, config schema, and persisted service-definition format are unchanged, and no pin is written for a retained or fallback runtime. The effective runtime returned by the install plan is in-memory metadata for the wizard note.

Forced reinstall already retained a supported Node recorded in the managed
service, but an unpinned service recorded on Bun fell back to Node. On a
Bun-only host that made every implicit reinstall, including the updater's
own service refresh, fail; with Node present it silently moved the service
to Node.

Implicit `gateway install` and `node install` now retain a supported recorded
Bun or Node executable. Interactive runtime pickers (configure, Doctor's
reinstall branch, onboarding) default to the recorded runtime and use its
path only when it stays selected; flows without a picker retain it directly.
Explicit --runtime/--runtime-path, pins, wrappers, and the fallback for a
missing or unsupported recorded runtime are unchanged. No pin is created.
@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.

@steipete
steipete marked this pull request as ready for review September 28, 2026 06:02
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes commands Command implementations size: M labels Sep 28, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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, 2:35 PM ET / 18:35 UTC (Revision 15).

ClawSweeper review

What this changes

The branch makes implicit Gateway and node-host installs retain a supported recorded Bun runtime, uses a supported running Bun when no Node is available, and updates setup, Doctor, QuickStart text, docs, and tests.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open. Current main still retains only a recorded Node executable during implicit Gateway reinstall. The merged related PRs address distinct updater, pin, and split-root behavior; this PR remains necessary. The earlier QuickStart finding is fixed, and the recorded published-driver upgrade cell addresses the prior compatibility question.

Priority: P1
Reviewed head: c7cc71e403d94644ce1e165a91385054beece95c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has focused boundary coverage and useful live upgrade proof, with no discrete correctness finding in the reviewed diff.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The changed service installer is exercised by the PR body's live Ubuntu before/after reinstall and Bun-only first-install observations. Its published-2026.9.6-driver × candidate refresh shows an unpinned Bun Gateway restarting healthy on Bun with a new PID. No stored schema, pin-record, or service-definition format changes are introduced, so data-model migration is not applicable.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The changed service installer is exercised by the PR body's live Ubuntu before/after reinstall and Bun-only first-install observations. Its published-2026.9.6-driver × candidate refresh shows an unpinned Bun Gateway restarting healthy on Bun with a new PID. No stored schema, pin-record, or service-definition format changes are introduced, so data-model migration is not applicable.
Evidence reviewed 11 items Current-main gap: Current main checks whether the recorded executable is Node and probes only that Node path. It does not retain a recorded Bun executable on implicit reinstall.
Recorded-runtime selection: The introduced helper classifies the recorded executable as Bun or Node and probes that exact path before it can be retained.
Bun-only fallback boundary: The shared planner selects the running Bun only after implicit Node discovery fails and the Bun capability probe succeeds; explicit choices, pins, and wrappers bypass this fallback.
Findings None None.
Security None None.

How this fits together

Gateway and managed node-host installation turns CLI options, saved service commands, and runtime pins into native service definitions. Update refresh, Doctor, configure, and onboarding use that path to choose the executable that starts the service.

flowchart LR
  A[CLI updater or setup] --> B[Options pin and saved service]
  B --> C[Runtime selection]
  C --> D[Capability probe]
  D --> E[Install plan]
  E --> F[Managed service]
Loading

Before merge

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

Security

None.

PR surface

Source +114, Tests +580, Docs +23. Total +717 across 30 files.

View PR surface stats
Area Files Added Removed Net
Source 15 184 70 +114
Tests 11 609 29 +580
Docs 4 28 5 +23
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 30 821 104 +717

Review metrics

Metric Value Why it matters
Code growth by role production net +114; tests net +580; docs net +23 Production growth connects runtime selection across existing install entry points; the added tests cover those boundaries.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-gateway-daemon-flow.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep runtime choice with the shared service installer so update refresh and setup consume the same probed decision and existing runtime-pin contract.

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

Yes. Current-main source still selects only a recorded Node executable, and the PR body records the published-version failure on an unpinned Bun service. I did not execute current main.

Is this the best way to solve the issue?

Yes. The branch uses the existing service planner and runtime capability probes while preserving explicit runtime choices and pins; an explicit runtime-path pin is a workaround for one service, not a repair for implicit refresh.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against eadee73a325e.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: Implicit service refresh can fail on a Bun-only host and can move an unpinned Bun Gateway to Node when Node is present.
  • merge-risk: 🚨 compatibility: Implicit service runtime selection affects existing installations during refresh; the recorded published-driver upgrade cell covers the reported unpinned Bun path.
  • 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 (live_output): The changed service installer is exercised by the PR body's live Ubuntu before/after reinstall and Bun-only first-install observations. Its published-2026.9.6-driver × candidate refresh shows an unpinned Bun Gateway restarting healthy on Bun with a new PID. No stored schema, pin-record, or service-definition format changes are introduced, so data-model migration is not applicable.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed service installer is exercised by the PR body's live Ubuntu before/after reinstall and Bun-only first-install observations. Its published-2026.9.6-driver × candidate refresh shows an unpinned Bun Gateway restarting healthy on Bun with a new PID. No stored schema, pin-record, or service-definition format changes are introduced, so data-model migration is not applicable.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • darkamenosa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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.

History

Review history (14 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-28T09:53:43.653Z sha 53746be :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T10:16:50.092Z sha 2d28f0f :: blocked before merge. :: none
  • reviewed 2026-09-28T11:27:05.738Z sha 509d8a7 :: blocked before merge. :: none
  • reviewed 2026-09-28T13:14:04.575Z sha d00b061 :: blocked before merge. :: none
  • reviewed 2026-09-28T14:33:19.617Z sha 8f289f9 :: blocked before merge. :: none
  • reviewed 2026-09-28T15:58:54.502Z sha 357ef4a :: blocked before merge. :: none
  • reviewed 2026-09-28T17:13:04.711Z sha 3c5906e :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T18:17:55.654Z sha 829eb52 :: blocked before merge. :: none

Fall back only after implicit Node discovery finds no supported executable, and require the existing capability probe to approve the running Bun. Carry explicit runtime intent through shared service planning, retain pins/wrappers/recorded runtimes, and never persist the fallback as a pin.

Validation: 250 distinct focused tests passed across nine files (164 tests in 39.70s; 100 in 20.85s, with overlapping regression coverage). The registered install regression failed before the fix. Both tsgo:core and tsgo:test:root, changed-file oxfmt, git diff --check, and scoped P2 Codex autoreview passed. No CI reruns were requested.
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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: 🦞 diamond lobster Very strong PR readiness with only minor 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 added proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Sep 28, 2026
… fallback

Compute the setup suggestion before configure, Doctor, or advanced onboarding
prompts, using the shared Bun-only discovery policy. Treat picker results and
pins as explicit runtime intent so selecting unavailable Node fails before
service replacement. Retain recorded runtime paths, preserve quickstart's
implicit fallback, and keep automatic choices unpinned.

Doctor uses the same suggestion for its non-interactive runtime fallback.
Service-install consent and update deferral remain unchanged. No state or
runtime-pin migration is needed.

Validation: the configure regression reached installation before the fix and
now fails with the existing unavailable-Node diagnostic before install.
164 tests passed across six focused files in 218.77s wall, including cold
compiler preparation; the commands shard passed 85 tests in 22.04s and the
onboarding shard passed 70 tests in 12.36s. tsgo:core (18.83s),
tsgo:test:root (67.31s), changed-file oxfmt, git diff --check, and scoped P2
Codex autoreview passed. No CI runs were dispatched or retried.

Addresses the interactive runtime selection finding on #160189.
@clawsweeper clawsweeper Bot removed the rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. label Sep 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Refreshed onto main 6d6ea35f76165921cc05951ab99cddbea221dc41; new head: d00b061eb340f986cf1a8e33de5f7af9d29e20cf.

The sole conflict was the Bun compatibility history table. Both parents' rows are preserved verbatim in newest-first chronological order. There were no source conflicts.

Validation: git diff --check, staged diff check, exact preservation of every table row, and MDX checks for the two overlapping docs passed. Local autoreview completed all nine passes with no actionable P0–P2 findings.

Focused tests passed: 11 files, 347 tests across three Vitest shards. Measured --maxWorkers=1 wall time: 123.65 seconds, including the cold worker build.

node scripts/run-vitest.mjs src/cli/daemon-cli/install.reinstall.test.ts src/cli/daemon-cli/install.wrapper.integration.test.ts src/cli/node-cli/daemon.test.ts src/commands/configure.daemon.test.ts src/commands/daemon-install-plan.shared.test.ts src/commands/doctor-gateway-daemon-flow.test.ts src/commands/doctor-gateway-services.test.ts src/commands/gateway-setup-runtime.test.ts src/commands/node-daemon-install-helpers.test.ts src/wizard/setup.finalize.test.ts src/wizard/i18n/index.test.ts --maxWorkers=1

This is a branch refresh only; the PR remains open for review.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor Author

CI run 36426405305, attempt 1, failed in checks-ui-e2e (7/9) (job 108942764840): ui/src/e2e/appearance-control-layout.e2e.test.ts → “keeps accent and theme controls accessible across responsive layouts”. The assertion at line 97 reports AssertionError: expected 1 to be 3 // Object.is equality while measuring theme-grid columns after a viewport resize. Results: 79 files / 376 tests passed, one file / one test failed; 15 sibling jobs were cancelled.

The test uses a mock Gateway and exercises Control UI layout; this PR touches neither the failing test nor the UI, stylesheet, or QA harness code it exercises. Main recurrence is not established; recent successful main push runs do not provide full-suite evidence. Under the coordinator's unrelated-flake policy, one failed-job rerun is authorized once this attempt completes. A repeat failure will stop landing; a passing rerun would not establish a fix.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Refreshed onto main after #159431. New head: 8f289f99811aa2aba4712bb07a853b850d0f0d4e (merge parent 670415932ee7dc54d3d59c2e00870f55ed54004c, verified with Git ancestry).

The merge completed without conflicts. All Bun compatibility table rows from both parents are preserved verbatim and in their existing order; both sides' Doctor documentation is retained. No source resolution was needed.

Validation: git diff --check, the two affected docs' MDX check, and a fresh Codex autoreview through P2 passed. Focused tests using node scripts/run-vitest.mjs src/cli/update-cli/node-runner.test.ts src/cli/update-cli/update-command-service-plan.test.ts src/commands/gateway-setup-runtime.test.ts --maxWorkers=1 passed: 3 Test Files, 61 tests, 54.83s wall. No new tests were added by this refresh. Changelog remains release-owned. This refresh does not land the PR.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

steipete commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

CI run 36435979350 attempt 1, job 108974878799 (checks-ui-e2e (1/9)), failed two mocked-Gateway UI cases:

  • ui/src/e2e/chat-flow.sidebar-presentation.e2e.test.ts: “replaces an intermediate running subtitle with the unread final digest” — AssertionError: expected [ { …(3) } ] to have a length of +0 but got 1 in expectRequestCountStable (chat-flow.test-support.ts:111, caller line 239).
  • ui/src/e2e/session-owner-filter-keyboard.e2e.test.ts: “navigates session filters and display controls with Tab, arrows, Space, and Escape” — Error: expect(locator).toBeFocused() failed; owner picker was inactive after 5000ms.

The job log was fetched once: 77 files / 364 tests passed, 2 files / 2 tests failed. Both tests and the browser UI, Gateway-client, and mock harness code they exercise are untouched by this PR; neither flow invokes daemon installation or wizard runtime selection. The same failures on current main are not established. Under the coordinator's unrelated-flake policy, requesting one failed-job rerun after attempt completion; either repeated failure stops landing. A passing replay would not establish a fix, and cancelled coverage remains unrun until the rerun completes.

Cutoff update (14:59 UTC): attempt 2 is in progress on unchanged head 8f289f99811aa2aba4712bb07a853b850d0f0d4e: 30 jobs running, 138 retained successful, 20 skipped. The original UI shard replay is job 108983637544 and is still running; no repeated failure has been observed. The required openclaw/ci-gate is pending; dependency and security-sensitive reviews pass. The PR remains mergeable and unmerged. Native review initialization, checkouts, guard, and artifact validation completed; fresh local autoreview is scoped-clean through P2. Review stays NEEDS WORK pending CI; preparation and merge have not started. Stopping at the work-order reporting deadline; the single authorized rerun remains active.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Refreshed head: 357ef4a05479cf14ddb789160e2c33b740842322. The conflict-free merge of main includes Control UI fixes f03d64f6a56e and 6b9da9dc028; all documentation history rows are preserved. Fresh full-candidate Codex autoreview found no actionable P0–P2 findings. The overlapping wizard suite passed with node scripts/run-vitest.mjs src/wizard/setup.finalize.test.ts --maxWorkers=1: 1 Test File / 51 tests passed, 28.64s measured wall. Both diff checks pass.

The previously resolved interactive-runtime and QuickStart effective-runtime findings remain fixed. The PR body's R4 published-driver × candidate refresh supplies upgrade compatibility proof; no persisted schema or service-definition format changes are introduced. Exact-head CI is pending.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

CI run 36446914644, attempt 1, head 357ef4a05479cf14ddb789160e2c33b740842322: checks-ui-e2e (6/9) job 109012315197 failed in ui/src/e2e/chat-flow.navigation-presentation.e2e.test.ts:94, “coalesces persisted same-session split panes during cold startup”: AssertionError: expected [] to have a length of 1 but got +0 for gateway.getRequests("chat.startup"). The shard passed 78 other files / 365 tests.

The test uses the browser mock Gateway and UI history/loading state. The failing file, UI history/request owners, mock Gateway, and shared harness are untouched by this PR; daemon service installation and wizard runtime selection are not exercised. chatLoading can become true before the startup request is sent. Recurrence on current main is not established, and no timing fix is claimed. The failed log is retained; sibling cancellations are unrun coverage. Under the coordinator-authorized unrelated-flake policy, requesting one failed-job rerun of this run. If this test fails again, stop without another rerun.

@steipete

Copy link
Copy Markdown
Contributor Author

CI note for head 357ef4a0: run 36446914644 attempt 2 (the rerun for attempt 1's cold-start split-pane UI flake, which passed) failed one different Control UI e2e test this PR does not touch: ui/src/e2e/chat-session-companion-focus.e2e.test.ts › "submits a side question and focuses its composer with panel open=false" (31.8 s timeout, job 109018134843). This PR changes daemon runtime selection, the Doctor gateway-daemon flow, and wizard QuickStart text only, so that test gets one rerun (attempt 3). A repeat failure of it stops the landing.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Refreshed head: 3c5906eb87559b0c9bc22ced968b8b2b1fda2be0. The conflict-free merge of main f010fc0b579071d151e8f4e4084a40ac0b219057 includes the UI readiness fixes f03d64f6a56e and e256cbef8ae, export-collision fix 385ac2893544, and planner test-cost fix 714c2c6baa8f.

All compatibility-table rows from both parents are preserved verbatim and in order. Dependency files match main exactly after pnpm install --no-frozen-lockfile --prefer-offline. Fresh full-candidate Codex autoreview is scoped-clean through P2. The overlapping node-service suite passed with node scripts/run-vitest.mjs src/cli/node-cli/daemon.test.ts --maxWorkers=1: 1 Test File / 56 tests, 130.83s measured wall, including compilation and cleanup. Doctor docs MDX and both diff checks pass. No tests were added by this refresh.

The interactive-runtime and QuickStart effective-runtime findings remain resolved. R4 in the PR body retains the published-driver upgrade proof. Historical unrelated CI failures and reruns remain recorded; the side-chat readiness failure is addressed by incorporated main fix e256cbef8ae. Exact-head CI is pending; changelog remains release-owned.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Sep 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

CI note for head 3c5906eb: run 36455767692 attempt 1 failed one Control UI e2e test this PR does not touch: ui/src/pages/workboard/workboard.e2e.test.ts › "persists Workboard create, edit, running move, lifecycle sync, reload, and read-only state" (expected +0 to be 1, job 109045058515). This PR changes daemon runtime selection, the Doctor gateway-daemon flow, and wizard QuickStart text only, so that test gets one rerun. A repeat failure stops the landing.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Refreshed head: 829eb524c961eb7eeca4a745953827869f52d59c, incorporating main d0be0545c44ec3f87486f5f9ff1ba5d3016d4c3e and split-root Bun routing #160495. The sole source conflict preserved main's temporary-directory tracker, Bun-pin setup and assertions alongside all eight runtime-retention cases. All compatibility-table rows from both parents remain verbatim and in order. Package and lock files have no delta against main.

Post-resolution proof: node scripts/run-vitest.mjs <all 10 touched daemon/wizard test files> --maxWorkers=1 passed 10 Test Files / 315 tests, 95.23s measured wall. Counts: reinstall 31, wrapper integration 9, node daemon 56, configure 17, shared install plan 10, Doctor flow 49, Doctor services 78, setup runtime 9, node install helpers 5, wizard finalize 51. Formatting and git diff --check pass. Fresh full-candidate Codex AutoReview against incorporated main is scoped-clean through P2.

Main includes the side-chat readiness fix e256cbef8ae, the earlier UI fix f03d64f6a56e, export-collision fix 385ac2893544, planner test-cost fix 714c2c6baa8f, and ACP/Doctor harness repairs. Prior CI and unrelated-flake reruns remain historical evidence; the new head's CI is the landing gate. The QuickStart runtime finding remains resolved by reading the completed install plan's effective runtime.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor Author

CI run 36463375406 attempt 1, head 829eb524c961eb7eeca4a745953827869f52d59c, failed check-test-types-core-4 (job 109067909179): src/gateway/session-row-projection.config-commits.test.ts(76,49): error TS2741: Property 'scheduler' is missing. This deterministic inherited fixture error is unrelated to the runtime-retention diff; no flake rerun was requested.

Main already fixed the fixture in 4bd105408ccdac229eee8f719f082ba143f0c26c. Incorporated main f9cb2891ed05f892d75482d3b12a708232752c43 without conflicts and pushed c7cc71e403d94644ce1e165a91385054beece95c. The exact Gateway-root typecheck passes (11.05s wall); the complete config-commit projection test passes (1 Test File / 1 test, 74.01s wall, --maxWorkers=1). Fresh full-candidate Codex AutoReview is scoped-clean through P2. The earlier 10-file / 315-test daemon/wizard proof remains recorded; this second merge did not change those PR files. Current-head CI and review remain required.

ClawSweeper revision 14 reviewed the preceding head with no actionable code findings and explicitly resolved QuickStart. Its recurring “Add data-model compatibility proof” checkbox is already addressed by R4 in the PR body, which the review itself acknowledges; the emitted review state nevertheless remains blocked.

@steipete

Copy link
Copy Markdown
Contributor Author

Data-model compatibility checklist for head c7cc71e403d94644ce1e165a91385054beece95c: this PR changes no schema, config format, runtime-pin record, or persisted service-definition format. It reads the existing recorded service runtime and existing runtime pin to preserve the selected Bun runtime during service refresh; explicit runtime choices and pins retain precedence. No migration or backfill is needed, and retaining a recorded runtime writes no new pin.

Upgrade compatibility is demonstrated by live R4 in the PR body: the published 2026.9.6 updater refreshes the candidate service with no runtime flags, and the Gateway restarts healthy on Bun with a new PID. For precision, R4's service is unpinned, with Bun recorded in its existing service definition; this directly exercises the retention bug. The accompanying R0/R1/R3 evidence covers the published before-failure, successful retained-runtime reinstall/Doctor flow, and Bun-only first install. Those live cells plus the focused regression coverage answer the generic data-model compatibility checklist item.

@steipete
steipete merged commit 47646aa into main Sep 28, 2026
228 checks passed
@steipete
steipete deleted the steipete/bun-service-runtime-retention branch September 28, 2026 19:26
@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
…o Node (openclaw#160189)

* fix(daemon): keep a supported recorded Bun on implicit service reinstall

Forced reinstall already retained a supported Node recorded in the managed
service, but an unpinned service recorded on Bun fell back to Node. On a
Bun-only host that made every implicit reinstall, including the updater's
own service refresh, fail; with Node present it silently moved the service
to Node.

Implicit `gateway install` and `node install` now retain a supported recorded
Bun or Node executable. Interactive runtime pickers (configure, Doctor's
reinstall branch, onboarding) default to the recorded runtime and use its
path only when it stays selected; flows without a picker retain it directly.
Explicit --runtime/--runtime-path, pins, wrappers, and the fallback for a
missing or unsupported recorded runtime are unchanged. No pin is created.

* fix(daemon): use the running Bun when a Bun-only host has no Node

Fall back only after implicit Node discovery finds no supported executable, and require the existing capability probe to approve the running Bun. Carry explicit runtime intent through shared service planning, retain pins/wrappers/recorded runtimes, and never persist the fallback as a pin.

Validation: 250 distinct focused tests passed across nine files (164 tests in 39.70s; 100 in 20.85s, with overlapping regression coverage). The registered install regression failed before the fix. Both tsgo:core and tsgo:test:root, changed-file oxfmt, git diff --check, and scoped P2 Codex autoreview passed. No CI reruns were requested.

* fix(daemon): keep an interactive runtime choice ahead of the Bun-only fallback

Compute the setup suggestion before configure, Doctor, or advanced onboarding
prompts, using the shared Bun-only discovery policy. Treat picker results and
pins as explicit runtime intent so selecting unavailable Node fails before
service replacement. Retain recorded runtime paths, preserve quickstart's
implicit fallback, and keep automatic choices unpinned.

Doctor uses the same suggestion for its non-interactive runtime fallback.
Service-install consent and update deferral remain unchanged. No state or
runtime-pin migration is needed.

Validation: the configure regression reached installation before the fix and
now fails with the existing unavailable-Node diagnostic before install.
164 tests passed across six focused files in 218.77s wall, including cold
compiler preparation; the commands shard passed 85 tests in 22.04s and the
onboarding shard passed 70 tests in 12.36s. tsgo:core (18.83s),
tsgo:test:root (67.31s), changed-file oxfmt, git diff --check, and scoped P2
Codex autoreview passed. No CI runs were dispatched or retried.

Addresses the interactive runtime selection finding on openclaw#160189.

* fix(gateway): report the effective QuickStart service runtime

* fix(wizard): translate the QuickStart Bun runtime note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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