Repository navigation
fix: preserve chat inputs and steering across restarts - #176587
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 340c5e66b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f14b6db5f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs changes before merge. What this changesThis PR recovers accepted chat inputs after Gateway restarts and waits for durable transcript persistence before acknowledging steering. Example: A Gateway accepts CHAT_UPDATE_1, then receives SIGKILL before processing it.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this PR addresses a real recovery gap and resolves the prior findings, but its current-head authority regression now fails in CI and needs diagnosis. Priority: P1 Before merge
FindingsNone. Agent review detailsHow this fits togetherGateway chat admission persists accepted inputs in SQLite; startup recovery restores eligible requests through normal authorization and session execution while the browser reconciles receipts. flowchart TD
A[Chat clients] --> B[Gateway admission]
B --> C[SQLite pending inputs]
C --> D[Startup recovery]
D --> E[Current operator and session authority]
E --> F[Session controller]
F --> G[Transcript and model execution]
C --> H[Browser receipt reconciliation]
Technical reviewBest possible solution: Retain the shared recovery owner and authority-backed replay, then resolve the current-head validation failure before landing. Do we have a high-confidence way to reproduce the issue? Current main visibly excludes ordinary chat inputs from startup replay; the supplied cold-process SIGTERM/SIGKILL scenarios exercise the repaired path, and this review ran no target code. Is this the best way to solve the issue? The change uses the existing pending-input, authorization and session-controller owners, removes browser replay competition, and preserves documented exclusions without another queue or schema. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7e47eab3124a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (6 earlier review cycles)
Reviewed October 19, 2026, 8:07 AM ET / 12:07 UTC (Revision 7). |
|
71b1eaa to
950e5f7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 950e5f7af7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
950e5f7 to
82fbfa5
Compare
Authenticated backend and shared-token connections now share the durable Gateway owner after #176587. Verify that identity, exercise cross-device replacement, and retain the real revoked-retry and zero-effect assertions. Distinct-profile exclusion remains covered by the setup-auth retry suite. Expect fresh chat to remain unavailable while the fixture deliberately holds startup recovery. Join the existing subagent recovery owner before asserting successful chat admission; retain database readiness and refusal coverage without retries or timeout changes. Refs: #176587
* fix: resume interrupted inputs after gateway restart Recover accepted chat inputs through the existing startup pending-input owner with original receipt identity, FIFO order, current authority checks, and a 24-hour limit. Require transcript durability before acknowledging sessions_send steering; unsupported durable steering uses the existing queued delivery path. Keep browser reconciliation and explicit retry/discard aligned with server ownership. * fix: retain durable identity for recovered chat inputs Keep authenticated CLI input recovery independent of presence, allow matching interrupted retries, and make steering fixtures honor transcript commit before acknowledgment. Extract recovery metadata construction to preserve the import boundary. * test: share ephemeral owner admission coverage * fix: preserve trusted source context during chat recovery * test: align recovery fixtures with admission lifetimes * test: preserve authenticated retry and exact withdrawal coverage * test: verify persisted steering provenance in raw child sessions * fix(gateway): resume queued inputs across cold restarts * fix: preserve requester contracts in restart recovery * fix: retain the admitted agent when resuming chat inputs * test: prepare requester authority for durable steer fallback * fix: align interrupted input recovery with admission contracts * fix: exclude process-bound review continuations from replay * test: prove chat replay revocation and stable upgrades * docs: clarify interrupted chat recovery limits * fix: preserve recovery order for local chat commands * fix: preserve chat replay order after transient exhaustion * fix(gateway): fence fresh chat during startup recovery * fix(gateway): preserve reconnect resume during input recovery * test: prove explicit steer input resumes without an active turn * test: complete peer recovery runtime fixtures * fix(gateway): preserve requester context during chat replay * fix(gateway): preserve mixed input order after retry exhaustion * test(gateway): observe startup refusal before client retries * test(gateway): prove predecessor order during chat recovery * fix(gateway): recover interrupted turns before queued peers
Authenticated backend and shared-token connections now share the durable Gateway owner after openclaw#176587. Verify that identity, exercise cross-device replacement, and retain the real revoked-retry and zero-effect assertions. Distinct-profile exclusion remains covered by the setup-auth retry suite. Expect fresh chat to remain unavailable while the fixture deliberately holds startup recovery. Join the existing subagent recovery owner before asserting successful chat admission; retain database readiness and refusal coverage without retries or timeout changes. Refs: openclaw#176587
Only human turns receive personal-library authoring, so completion and other internal turns published a different skill_workshop definition and broke the native prompt cache for profiled users. Since openclaw#176587 this also affects token-authenticated clients. CLI turns without authoring now reuse the session's last human shape with an expired grant, as goal continuation already does. The definition stays identical and every call, including Workshop calls through the workspace-default wrapper, is refused, so no sandboxed internal turn gains Workshop access. Co-authored-by: VACInc <[email protected]>
) * fix(claude-cli): stop cache-prefix churn after child completion Ordinary local claude-cli turns now use the same exact OpenClaw-mediated tool projection as verified child completions, so a completion no longer swaps the tools-first cached prefix of a running native session. Co-authored-by: VACInc <[email protected]> * test(claude-cli): expect the mediated surface on ordinary turns Co-authored-by: VACInc <[email protected]> * test(claude-cli): select native tools in the workspace-only override case Managed Claude turns are mediated by default, so the agent workspace-only override is covered on the explicit native-selection path that still exposes native file tools. Co-authored-by: VACInc <[email protected]> * fix(claude-cli): serve configured MCP servers through the loopback bridge Exclusive CLI runs omit native MCP servers because the CLI would call them outside OpenClaw's per-turn caps. Managed local Claude turns are now all exclusive, so configured mcp.servers disappeared from ordinary turns. Materialize the session's configured MCP tools for the run and serve them through the loopback grant. They pass the same Gateway policy pipeline and exact grant allowlist as other tools, so ordinary and completion turns list one catalog while each turn's cap still decides what is listed and callable. Co-authored-by: VACInc <[email protected]> * fix(claude-cli): ignore request echoes when checking for orphaned tool calls Claude Code logs api-request-blob records that repeat already answered tool calls under role=assistant. Counting them made a finished turn look orphaned until the final reply was written, so a completion that resumed the parent right after a spawn reset its native session. Only user and assistant conversation records now count. Co-authored-by: VACInc <[email protected]> * fix(claude-cli): keep skill_workshop stable on internal turns Only human turns receive personal-library authoring, so completion and other internal turns published a different skill_workshop definition and broke the native prompt cache for profiled users. Since #176587 this also affects token-authenticated clients. CLI turns without authoring now reuse the session's last human shape with an expired grant, as goal continuation already does. The definition stays identical and every call, including Workshop calls through the workspace-default wrapper, is refused, so no sandboxed internal turn gains Workshop access. Co-authored-by: VACInc <[email protected]> * fix(skill-workshop): keep workspace Workshop on internal CLI turns The stable skill_workshop shape for internal turns refused every call, including workspace Workshop calls that an unsandboxed no-grant turn may make on main. Pass the run's sandbox state to the workspace-default wrapper so the expired grant refuses only personal-library calls and sandboxed workspace calls. Co-authored-by: VACInc <[email protected]> * fix(mcp): recheck loopback grant at configured-server I/O The loopback handler checked grant and completion lineage before executing a tool, but a configured MCP tool could still reach its server after that check, for example after waiting for a session reconnection. Carry the caller's check into MCP tools/call so it runs immediately before server I/O. Co-authored-by: VACInc <[email protected]> * fix(mcp): serve configured server instructions through the loopback Managed Claude turns used to connect configured MCP servers natively and received each server's initialize instructions. The bridge kept the tools but dropped the instructions. Capture them in the session MCP catalog and return them from the loopback initialize reply, ordered by server name, for servers that still have a listed tool. Catalog capture follows the approach proposed in #174396. Co-authored-by: VACInc <[email protected]> * fix(mcp): guard every bridged request and serve server instructions whole Resource reads, prompt fetches and paginated lists now recheck the loopback caller's grant and completion lineage at the request boundary, as tool calls already did. Configured server instructions are no longer capped at 1,200 characters. A Gateway loopback test revokes a real grant or reassigns a real completion lineage during a server-driven catalog refresh. Co-authored-by: VACInc <[email protected]> * test(gateway): prove Workshop shape and refusal on completion turns Through the real loopback, a completion turn after a human turn lists the same skill_workshop definition, refuses personal-library calls without reaching the human grant, and keeps unsandboxed workspace calls. Co-authored-by: VACInc <[email protected]> * test(gateway): prove sandboxed completions cannot write through Workshop Sandboxed completion turns, with or without skill_workshop admitted by the sandbox tool policy, list the same Workshop surface as the human turn and refuse a workspace create before any file changes. The Gateway authority file runs in the database-worker project, which owns the main-thread shared-state broker. Drops the mock-sequenced revocation case now covered by real grant and lineage owners. Co-authored-by: VACInc <[email protected]> * test(cli-runner): drop Workshop helper cases covered by the Gateway suite Definition parity, personal refusal and workspace access are now proven through the real loopback; keep session isolation and latest-shape cases. Co-authored-by: VACInc <[email protected]> * test(gateway): wait for list_changed delivery instead of sleeping The probe follows each tools/list_changed with a ping on the same SSE stream; the client handles stream messages in order, so its ping reply proves the notification was consumed before the next call. Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: roboclaw-bot <[email protected]>
…claw#172026) * fix(claude-cli): stop cache-prefix churn after child completion Ordinary local claude-cli turns now use the same exact OpenClaw-mediated tool projection as verified child completions, so a completion no longer swaps the tools-first cached prefix of a running native session. Co-authored-by: VACInc <[email protected]> * test(claude-cli): expect the mediated surface on ordinary turns Co-authored-by: VACInc <[email protected]> * test(claude-cli): select native tools in the workspace-only override case Managed Claude turns are mediated by default, so the agent workspace-only override is covered on the explicit native-selection path that still exposes native file tools. Co-authored-by: VACInc <[email protected]> * fix(claude-cli): serve configured MCP servers through the loopback bridge Exclusive CLI runs omit native MCP servers because the CLI would call them outside OpenClaw's per-turn caps. Managed local Claude turns are now all exclusive, so configured mcp.servers disappeared from ordinary turns. Materialize the session's configured MCP tools for the run and serve them through the loopback grant. They pass the same Gateway policy pipeline and exact grant allowlist as other tools, so ordinary and completion turns list one catalog while each turn's cap still decides what is listed and callable. Co-authored-by: VACInc <[email protected]> * fix(claude-cli): ignore request echoes when checking for orphaned tool calls Claude Code logs api-request-blob records that repeat already answered tool calls under role=assistant. Counting them made a finished turn look orphaned until the final reply was written, so a completion that resumed the parent right after a spawn reset its native session. Only user and assistant conversation records now count. Co-authored-by: VACInc <[email protected]> * fix(claude-cli): keep skill_workshop stable on internal turns Only human turns receive personal-library authoring, so completion and other internal turns published a different skill_workshop definition and broke the native prompt cache for profiled users. Since openclaw#176587 this also affects token-authenticated clients. CLI turns without authoring now reuse the session's last human shape with an expired grant, as goal continuation already does. The definition stays identical and every call, including Workshop calls through the workspace-default wrapper, is refused, so no sandboxed internal turn gains Workshop access. Co-authored-by: VACInc <[email protected]> * fix(skill-workshop): keep workspace Workshop on internal CLI turns The stable skill_workshop shape for internal turns refused every call, including workspace Workshop calls that an unsandboxed no-grant turn may make on main. Pass the run's sandbox state to the workspace-default wrapper so the expired grant refuses only personal-library calls and sandboxed workspace calls. Co-authored-by: VACInc <[email protected]> * fix(mcp): recheck loopback grant at configured-server I/O The loopback handler checked grant and completion lineage before executing a tool, but a configured MCP tool could still reach its server after that check, for example after waiting for a session reconnection. Carry the caller's check into MCP tools/call so it runs immediately before server I/O. Co-authored-by: VACInc <[email protected]> * fix(mcp): serve configured server instructions through the loopback Managed Claude turns used to connect configured MCP servers natively and received each server's initialize instructions. The bridge kept the tools but dropped the instructions. Capture them in the session MCP catalog and return them from the loopback initialize reply, ordered by server name, for servers that still have a listed tool. Catalog capture follows the approach proposed in openclaw#174396. Co-authored-by: VACInc <[email protected]> * fix(mcp): guard every bridged request and serve server instructions whole Resource reads, prompt fetches and paginated lists now recheck the loopback caller's grant and completion lineage at the request boundary, as tool calls already did. Configured server instructions are no longer capped at 1,200 characters. A Gateway loopback test revokes a real grant or reassigns a real completion lineage during a server-driven catalog refresh. Co-authored-by: VACInc <[email protected]> * test(gateway): prove Workshop shape and refusal on completion turns Through the real loopback, a completion turn after a human turn lists the same skill_workshop definition, refuses personal-library calls without reaching the human grant, and keeps unsandboxed workspace calls. Co-authored-by: VACInc <[email protected]> * test(gateway): prove sandboxed completions cannot write through Workshop Sandboxed completion turns, with or without skill_workshop admitted by the sandbox tool policy, list the same Workshop surface as the human turn and refuse a workspace create before any file changes. The Gateway authority file runs in the database-worker project, which owns the main-thread shared-state broker. Drops the mock-sequenced revocation case now covered by real grant and lineage owners. Co-authored-by: VACInc <[email protected]> * test(cli-runner): drop Workshop helper cases covered by the Gateway suite Definition parity, personal refusal and workspace access are now proven through the real loopback; keep session isolation and latest-shape cases. Co-authored-by: VACInc <[email protected]> * test(gateway): wait for list_changed delivery instead of sleeping The probe follows each tools/list_changed with a ping on the same SSE stream; the client handles stream messages in order, so its ping reply proves the notification was consumed before the next call. Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: roboclaw-bot <[email protected]>
) * fix(claude-cli): stop cache-prefix churn after child completion Ordinary local claude-cli turns now use the same exact OpenClaw-mediated tool projection as verified child completions, so a completion no longer swaps the tools-first cached prefix of a running native session. Co-authored-by: VACInc <[email protected]> * test(claude-cli): expect the mediated surface on ordinary turns Co-authored-by: VACInc <[email protected]> * test(claude-cli): select native tools in the workspace-only override case Managed Claude turns are mediated by default, so the agent workspace-only override is covered on the explicit native-selection path that still exposes native file tools. Co-authored-by: VACInc <[email protected]> * fix(claude-cli): serve configured MCP servers through the loopback bridge Exclusive CLI runs omit native MCP servers because the CLI would call them outside OpenClaw's per-turn caps. Managed local Claude turns are now all exclusive, so configured mcp.servers disappeared from ordinary turns. Materialize the session's configured MCP tools for the run and serve them through the loopback grant. They pass the same Gateway policy pipeline and exact grant allowlist as other tools, so ordinary and completion turns list one catalog while each turn's cap still decides what is listed and callable. Co-authored-by: VACInc <[email protected]> * fix(claude-cli): ignore request echoes when checking for orphaned tool calls Claude Code logs api-request-blob records that repeat already answered tool calls under role=assistant. Counting them made a finished turn look orphaned until the final reply was written, so a completion that resumed the parent right after a spawn reset its native session. Only user and assistant conversation records now count. Co-authored-by: VACInc <[email protected]> * fix(claude-cli): keep skill_workshop stable on internal turns Only human turns receive personal-library authoring, so completion and other internal turns published a different skill_workshop definition and broke the native prompt cache for profiled users. Since #176587 this also affects token-authenticated clients. CLI turns without authoring now reuse the session's last human shape with an expired grant, as goal continuation already does. The definition stays identical and every call, including Workshop calls through the workspace-default wrapper, is refused, so no sandboxed internal turn gains Workshop access. Co-authored-by: VACInc <[email protected]> * fix(skill-workshop): keep workspace Workshop on internal CLI turns The stable skill_workshop shape for internal turns refused every call, including workspace Workshop calls that an unsandboxed no-grant turn may make on main. Pass the run's sandbox state to the workspace-default wrapper so the expired grant refuses only personal-library calls and sandboxed workspace calls. Co-authored-by: VACInc <[email protected]> * fix(mcp): recheck loopback grant at configured-server I/O The loopback handler checked grant and completion lineage before executing a tool, but a configured MCP tool could still reach its server after that check, for example after waiting for a session reconnection. Carry the caller's check into MCP tools/call so it runs immediately before server I/O. Co-authored-by: VACInc <[email protected]> * fix(mcp): serve configured server instructions through the loopback Managed Claude turns used to connect configured MCP servers natively and received each server's initialize instructions. The bridge kept the tools but dropped the instructions. Capture them in the session MCP catalog and return them from the loopback initialize reply, ordered by server name, for servers that still have a listed tool. Catalog capture follows the approach proposed in #174396. Co-authored-by: VACInc <[email protected]> * fix(mcp): guard every bridged request and serve server instructions whole Resource reads, prompt fetches and paginated lists now recheck the loopback caller's grant and completion lineage at the request boundary, as tool calls already did. Configured server instructions are no longer capped at 1,200 characters. A Gateway loopback test revokes a real grant or reassigns a real completion lineage during a server-driven catalog refresh. Co-authored-by: VACInc <[email protected]> * test(gateway): prove Workshop shape and refusal on completion turns Through the real loopback, a completion turn after a human turn lists the same skill_workshop definition, refuses personal-library calls without reaching the human grant, and keeps unsandboxed workspace calls. Co-authored-by: VACInc <[email protected]> * test(gateway): prove sandboxed completions cannot write through Workshop Sandboxed completion turns, with or without skill_workshop admitted by the sandbox tool policy, list the same Workshop surface as the human turn and refuse a workspace create before any file changes. The Gateway authority file runs in the database-worker project, which owns the main-thread shared-state broker. Drops the mock-sequenced revocation case now covered by real grant and lineage owners. Co-authored-by: VACInc <[email protected]> * test(cli-runner): drop Workshop helper cases covered by the Gateway suite Definition parity, personal refusal and workspace access are now proven through the real loopback; keep session isolation and latest-shape cases. Co-authored-by: VACInc <[email protected]> * test(gateway): wait for list_changed delivery instead of sleeping The probe follows each tools/list_changed with a ping on the same SSE stream; the client handles stream messages in order, so its ping reply proves the notification was consumed before the next call. Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: roboclaw-bot <[email protected]> (cherry picked from commit 77d9f42) Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes accepted chat inputs and acknowledged agent guidance being lost when the Gateway restarts.
User Impact
Eligible interrupted
chat.sendinputs resume on the server in acceptance order within each session, including CLI and native clients without a browser outbox. The original submission ID and durable receipt deduplicate retries during and after recovery.sessions_sendsteering and guidance to an owned child acknowledge only after transcript persistence; a target without durable steering uses the existing queued delivery path.Automatic recovery requires the original session, current operator authority, and an input accepted within 24 hours. Cancelled inputs and reset, archived, or replaced sessions never resume. Inputs that cannot resume retain the existing interrupted notice with copy/resend guidance. The browser reconciles server custody instead of independently resending accepted inputs and retains its payload until consumption. Fresh chat and browser-local commands wait behind startup recovery.
No new table, configuration option, Doctor migration, retry scheduler, or bundle budget. Behavior and limits are documented in
docs/gateway/restart-recovery.mdand the outbox documentation.Why This Change Was Made
The pending-input writer persists before ACK, but startup recovery selected only peer-delivery rows. SIGKILL residue was reconciled only on a history read.
session-send-recoverynow discovers and reconciles both input kinds using its existing FIFO and bounded attempts.chat-input-recoveryis its lazy replay helper: it restores the recorded operator and re-enters ordinary chat admission with the original agent, approved input, request options, and receipt identity. The existing authority owners revalidate session access and operator authority at effect.Cold-process instrumentation exposed two producer defects. SIGTERM mailbox cleanup supplied a generic cancellation error, terminally cancelling accepted peer inputs;
src/sessions/session-controller.mailbox-cleanup.ts:220now supplies the existing typed restart reason. After SIGKILL, future queued peers eagerly claimed foreground recovery and blocked earlier inputs;src/gateway/agent-turn/agent-session-persist.ts:365leaves those claims to the selected-command owner.Review exposed a separate ordering defect: selected peer replay enters direct agent admission and could claim foreground before the interrupted main predecessor.
src/gateway/session-send-recovery.ts:160now asks the existing exact main-turn recovery owner to start or settle that predecessor first. Paused, failed, or deferred recovery retains the peers. Ordinary chat already uses its selected-claim predecessor handoff. Transient exhaustion stops that session's sweep; other sessions continue. No second execution owner or retry loop is introduced.src/agents/tools/sessions-send-tool.delivery.ts:265waits for the receiver's transcript commit. Unsupported capability falls back before injection; an indeterminate consumed result never replays. Recovery preserves original-agent selection, trusted external provenance, requester/personal context, participant attribution, and the Control UI reconnect marker.Accepted limits: the age limit is checked at selection; existing bounded attempts may finish later. Live connection capabilities are not durable authority: recovered ordinary chat has no inline/device UI tools or task-suggestion delivery. Explicit per-run client tool bindings, process-local provider-review acknowledgments, expired inputs, and inputs without saved authority remain interrupted. Incognito remains ephemeral. Provider-review continuations need refreshed findings and acknowledgment. Independent authorized reset remains a cancellation action; browser-local FIFO does not prohibit another client from resetting a session.
Size and ownership: simplification removed duplicate policy/authority wrappers, browser replay state, and the proposed Retry/Discard path. Whole PR against integrated base
9f7a75d39082: production +763/−385 = +378, tests/support +2322/−433 = +1889, docs +80/−27 = +53. The discovery owner grows by 57 net lines. This is smaller than the original +552 production delta, but does not meet the requested well-under-half target. Remaining growth stores admission evidence, explicitly serializes replay options, and restores verified requester context; those contracts cannot safely use a broad request spread. The peer repair adds 23 production lines and reuses the existing main-turn owner.Evidence
Candidate:
1d913b5e9f9d8c28def12f9cebbbba31a10b1314, integrated with9f7a75d39082, including #176770's peer-source restoration and #177214's existing X-fixture waiter fix.Authority at effect:
chat-input-recovery.authority.test.tsuses existing operator-run-authority fixtures, a real Gateway, synthetic HTTP provider, and the realwritetool. Between capture and startup it narrows a role, revokes a paired device, and removes membership in another owner's session. All three retain interrupted receipts with zero model calls or tool writes. Unchanged authority performs one write-tool round trip, consumes the original receipt, and preserves requester profile, personalUSER.md, and participant attribution. The wire probe also proves startup rejects a fresh successor with retryableUNAVAILABLE, then admits it exactly once after recovery.Predecessor and peer ordering: on
7b987c3, the strengthened real-Gateway fixture reproduced the review defect: the peer ran without the interrupted predecessor. With this repair, bothsteerandfollowupmust observe predecessor → peer → chat at lifecycle and provider boundaries, consume each pending receipt once, and preserve the revocation controls. A separate owner case proves paused/deferred recovery makes no peer or chat dispatch. The synthetic provider classifies the current user input after stripping runtime context; a quoted historical interrupted-input notice is not an active request.Final secretless AWS proof, provider
aws, leasecbx_a167098374aa: all four changed files SHA256-verified atop pinned7b987c3, matching committed candidate bytes. 46/46 passed across three files: authority/order modes 22.770 s / 7.225 s, paused-owner case 3.430 s, stable upgrade 1.150 s; Vitest 94.99 s, test wrapper 101.17 s. No instance role, Tailscale, or credential hydration. Core and Gateway test types, targeted typed lint, format, one-page MDX and whitespace checks pass. The unmodified repository pre-commit hook also passed against the committed four-file diff in an isolated index. The lease is released.Latest-stable upgrade: npm latest was rechecked October 19 as
2026.10.5, tag commit1b58cb9a1b4f4353e1add63c8506db4d890962e8.session-send-recovery.upgrade.test.tsuses the captured release's row shape and message format, independently of this branch's writer. Queued, interrupted, and cancelled rows have fresh acceptance times. Actual startup discovery converts queued to interrupted before any history read, preserves message bytes and cancellation, and exposes the existing visible outcome with zero replay calls. Stable did not save per-input operator authority, so these chat inputs require manual resend. No Doctor migration is needed or invoked; the table schema is unchanged. This is captured-row upgrade proof, not an installed-package upgrade campaign.Cold restarts: secretless AWS Crabbox built
82fbfa596fbcafter verifying all 57,777 source hashes. Real Gateway processes, sockets, SQLite, transcripts, and signals; synthetic model provider. SIGTERM passed in 75.497 s, SIGKILL in 46.580 s. Both proved five interleaved peer/chat pairs in FIFO order, one provider delivery each, same-ID retries during and after consumption, durable steering, cancellation/reset/archive/revocation exclusions, and another restart without duplicates. Seven focused owner files passed 108/108. Later repairs have their own focused proof and final-head CI; these cold timings are evidence for that earlier head. The lease is released.Team evidence: the audit recorded 40 stops, 22 KILL exits, and 61 starts; these are lifecycle counts, not lost-input counts. Sanitized journal: L975984 SIGTERM at 2026-10-15T06:57:03.519Z; L976005 reached the 20,000 ms drain timeout with queue=62, pendingReplies=17, embeddedRuns=31, admissions=115; L976201 active drain settled; L976387 admission close took 4,531 ms; L976432 shutdown deadline reached; L976437 exited with status 9/KILL.
UI and attribution: matched same-host comparison: chat 1,489,890 → 1,489,839 bytes (−51) with 25 requests unchanged; New −6 bytes, 20 requests unchanged. Recovery decisions stay behind the existing lazy receipts boundary. All 83 focused UI tests, UI types, lint/format, and i18n passed; later repairs do not change UI source. No cap was raised. The cancellation test passed clean main
af1e1fe8first, then the branch, all nine cases under Bun; the previous failed-versus-settled result did not reproduce and is not claimed inherited or fixed. A prior Bun menu failure was reproduced on clean mainf2f019d60638with the same assertion and unchanged menu source.Other focused proof: integrated recovery, authority/startup, stable-row upgrade, steering, and announcement cases passed 93/93. Chat-turn tests 23/23, prompt-prefix stability 5/5, prompt snapshot generation without a generated diff, and replay-option round-trip 9/9 passed. Core and affected Agent/Gateway type graphs, typed lint, format, whitespace, changed-page MDX, and line-cap checks passed. Prior CI fixture failures were repaired without raised timeouts, weaker assertions, skips, or new production retry loops.
Focused commands
No local full suite or CI rerun for green.
Review and CI: full committed-branch Codex autoreview at
1d913b5e9f9d8c28def12f9cebbbba31a10b1314is scoped-clean through P2, zero findings, with successful final source verification. Exact-head CI run 39259580936 completed successfully: 97/97 jobs complete, zero failures. No CI reruns or additional pushes were needed for this head. The peer-order review thread is resolved; there were no unresolved review threads at final verification. No merge requested or performed.Synthetic Control UI proof
Before: the interrupted notice promised automatic resumption without a server replay owner.
After: server recovery owns the input; unrecovered inputs retain copy/resend guidance. Passive reconciliation sends no
chat.sendrequest.