Skip to content

fix(gateway): isolate wizard exits from shared process - #110382

Closed
TheAngryPit wants to merge 8 commits into
openclaw:mainfrom
TheAngryPit:codex/fix-gateway-wizard-rpc-exits
Closed

TheAngryPit wants to merge 8 commits into
openclaw:mainfrom
TheAngryPit:codex/fix-gateway-wizard-rpc-exits

Conversation

@TheAngryPit

@TheAngryPit TheAngryPit commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #110545

What Problem This Solves

Gateway RPC wizard sessions inherited CLI-owned behavior that does not belong inside a shared host process:

  • setup and channel runners could terminate the Gateway through runtime.exit();
  • remote callers could not state whether setup should install the daemon;
  • cancellation could release or retain ownership while the underlying runner could still mutate setup state;
  • headless Gateway setup loaded the interactive model catalog even though it cannot use that UI path.

In the Windows Companion path, this appeared as a lost Gateway connection during run-wizard. The cancellation race could also allow overlapping setup work or retain a settled cancelled session indefinitely.

This PR:

  • runs setup and channel RPC wizards with createNonExitingRuntime();
  • treats only ExitError(0) as normal completion and preserves nonzero exits as session errors;
  • adds optional installDaemon to WizardStartParamsSchema and forwards true, false, or omission unchanged;
  • retains cancelled wizard ownership until the runner settles;
  • rejects replacement while cancellation cleanup is still running;
  • removes the cancelled session automatically after settlement so a later start can succeed;
  • skips interactive model-catalog loading for headless Gateway setup;
  • keeps skipUi: true and suppressGatewayTokenOutput: true explicit at the RPC boundary.

User impact: remote wizard flows remain inside the shared Gateway process. Cancellation preserves single-wizard ownership until in-flight work settles, then releases it so a later wizard can start.

Non-goals:

  • no dependency or lockfile changes;
  • no provider, credential, permission, model, or workflow changes;
  • no change to CLI-owned wizard exits outside the Gateway RPC wrapper;
  • no new Gateway method;
  • no protocol-train change.

This consolidates and replaces #109412.

Change Type

  • Bug fix
  • Tests / validation
  • Security hardening
  • Feature
  • Dependency change

Scope

  • Gateway wizard RPC lifecycle
  • Setup and channel runner ownership
  • Generated Gateway protocol projection
  • Cancellation and settlement cleanup
  • Providers, credentials, permissions, or channels

Linked Issue / PR

Contract Decision

wizard.start.installDaemon is an optional generated Gateway request field. Omission preserves the existing onboarding default. An explicit boolean lets a trusted remote setup client choose whether that wizard invocation installs the daemon.

This is intentional API ownership, not an accidental implementation detail. Maintainer acceptance of that public request field remains the only open design decision.

Evidence

Exact published head: 71ff15af52e76b129ff295334c7bfa8d9bc2713d

  • GitHub CI: 90 passed, 0 failed, 0 pending, with 31 normal skipped/neutral jobs.
  • Wizard ownership suite: 11/11 passed.
  • Dedicated authenticated Gateway E2E: 1/1 passed.
  • Exact core-test TypeScript project: passed with no diagnostics.
  • Full node scripts/build-all.mjs: passed in 5m27s.
  • Build included package and unified bundles, CLI bootstrap guard, runtime postbuild, 143 plugin SDK export checks, Control UI build, sidecar verification, and performance budgets.
  • Scoped Auto-review for the final code correction: no accepted or actionable findings (patch is correct, confidence 0.97).
  • ClawSweeper patch quality on the preceding production-equivalent head: Platinum 4/6, with no actionable code or security findings.

The one-line change from the reviewed predecessor head to this head is test-only TypeScript mutability cleanup. Production behavior is unchanged.

Real Behavior Proof

Proof level: runtime_proven for the cancellation, settlement, replacement, and same-Gateway lifecycle on exact head 71ff15af52e.

Environment and boundary:

  • disposable Ubuntu 24.04 WSL2 lab;
  • exact Git archive of the published head;
  • exact frozen lockfile, candidate-local dependencies, and full official build;
  • real Gateway in a separate child process;
  • token-authenticated calls through the built public dist/index.js gateway call entrypoint;
  • deterministic proof-only runner settlement controlled outside the Gateway process;
  • isolated temporary home, state, config, workspace, port, and synthetic token;
  • no operator runtime, private data, credentials, channels, providers, or persistent config.

Observed sequence:

  1. The child Gateway started and reached ready.
  2. wizard.start returned a running session.
  3. wizard.cancel returned cancelled.
  4. An immediate replacement was rejected with UNAVAILABLE: wizard already running while the cancelled runner remained unsettled.
  5. After settlement, the cancelled owner was purged.
  6. A later wizard.start succeeded.
  7. Authenticated health succeeded after replacement.
  8. The replacement was cancelled and settled.
  9. Authenticated health succeeded again with the same child PID.
  10. The child Gateway shut down cleanly.

Redacted terminal summary:

{
  "proof": "gateway-separate-process-wizard-cancel-survival",
  "head": "71ff15af52e76b129ff295334c7bfa8d9bc2713d",
  "separateProcess": true,
  "authenticatedRpc": true,
  "replacementBlockedWhileUnsettled": true,
  "cancelledRunnerPurged": true,
  "replacementWizardStarted": true,
  "replacementAttempts": 1,
  "sameGatewayPid": true,
  "rpcHealthyAfterCancel": true
}

Redacted Gateway transcript:

[gateway] starting HTTP server...
[gateway] http server listening (0 plugins)
[gateway] ready
[ws] response error: wizard.start UNAVAILABLE "wizard already running"
[shutdown] completed cleanly in 89ms

Evidence integrity:

  • proof controller SHA-256: 7FCB763241AA976C3C05CFB67A566C5B32029557D605747F10016456C43757F6
  • summary SHA-256: E0889B73579DC2790B6C49AD30B853F63196452EA3ABD140402EE7EFE53C89F5
  • redacted stdout log SHA-256: 1205BF73CDFECB6FC32B8AF14805CE2FA8184AF6FCE9FFA779F0FA0FB628CCFE
  • stderr log SHA-256: 29DFA7B84F233D3663B8403E0A02784D056834FC0EDAFB998541FA329C133BE9
  • teardown readback: no proof controller or proof Gateway process remained.

This proves the requested process boundary. It does not claim official-package, Companion-update, or operator-runtime end-to-end proof.

Failed-First Evidence

  • The first source-CLI harness proved child-process startup but did not preserve a deterministic unsettled interval and its teardown was not bounded.
  • The replacement proof therefore moved to a separate child Gateway with an externally controlled settlement point.
  • Fresh source dependencies required the repository's official build before public CLI RPC could be used.
  • No product code was changed to mask proof-environment failures.

Security Impact

The patch narrows lifecycle authority. An RPC wizard cannot terminate its shared Gateway, and cancellation cannot release single-flight ownership while the runner can still mutate setup state.

No secrets, credentials, permissions, dependencies, or network boundaries change. The optional installDaemon field is limited to the existing trusted Gateway RPC boundary and preserves existing behavior when omitted.

Compatibility / Migration

  • Omitted installDaemon: preserves the current default.
  • Explicit installDaemon: forwards the caller's boolean unchanged.
  • Existing clients: no migration required.
  • Generated Swift and TypeScript projections are covered by current protocol checks.

Review Conversations

  • Fixed the cancellation cleanup defect found by Auto-review.
  • Preserved replacement blocking until the runner settles.
  • Added automatic post-settlement cleanup.
  • Added focused unit and authenticated E2E coverage.
  • Completed exact-head CI.
  • Added exact-head separate-process lifecycle proof.
  • Kept installDaemon explicit as an intentional optional public request field.
  • Maintainer acceptance of the request contract remains pending.

Agent Transcript

Redacted operator and agent timeline
  • The operator kept the fix in OpenClaw Core because the Gateway owns embedded wizard lifecycle; the Windows Companion remains the downstream consumer.
  • Failed-first evidence showed that cancellation could purge an unsettled session once and never retry, retaining ownership indefinitely.
  • The implementation added settlement-backed cleanup while preserving single-wizard ownership until the runner could no longer mutate setup state.
  • Review identified two separate gates: current-head process proof and maintainer acceptance of the optional installDaemon request contract.
  • A broad source-CLI proof path was rejected after it failed to provide deterministic ownership timing and bounded teardown.
  • The final proof used a separately hosted real Gateway, authenticated public CLI RPC, an external settlement controller, and exact-head build provenance.
  • The proof observed rejection while unsettled, cleanup after settlement, later start, same-PID health, and clean shutdown.
  • No operator runtime, private data, credentials, channels, providers, or persistent configuration were used.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Jul 18, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Jul 18, 2026
@clawsweeper

clawsweeper Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 4:59 AM ET / 08:59 UTC.

ClawSweeper review

What this changes

The PR runs Gateway setup and channel wizards with a non-exiting runtime, keeps cancelled sessions owned until their runners settle, skips headless catalog loading, and adds optional wizard.start.installDaemon forwarding.

Merge readiness

⛔ Blocked until real behavior proof is added - 4 items remain

This PR has a coherent, focused fix for the open Gateway wizard lifecycle report, but it is still necessary because current main does not contain the proposed isolation and the latest PR context still lacks the requested current-head process-level proof. It also adds a public optional Gateway request field whose long-term contract needs maintainer acceptance before merge.

Priority: P1
Reviewed head: d31755257816470c0517e848ba29c23546eced51
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch and focused coverage are credible, but the required current-head real behavior proof is still absent and the public request contract remains unaccepted.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: The PR provides focused tests and CI, but its current body still says the final current-head process-level transcript is pending; add redacted terminal output or runtime logs proving cancellation, temporary replacement rejection, settlement cleanup, later start, and uninterrupted Gateway hosting. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR provides focused tests and CI, but its current body still says the final current-head process-level transcript is pending; add redacted terminal output or runtime logs proving cancellation, temporary replacement rejection, settlement cleanup, later start, and uninterrupted Gateway hosting. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Current-main gap: The PR introduces the non-exiting Gateway wrapper and applies it to both setup and channel wizard runners; the supplied diff shows this behavior is not already present on the base branch.
Cancellation ownership design: The branch changes tracker decisions from status-based running checks to runner settlement checks, so a cancelled runner continues to block replacement until it can no longer mutate setup state.
Protocol compatibility surface: The branch adds one optional generated request field, installDaemon, to the closed wizard.start parameter schema; omission is intended to retain current onboarding behavior while explicit booleans are forwarded.
Findings None None.
Security None None.

How this fits together

Gateway RPC lets remote clients drive setup or channel wizards inside a long-running shared Gateway process. The RPC handler validates the request, creates a wizard session, invokes CLI-oriented runners, and returns session progress and completion without allowing the embedded work to end the host process.

flowchart LR
  Client[Remote setup client] --> RPC[Gateway wizard RPC]
  RPC --> Validate[Validate request and project options]
  Validate --> Session[Wizard session ownership]
  Session --> Runner[Setup or channel runner]
  Runner --> Result[Wizard progress and result]
  Result --> Client
  Session --> Host[Shared Gateway stays alive]
Loading

Decision needed

Question Recommendation
Should wizard.start permanently expose the optional installDaemon boolean so trusted remote setup clients can own daemon installation per invocation? Accept the optional request field: Keep installDaemon optional, preserve omitted-call behavior, and require the requested current-head process proof before merging.

Why: The implementation is mechanically small and preserves omission behavior, but it expands the generated Gateway request contract and commits the project to a client-visible lifecycle-control surface.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR provides focused tests and CI, but its current body still says the final current-head process-level transcript is pending; add redacted terminal output or runtime logs proving cancellation, temporary replacement rejection, settlement cleanup, later start, and uninterrupted Gateway hosting. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - wizard.start.installDaemon is a new public Gateway request parameter; although optional, maintainers need to accept whether trusted remote clients should permanently own that daemon-install choice.
  • Resolve merge risk (P1) - Focused tests and CI do not replace the missing current-head process transcript proving cancellation blocks replacement until settlement, then releases it while the same Gateway process remains available.
Agent review details

Security

None.

PR surface

Source +42, Tests +356, Other +4. Total +402 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 5 99 57 +42
Tests 4 361 5 +356
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 4 0 +4
Total 10 464 62 +402

Review metrics

Metric Value Why it matters
Gateway request surface 1 optional request field added wizard.start.installDaemon changes a generated public RPC contract even though existing callers may omit it unchanged.

Stored data model

Persistent data-model change detected: serialized state: src/wizard/session.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #110545
Summary: This PR is the explicit candidate implementation for the open Gateway RPC wizard lifecycle bug; it should remain paired with that issue until merged or replaced.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Accept the API contract and add live lifecycle proof (recommended)
    Keep the optional field only with explicit Gateway API acceptance, then provide a redacted current-head run showing cancellation, blocked replacement, settlement cleanup, successful later start, and a live host.
  2. Narrow the PR to lifecycle isolation
    Remove installDaemon if maintainers do not want a new public request parameter, while preserving the embedded-runtime and session-settlement repair.
  3. Pause pending protocol direction
    Do not merge until an owner decides whether the public daemon-install request belongs in the Gateway contract.

Technical review

Best possible solution:

Keep the lifecycle repair at the Gateway RPC boundary, accept or reject the optional request-field contract explicitly, then land only after a redacted current-head live transcript proves cancellation, settlement cleanup, later restart, and uninterrupted Gateway hosting.

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

No high-confidence current-head live reproduction is included. The source and focused tests make the prior failure mechanism reproducible in code, but the required process-level Gateway transcript remains absent.

Is this the best way to solve the issue?

Unclear. The non-exiting runtime and settlement-backed ownership are the narrow owner-boundary repair, but adding the public installDaemon request field is only the best solution if maintainers accept that Gateway API direction.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P1: The patch addresses a remote onboarding flow in which a wizard can end its shared Gateway host, interrupting real setup and recovery work.
  • merge-risk: 🚨 compatibility: Adding an optional generated Gateway request parameter requires an explicit durable API and client-compatibility decision.
  • merge-risk: 🚨 availability: The changed behavior controls whether an embedded wizard can terminate or continue using the shared Gateway process during setup.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR provides focused tests and CI, but its current body still says the final current-head process-level transcript is pending; add redacted terminal output or runtime logs proving cancellation, temporary replacement rejection, settlement cleanup, later start, and uninterrupted Gateway hosting. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current-main gap: The PR introduces the non-exiting Gateway wrapper and applies it to both setup and channel wizard runners; the supplied diff shows this behavior is not already present on the base branch. (src/gateway/server-methods/wizard.ts:48, d31755257816)
  • Cancellation ownership design: The branch changes tracker decisions from status-based running checks to runner settlement checks, so a cancelled runner continues to block replacement until it can no longer mutate setup state. (src/gateway/server-wizard-sessions.ts:15, d31755257816)
  • Protocol compatibility surface: The branch adds one optional generated request field, installDaemon, to the closed wizard.start parameter schema; omission is intended to retain current onboarding behavior while explicit booleans are forwarded. (packages/gateway-protocol/src/schema/wizard.ts:19, d31755257816)
  • Focused regression coverage: The changed Gateway and wizard-session tests cover zero/nonzero exits, cancellation settlement, replacement blocking, later replacement, and installDaemon projection, but they are not a process-level proof of the shared Gateway remaining alive through the final current-head cancellation sequence. (src/gateway/gateway.test.ts:722, d31755257816)
  • Review continuity: The previous completed ClawSweeper cycle on 6edc1e4 had no code findings and required current-head real behavior proof. The supplied latest body still identifies that exact process-level transcript as pending; the newer d317552 commit adds test coverage rather than visible live proof. (d31755257816)
  • Related canonical bug: The open bug report describes the same Gateway-hosted wizard exit and daemon-ownership problem and explicitly points to this PR as its candidate fix, so the report remains open until this branch is accepted and merged.

Likely related people:

  • CassieMei: All six commits on the reviewed branch, including the final settled-session replacement coverage, are attributed to this author; no current-main feature-history owner could be established from the available read-only evidence. (role: recent lifecycle-change contributor; confidence: low; commits: 0a7017464b07, 96b96ce69b22, 03affbc7709a; files: src/gateway/server-methods/wizard.ts, src/gateway/server-wizard-sessions.ts, src/wizard/session.ts)

Rank-up moves

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

  • Add a redacted current-head process transcript showing cancellation through successful later restart while the same Gateway remains live.
  • Obtain an explicit maintainer decision on whether wizard.start.installDaemon should be a permanent public request field.

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 (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-18T23:34:54.195Z sha 99b121cf54cfe0aef5413739423bf94059e17398 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-18T23:53:08.334Z sha 99b121cf54cfe0aef5413739423bf94059e17398 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-19T00:00:20.233Z sha 99b121cf54cfe0aef5413739423bf94059e17398 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-19T00:14:04.825Z sha 99b121cf54cfe0aef5413739423bf94059e17398 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-25T08:38:59.120Z sha 2edd42450533be9f7a463d55bab41fd16cf319cb :: needs maintainer review before merge. :: none
  • reviewed 2026-07-25T09:58:09.242Z sha 5f696265f98f45a4f821d5065363c0c7a5c45095 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-25T20:29:47.296Z sha 6edc1e40f37b833ec0493ec331eba6cd49db4fb6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-26T02:21:54.987Z sha 6edc1e40f37b833ec0493ec331eba6cd49db4fb6 :: needs real behavior proof before merge. :: none

@TheAngryPit
TheAngryPit force-pushed the codex/fix-gateway-wizard-rpc-exits branch from 79fcd37 to aedfa54 Compare July 18, 2026 09:34
@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Jul 18, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jul 18, 2026
@TheAngryPit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 18, 2026
@TheAngryPit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@TheAngryPit

Copy link
Copy Markdown
Contributor Author

Current-main landing validation for head 99b121cf54cfe0aef5413739423bf94059e17398:

  • Fresh upstream main: 8853217ec72f3b3c357da18ad6b519510f1cfce6
  • Merge base: 5590d7c2809496ff88787bbc404d6548601adac7
  • Divergence: PR 5 commits ahead / main 20 commits ahead
  • PR files: 5; upstream-changed files: 136
  • Only overlapping path: generated apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift
  • Read-only git merge-tree --write-tree exited 0 and produced clean tree d6f834c0084b11bcff281e6de04419dad5f52318
  • The simulated two-parent landing result was archived from tracked files only; archive SHA-256: 96721C4409F27473184730536476AF181E6F34DA365048F3CD8FA0CEF874F7CD
  • Pinned disposable environment: node:24-bookworm@sha256:5711a0d445a1af54af9589066c646df387d1831a608226f4cd694fc59e745059
  • pnpm protocol:check: PASS; TypeScript, Swift, and Kotlin generated outputs remained clean
  • node scripts/run-vitest.mjs src/gateway/server-methods/wizard.test.ts: 7/7 PASS
  • node scripts/run-vitest.mjs src/gateway/gateway.test.ts -t 'runs wizard over ws|reports nonzero wizard exits': 2/2 PASS, 10 unrelated tests skipped
  • No public branch/ref was changed, rebased, or force-pushed; this is current-main merge-result test_proven, not runtime promotion.

@clawsweeper re-review

@TheAngryPit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@TheAngryPit

TheAngryPit commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Fresh current-main merge-result validation

Refreshed after upstream/main advanced, without changing the PR branch.

  • PR head: 99b121cf54cfe0aef5413739423bf94059e17398
  • Current upstream/main: a876451d8bafa8c2bb13f29f9154baa758d65649
  • Clean merge-result tree: f2280c85354f8830e9f1a59a03cba94600f857c9
  • Environment: pinned node:24-bookworm@sha256:5711a0d445a1af54af9589066c646df387d1831a608226f4cd694fc59e745059 in a disposable Crabbox local container

Exact merge-result proof

  • Locked pnpm 11.2.2 install: PASS
  • Supply-chain lockfile policy: PASS (1410 entries)
  • pnpm protocol:check: PASS; generated TypeScript, Swift, and Kotlin outputs remained clean
  • src/gateway/server-methods/wizard.test.ts: PASS (7/7)
  • Focused Gateway WebSocket lifecycle tests: PASS (2/2; 10 unrelated tests skipped)
    • zero exit remained session-scoped and the Gateway stayed connected
    • nonzero exit was reported without terminating the Gateway
  • Scoped Codex Auto-review over the five-file merge-result diff: no accepted/actionable findings, patch is correct, confidence 0.90

The disposable lease crimson-crayfish was released after the run. No public ref was rebased or force-pushed. This is fresh current-main merge-result test_proven; maintainer review and landing remain the final gate.

@TheAngryPit
TheAngryPit force-pushed the codex/fix-gateway-wizard-rpc-exits branch from 99b121c to 452aca1 Compare July 20, 2026 20:00
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 25, 2026
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 26, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 26, 2026
@TheAngryPit
TheAngryPit force-pushed the codex/fix-gateway-wizard-rpc-exits branch from 6edc1e4 to d317552 Compare July 28, 2026 08:54
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jul 28, 2026
@TheAngryPit

TheAngryPit commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Exact-head CI repair

  • Head: 2a3c460c9724934d59aee8f7b62b0b5f8a9e6fc1
  • Root cause: the authenticated cancellation lifecycle E2E pushed the general gateway.test.ts suite past the repository max-lines guard.
  • Repair: moved that test unchanged into dedicated gateway-wizard-cancel.e2e.test.ts; no production behavior, dependency, protocol, or permission change.
  • Fresh local proof: wizard ownership 11/11; official Gateway E2E runner 1/1; max-lines ratchet, production/script/test typechecks, and all oxlint shards passed.
  • Scoped Codex Auto-review: no accepted/actionable findings; patch is correct, confidence 0.94.
  • Fresh exact-head GitHub CI is running. The body no longer claims CI success before completion.

The existing process-level proof and maintainer API-contract gates remain explicit. No manual ClawSweeper command was added; this push/body update uses the normal review queue.

Follow-up: test-type CI repair

  • Exact head: 71ff15af52e76b129ff295334c7bfa8d9bc2713d
  • CI root cause: extracted ENV_KEYS was a readonly tuple, while captureEnv accepts mutable string[] (TS4104).
  • Fix: removed only the unnecessary as const; no production, protocol, dependency, permission, or runtime behavior change.
  • Fresh Linux proof: exact core-test TypeScript project passed; Gateway E2E passed 1/1.
  • Scoped Codex Auto-review: no actionable findings, patch is correct, confidence 0.97.
  • Fresh GitHub check-test-types passed on this exact head. Current checks show no failures; remaining jobs are still in progress.

No manual ClawSweeper command was added; the push/body activity uses the normal review queue.

@openclaw-barnacle openclaw-barnacle Bot added triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 28, 2026
@TheAngryPit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@clawsweeper

clawsweeper Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(gateway): isolate wizard exits from shared process This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete

Copy link
Copy Markdown
Contributor

Thank you, @TheAngryPit — the exit-isolation core landed via #115671, and the settlement-ownership + installDaemon remainder shipped via #115856 with your commits preserved.

@steipete steipete closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Gateway RPC wizard inherits CLI process and service lifecycle

3 participants