Repository navigation
fix(gateway): pause restart recovery while the crash-loop breaker is tripped - #166238
Conversation
…tripped Quarantine interrupted main-session turns while the crash-loop window is active, preserving their entries and retry budget. Re-arm the existing recovery scheduler in the same healthy process when the window drains, with the original cutoff and lifecycle ownership. Reuse the breaker owner and rotate the boot segment before replay. Run runtime state access in workers and preserve manual channel stops and environment suppression during recovery. Supersedes #160434. Co-authored-by: Masato Hoshino <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
|
Codex review: blocked before merge. Reviewed October 7, 2026, 5:31 AM ET / 09:31 UTC (Revision 10). ClawSweeper reviewWhat this changesThe PR pauses interrupted-session recovery during crash-loop safe mode, resumes it after the full breaker window clears, and moves runtime boot-history operations into database workers. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: current main still permits restart recovery during crash-loop safe mode, and this maintainer-owned candidate remains useful. No introduced correctness defect was found. Likely related people: @steipete (high-confidence routing candidate) and @sjf-oa (medium-confidence routing candidate). Priority: P0 Review scores
Verification
How this fits togetherThe Gateway uses persisted boot history to contain repeated crashes. Its restart-recovery scheduler consumes that decision before resuming interrupted agent work or restoring channel startup. flowchart TD
A[Persisted boot history] --> B[Crash-loop breaker owner]
B --> C{Full window cleared?}
C -->|No| D[Preserve interrupted work]
D --> E[Cancelable scheduler wait]
E --> B
C -->|Yes| F[Record recovered boot]
F --> G[Restore channels and resume work]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +248, Tests +514, Docs +9, Other +10. Total +781 across 64 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Contain crashing replay without discarding interrupted work, with published-state upgrade evidence confirming one automatic resumption after the stable window. Do we have a high-confidence way to reproduce the issue? Yes, source establishes that current main can dispatch interrupted work despite breaker-tripped channel suppression; the related contributor PR also records a real CLI crash/replay reproduction. No runtime was executed during this read-only review. Is this the best way to solve the issue? Yes, reusing the boot breaker, channel manager, and existing generation-owned scheduler is a focused repair; the candidate still needs the repository-required published-driver validation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5077ad4f99aa. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
The crash-loop check now reads breaker state through a worker before startup recovery reaches Gateway root admission. Advancing fake timers by zero does not wait for that I/O or its cancellation cleanup, so the old immediate stopped flag assertion could fail without a shutdown hang. Observe the real admission request through the existing call-through helper, then await stop while suspension remains closed. Only reopen admission after stop settles and retain the no-dispatch and unchanged interrupted-entry assertions. This preserves the shutdown contract and removes an incidental fake-clock ordering assumption; production cancellation behavior does not change.
…hloop-pause-20261006
Use the channel manager's prepared boot suppression instead of inspecting breaker storage on every startup or exact-target recovery call. Keep the healthy path synchronous and admit startup before recovery preparation. Return the owner's deadline to the existing scheduler. Let the Gateway cancel shared recovery work while individual callers cancel only their waits, and retain a committed boot identity if close overtakes its reply. The integration fixture forwards its virtual clock through the writer's existing time input because SQLite workers do not inherit fake timers.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…tripped (#166238) * fix(gateway): pause restart recovery while the crash-loop breaker is tripped Quarantine interrupted main-session turns while the crash-loop window is active, preserving their entries and retry budget. Re-arm the existing recovery scheduler in the same healthy process when the window drains, with the original cutoff and lifecycle ownership. Reuse the breaker owner and rotate the boot segment before replay. Run runtime state access in workers and preserve manual channel stops and environment suppression during recovery. Supersedes #160434. Co-authored-by: Masato Hoshino <[email protected]> * fix(gateway): break the channel autostart recovery import cycle * fix(gateway): type autostart recovery suppression by identity * test(agents): await recovery admission before testing suspended stop The crash-loop check now reads breaker state through a worker before startup recovery reaches Gateway root admission. Advancing fake timers by zero does not wait for that I/O or its cancellation cleanup, so the old immediate stopped flag assertion could fail without a shutdown hang. Observe the real admission request through the existing call-through helper, then await stop while suspension remains closed. Only reopen admission after stop settles and retain the no-dispatch and unchanged interrupted-entry assertions. This preserves the shutdown contract and removes an incidental fake-clock ordering assumption; production cancellation behavior does not change. * fix(gateway): scope restart preparation to active crash-loop suppression Use the channel manager's prepared boot suppression instead of inspecting breaker storage on every startup or exact-target recovery call. Keep the healthy path synchronous and admit startup before recovery preparation. Return the owner's deadline to the existing scheduler. Let the Gateway cancel shared recovery work while individual callers cancel only their waits, and retain a committed boot identity if close overtakes its reply. The integration fixture forwards its virtual clock through the writer's existing time input because SQLite workers do not inherit fake timers. --------- Co-authored-by: Masato Hoshino <[email protected]> Backport notes (release/2026.10.1): no prerequisites taken. Startup orphan marking still lives in startGatewaySidecars on this line, so the crash-loop suppression guard is applied there, extracted to server-startup-main-session-orphans.ts to keep the over-cap file from growing (regression test in server-startup-main-session-orphans.test.ts), and the release-only main-session-restart-dispatch-capacity.test.ts fixture gains prepareRestartRecovery. The recovery runtime keeps the release structure and takes only this fix's gate, pause loop, and rotation handler; state registries and the worker inventory take only the gatewayBoot entries. (cherry picked from commit 49c1815)
…tripped (openclaw#166238) * fix(gateway): pause restart recovery while the crash-loop breaker is tripped Quarantine interrupted main-session turns while the crash-loop window is active, preserving their entries and retry budget. Re-arm the existing recovery scheduler in the same healthy process when the window drains, with the original cutoff and lifecycle ownership. Reuse the breaker owner and rotate the boot segment before replay. Run runtime state access in workers and preserve manual channel stops and environment suppression during recovery. Supersedes openclaw#160434. Co-authored-by: Masato Hoshino <[email protected]> * fix(gateway): break the channel autostart recovery import cycle * fix(gateway): type autostart recovery suppression by identity * test(agents): await recovery admission before testing suspended stop The crash-loop check now reads breaker state through a worker before startup recovery reaches Gateway root admission. Advancing fake timers by zero does not wait for that I/O or its cancellation cleanup, so the old immediate stopped flag assertion could fail without a shutdown hang. Observe the real admission request through the existing call-through helper, then await stop while suspension remains closed. Only reopen admission after stop settles and retain the no-dispatch and unchanged interrupted-entry assertions. This preserves the shutdown contract and removes an incidental fake-clock ordering assumption; production cancellation behavior does not change. * fix(gateway): scope restart preparation to active crash-loop suppression Use the channel manager's prepared boot suppression instead of inspecting breaker storage on every startup or exact-target recovery call. Keep the healthy path synchronous and admit startup before recovery preparation. Return the owner's deadline to the existing scheduler. Let the Gateway cancel shared recovery work while individual callers cancel only their waits, and retain a committed boot identity if close overtakes its reply. The integration fixture forwards its virtual clock through the writer's existing time input because SQLite workers do not inherit fake timers. --------- Co-authored-by: Masato Hoshino <[email protected]>
The native subagent restart live proof SIGKILLs the Gateway three times in about two minutes. The third unclean boot trips the documented restart-loop breaker (3 unclean boots within 5 minutes, #166238), which pauses restart settlement, including interrupted subagent recovery (#166846), until the unclean window drains. The orphan assertion added with the #169144 backport only waited 30 seconds, so the nonannouncing child was still `running`. Wait up to 360 seconds for the orphan settlement so the proof covers the breaker pause and the automatic resume after its window. Assertions are unchanged. 2026.10.4 passed because it predates the breaker pause, startup subagent reconciliation, and this assertion. Deterministic proof: the quiet-child e2e twin with SIGKILL restarts and an exec-blocked child passes with one prior kill; with two warm-up kills it logs "restart-loop breaker tripped" and the parent continuation never arrives within 60 seconds; with a 400-second wait it settles and passes (338s).
The native subagent restart live proof SIGKILLs the Gateway three times in about two minutes. The third unclean boot trips the documented restart-loop breaker (3 unclean boots within 5 minutes, #166238), which pauses restart settlement, including interrupted subagent recovery (#166846), until the unclean window drains. The orphan assertion added with the #169144 backport only waited 30 seconds, so the nonannouncing child was still `running`. Wait up to 360 seconds for the orphan settlement so the proof covers the breaker pause and the automatic resume after its window. Assertions are unchanged. 2026.10.4 passed because it predates the breaker pause, startup subagent reconciliation, and this assertion. Deterministic proof: the quiet-child e2e twin with SIGKILL restarts and an exec-blocked child passes with one prior kill; with two warm-up kills it logs "restart-loop breaker tripped" and the parent continuation never arrives within 60 seconds; with a 400-second wait it settles and passes (338s). (cherry picked from commit 1a4c2a0)
…7319) * fix(test): treat the env-gated Agents API live proof as optional shard evidence test/gateway-agentsapi.live.test.ts (new since 2026.10.4) skips its only case unless OPENCLAW_LIVE_AGENTS_API=1, which the native live test-harness shard never sets, so the shard's no-passing-assertions guard failed it on every 2026.10.5 candidate once the other harness tests went green. Register it in the existing whole-file opt-in map like the other env-gated live proofs. (cherry picked from commit 761ef64) * fix(test): decode the Codex CLI JSON error after plugin uninstall The live Codex npm plugin lane matched the expected post-uninstall error against raw --json stdout, where quotes are escaped, so the correct owner-plugin-not-activatable error never matched. Decode the canonical CLI error message first, as the 2026.10.4 release line does (a9fd56d). (cherry picked from commit e8772a9) * fix(test): scope CLI announcement barrier to parent probe (cherry picked from commit d5c0db7) (cherry picked from commit a48d4a8) * test(live): wait out the crash-loop breaker before the orphan settles The native subagent restart live proof SIGKILLs the Gateway three times in about two minutes. The third unclean boot trips the documented restart-loop breaker (3 unclean boots within 5 minutes, #166238), which pauses restart settlement, including interrupted subagent recovery (#166846), until the unclean window drains. The orphan assertion added with the #169144 backport only waited 30 seconds, so the nonannouncing child was still `running`. Wait up to 360 seconds for the orphan settlement so the proof covers the breaker pause and the automatic resume after its window. Assertions are unchanged. 2026.10.4 passed because it predates the breaker pause, startup subagent reconciliation, and this assertion. Deterministic proof: the quiet-child e2e twin with SIGKILL restarts and an exec-blocked child passes with one prior kill; with two warm-up kills it logs "restart-loop breaker tripped" and the parent continuation never arrives within 60 seconds; with a 400-second wait it settles and passes (338s). (cherry picked from commit 1a4c2a0) * test(qa-lab): skip user-role runtime carriers in visible-child send proof The sessions_send visible-child proof timed out on every 2026.10.5 candidate: its synthetic provider picked the latest user item that lacked the legacy <<<BEGIN_OPENCLAW_INTERNAL_CONTEXT>>> marker as the user prompt. Since #168546 (backport 8d66b94), OpenAI-compatible Responses endpoints, including mock-openai, keep runtime context in a user-role "OpenClaw runtime context:" carrier after the user turn instead of a developer message. The fixture then read that carrier as the prompt, never saw the "send" prompt on turn 2, answered PARENT_READY again, and the test waited for PARENT_DONE until timeout. Captured provider requests: v2026.10.4 sends the turn-2 carrier with role developer; the 10.5 tip sends it with role user. Reverting a293f2e (#168410) left the failure unchanged. Select the prompt with the shared qa-lab isInternalRuntimeContextCarrierText helper, which already accepts current and legacy carrier shapes. (cherry picked from commit d3a06e7) * test(buzz): skip real reconnect backoff in cold-start recovery (cherry picked from commit fa2049a) * fix(release): let the Telegram release lane finish its 25 scenarios The isolated Telegram candidate job hit its 60-minute limit at scenario 24/25 on every 2026.10.5 candidate (about 62 minutes needed at 102-108s per packaged Gateway start). main carries the same Telegram scenario set and job, so raise the job budget to 90 minutes; the calling release-checks job keeps its 210-minute bound. Also carry the 2026.10.4 release-line fixture fix for telegram-prepared-delivery-recovery (8b78670): keep the audit receipt in the shared Gateway workspace and create it up front so the isolated SUT can append without EACCES. main still writes it under the private tempRoot. (cherry picked from commit 3cb49f0, adapted to main's runner anchor) * test(gateway): probe startup readiness on fresh connections The deferred-fleet startup test failed twice in 2026.10.5 FRV #12 with `fetch failed` / `read ECONNRESET`. Its Gateway shares the test process's event loop. A /healthz or /readyz probe could reuse a keep-alive socket that Undici still treated as live; when the request was written and a synchronous main-thread startup stall followed, the server's idle-timer callback ran before the poll phase read the request and destroyed the socket with the request unread, so the kernel reset the connection. main still probes with default keep-alive fetches. Probe with `Connection: close`, matching existing Gateway test probes. Assertions are unchanged. (cherry picked from commit e3c63f2, adapted to main's probe sites) * test(live): expect review effort for Skill Workshop background reviews in the Ultra lane Since #161057 the Skill Workshop counts iterations per session, so Ultra probe sessions trigger a background review after idling. The review runs under its own skill-workshop-review: run and does not inherit the session's thinking level, so the lane's every-request-is-max assertion failed on 2026.10.5 whenever a review reached the provider. On main, #173889 pins review runs to thinkLevel "low" (review-run.ts), which the OpenAI stream wrapper sends as effort "low". Expect that effort for review runs; Ultra runs and their sessions must still be max, and independent heartbeats stay medium. The live file is over the line cap, so the Ultra wire effort policy moves to a sibling helper with its observation type, and the deterministic review cases run in the normal helper suite. (cherry picked from commit ca15213, adapted to main's review thinking level) * test(release): forward-port 2026.10.4-line upgrade-survivor and runtime-smoke harness fixes Release-line harness fixes that 2026.10.1-2026.10.5 carried but main never received: - cron-scheduled-authority: seed the cron authority specimen through the published baseline's own SQLite writer (seedPublishedCronJobs) instead of a raw cron/jobs.json that current candidates treat as a retired pre-July store; drop owner fields for pre-2026.7.1 baselines (usesCronOwnerAtBaseline). The dispatcher passes the package root to seedState, and the scenario now requires a published baseline. - bundled plugin runtime smoke: join deferred read-only update discovery via update.status before the package-manager child watchdog. main still defers install discovery (`<manager> root -g`) until after ready, so it can race the watchdog's no-package-manager-children check. Skips the codex npm plugin live source-reply grep from the release commit: main already probes dynamic-tool-source-reply.ts and dynamic-tools.ts. (cherry picked from commit fcdf0d1, codex grep hunk dropped; cron seed test adapted to main's executable-mode fixture writes)
…nclaw#177319) * fix(test): treat the env-gated Agents API live proof as optional shard evidence test/gateway-agentsapi.live.test.ts (new since 2026.10.4) skips its only case unless OPENCLAW_LIVE_AGENTS_API=1, which the native live test-harness shard never sets, so the shard's no-passing-assertions guard failed it on every 2026.10.5 candidate once the other harness tests went green. Register it in the existing whole-file opt-in map like the other env-gated live proofs. (cherry picked from commit 761ef64) * fix(test): decode the Codex CLI JSON error after plugin uninstall The live Codex npm plugin lane matched the expected post-uninstall error against raw --json stdout, where quotes are escaped, so the correct owner-plugin-not-activatable error never matched. Decode the canonical CLI error message first, as the 2026.10.4 release line does (a9fd56d). (cherry picked from commit e8772a9) * fix(test): scope CLI announcement barrier to parent probe (cherry picked from commit d5c0db7) (cherry picked from commit a48d4a8) * test(live): wait out the crash-loop breaker before the orphan settles The native subagent restart live proof SIGKILLs the Gateway three times in about two minutes. The third unclean boot trips the documented restart-loop breaker (3 unclean boots within 5 minutes, openclaw#166238), which pauses restart settlement, including interrupted subagent recovery (openclaw#166846), until the unclean window drains. The orphan assertion added with the openclaw#169144 backport only waited 30 seconds, so the nonannouncing child was still `running`. Wait up to 360 seconds for the orphan settlement so the proof covers the breaker pause and the automatic resume after its window. Assertions are unchanged. 2026.10.4 passed because it predates the breaker pause, startup subagent reconciliation, and this assertion. Deterministic proof: the quiet-child e2e twin with SIGKILL restarts and an exec-blocked child passes with one prior kill; with two warm-up kills it logs "restart-loop breaker tripped" and the parent continuation never arrives within 60 seconds; with a 400-second wait it settles and passes (338s). (cherry picked from commit 1a4c2a0) * test(qa-lab): skip user-role runtime carriers in visible-child send proof The sessions_send visible-child proof timed out on every 2026.10.5 candidate: its synthetic provider picked the latest user item that lacked the legacy <<<BEGIN_OPENCLAW_INTERNAL_CONTEXT>>> marker as the user prompt. Since openclaw#168546 (backport 8d66b94), OpenAI-compatible Responses endpoints, including mock-openai, keep runtime context in a user-role "OpenClaw runtime context:" carrier after the user turn instead of a developer message. The fixture then read that carrier as the prompt, never saw the "send" prompt on turn 2, answered PARENT_READY again, and the test waited for PARENT_DONE until timeout. Captured provider requests: v2026.10.4 sends the turn-2 carrier with role developer; the 10.5 tip sends it with role user. Reverting a293f2e (openclaw#168410) left the failure unchanged. Select the prompt with the shared qa-lab isInternalRuntimeContextCarrierText helper, which already accepts current and legacy carrier shapes. (cherry picked from commit d3a06e7) * test(buzz): skip real reconnect backoff in cold-start recovery (cherry picked from commit fa2049a) * fix(release): let the Telegram release lane finish its 25 scenarios The isolated Telegram candidate job hit its 60-minute limit at scenario 24/25 on every 2026.10.5 candidate (about 62 minutes needed at 102-108s per packaged Gateway start). main carries the same Telegram scenario set and job, so raise the job budget to 90 minutes; the calling release-checks job keeps its 210-minute bound. Also carry the 2026.10.4 release-line fixture fix for telegram-prepared-delivery-recovery (8b78670): keep the audit receipt in the shared Gateway workspace and create it up front so the isolated SUT can append without EACCES. main still writes it under the private tempRoot. (cherry picked from commit 3cb49f0, adapted to main's runner anchor) * test(gateway): probe startup readiness on fresh connections The deferred-fleet startup test failed twice in 2026.10.5 FRV openclaw#12 with `fetch failed` / `read ECONNRESET`. Its Gateway shares the test process's event loop. A /healthz or /readyz probe could reuse a keep-alive socket that Undici still treated as live; when the request was written and a synchronous main-thread startup stall followed, the server's idle-timer callback ran before the poll phase read the request and destroyed the socket with the request unread, so the kernel reset the connection. main still probes with default keep-alive fetches. Probe with `Connection: close`, matching existing Gateway test probes. Assertions are unchanged. (cherry picked from commit e3c63f2, adapted to main's probe sites) * test(live): expect review effort for Skill Workshop background reviews in the Ultra lane Since openclaw#161057 the Skill Workshop counts iterations per session, so Ultra probe sessions trigger a background review after idling. The review runs under its own skill-workshop-review: run and does not inherit the session's thinking level, so the lane's every-request-is-max assertion failed on 2026.10.5 whenever a review reached the provider. On main, openclaw#173889 pins review runs to thinkLevel "low" (review-run.ts), which the OpenAI stream wrapper sends as effort "low". Expect that effort for review runs; Ultra runs and their sessions must still be max, and independent heartbeats stay medium. The live file is over the line cap, so the Ultra wire effort policy moves to a sibling helper with its observation type, and the deterministic review cases run in the normal helper suite. (cherry picked from commit ca15213, adapted to main's review thinking level) * test(release): forward-port 2026.10.4-line upgrade-survivor and runtime-smoke harness fixes Release-line harness fixes that 2026.10.1-2026.10.5 carried but main never received: - cron-scheduled-authority: seed the cron authority specimen through the published baseline's own SQLite writer (seedPublishedCronJobs) instead of a raw cron/jobs.json that current candidates treat as a retired pre-July store; drop owner fields for pre-2026.7.1 baselines (usesCronOwnerAtBaseline). The dispatcher passes the package root to seedState, and the scenario now requires a published baseline. - bundled plugin runtime smoke: join deferred read-only update discovery via update.status before the package-manager child watchdog. main still defers install discovery (`<manager> root -g`) until after ready, so it can race the watchdog's no-package-manager-children check. Skips the codex npm plugin live source-reply grep from the release commit: main already probes dynamic-tool-source-reply.ts and dynamic-tools.ts. (cherry picked from commit fcdf0d1, codex grep hunk dropped; cron seed test adapted to main's executable-mode fixture writes)
What Problem This Solves
Restart recovery could replay a crashing interrupted turn while the Gateway crash-loop breaker was tripped. This supersedes #160434. Interrupted sessions now remain quarantined without charging an attempt, sending a notice, settling, or tombstoning them. The existing generation-owned scheduler re-arms once the breaker's full window clears in the same healthy process. Another crash extends the pause; shutdown or lifecycle replacement cancels recovery.
Existing manual channel stops and channel/provider skip flags remain effective. There are no new config options, schema changes, persisted shapes, or migration requirements. Thanks to @masatohoshino (Masato Hoshino) for the original containment proposal; his co-author credit is preserved.
Recovery ownership follow-up
The channel manager already knows whether this boot suppressed autostart. Recovery now consumes that prepared fact instead of independently inspecting the breaker database on every startup or exact-target call. Healthy preparation completes synchronously. Suppressed preparation returns the breaker's deadline through its existing owner, inside startup's root-work admission, then releases admission before the scheduler's unref'd wait.
The Gateway scheduler owns cancellation of the shared breaker read. Individual callers can cancel their waits without aborting another caller's shared transition. Close prevents new reads and channel starts. A committed boot identity is retained when close overtakes the worker reply, so shutdown records the correct boot. The duplicate recovery wrapper and direct agent-side breaker reads are removed.
Using the requested non-test/non-doc filter, the full PR is currently +482/-223 (+259 LOC); this follow-up is +134/-111 (+23 LOC). Growth implements the required in-process deadline, cancellation, and committed boot handoff contracts. The existing synchronous runtime transition and duplicated suppression predicates are removed.
Pinned head-versus-base comparison
Provider
blacksmith-testbox, profileopenclaw-check, leasetbx_01m4a70n3yjvszkmdj12jwbsqv; Node 24.19.0, pnpm 12.5.1. Separate immutable remote worktrees tested original head67e2c63ca9d053c2726d76ac7872716d85e55d79and merge based1b89023368ed6d76788e38fc33276d39f562c21. Each file ran three times withnode scripts/run-vitest.mjs <file> --maxWorkers=1.src/worker/worker.chat-abort.test.tssrc/agents/harness/gateway-question.authority-worker.test.tssrc/gateway/server-methods/chat-send-global-identity.test.tssrc/gateway/server.chat-queued-followup.test.tssrc/gateway/server.chat.gateway-server-chat-b.test.tsThe comparison completed in 26m13s. The collector exited 0 while preserving each failing test exit; the table is not a passing test claim. Worker cancellation timeouts, closed agent-DB admission, and chat-B paging failures reproduce on the pinned base. Global identity's exact
config store changes after ACKcase fails all six runs. Other fence/chat case occurrences vary; no individual case failed all three head runs while passing all three base runs. Those case-specific differences remain a limit of attribution. The question-authority lock did not reproduce in the initial six runs. It later reproduced in the candidate’sprepared-cancelcase. Three further base-only runs with--maxWorkers=4produced pass/fail/pass (51, 42, 40 seconds); the failingcallercase hits the samerevokePolicystatement at line 229 with SQLite errcode 5. The contention therefore exists on the pre-PR base, although the parameterized case varies.A temporary call trace on the original head observed four async breaker inspections during the three Gateway files, and zero during worker-abort/question-authority. The candidate reruns still reproduced these failure families: the final five-file replay had 26 failed and 104 passed tests. Removing the unnecessary reads is not presented as a fix for all baseline failures.
Evidence
All commands ran on
blacksmith-testbox, profileopenclaw-check, through the installed Crabbox CLI. Raw synchronization timed out twice; the supported repository source-capsule wrapper resolved synchronization while verifying the pinned source and changed-file hashes. No tests, typechecks, or builds ran on the Mac.Lease
tbx_01m4ae4d1cwkk9as8g9sa72nw7:node scripts/run-vitest.mjs src/agents/main-session-recovery src/gateway/server-channels.test.ts src/infra/gateway-boot-lifecycle.test.ts src/cli/gateway-cli/crash-loop-recovery.test.ts --maxWorkers=4: 443 passed across 18 files, 221.18 seconds in the test runner (4m32.6s remote command).67e2c63version makes both healthy and closed exact-target cases fail because each performs one forbidden breaker inspection. The candidate performs zero.nowMsinput; the production writer continues to use its own clock. This fixes the fixture's scheduler/worker clock mismatch without stubbing a recovery decision or result.Lease
tbx_01m4ah48dg29rxfaz5v2qpa3ne:node scripts/run-vitest.mjs src/gateway/server-plugin-reload.recovery.test.ts --maxWorkers=4: 94 passed, 42.65 seconds in the test runner.node scripts/check-changed.mjs: exit 1 on seven full-tree unused exports insrc/agents/auth-profiles.runtime.tsafter every typecheck passed (26m30s remote command). Running the identical dead-export scanner on pinned based1b8902reproduces the exact seven findings. No skip flag or baseline exception was used. All later commands from the canonical changed-check plan were then run separately and passed, including lint, storage/schema guards, and zero runtime import cycles. Earlier owned line-cap, fixture-type, and test-variable lint findings were fixed without exceptions.Lease
tbx_01m4amhrttndqxvcdjxsag34c9:pnpm buildpassed in 3m30.5s (4m50.4s remote command), including the public SDK and Control UI build checks. All task leases are stopped.Fresh detached Codex autoreview of the exact staged follow-up: scoped-clean, P0–P2. The committed tree matches the validated source tree.
Exact-head CI and remaining failures
Follow-up head:
cccf0f1ae59ecc595973b9a5b543ec3b46135173. CI run 37589892669 completed with 65 successful, 22 skipped, and 3 failed jobs. CI is not green. Eight additional pull-request workflows, including CodeQL and Build Artifacts, passed. No CI rerun or extra push was used to seek green.x-publication-owner-composition.e2e.test.ts:commits and anonymously reads maintainer work; denies guest and revoked creation, 404 instead of 200 at line 544d1b8902using the real CIrunShardPlanstarget launcher andOPENCLAW_E2E_USE_PREBUILT_DIST=1.chat-metadata-session-writes.test.ts:metadata read across sibling cache replacement with exact cache,database is lockedFinal attribution proof used
blacksmith-testboxleasetbx_01m4apheb98jrxyv7p17ghe4s7, with separate immutable checkouts of published headcccf0f1and based1b8902:node scripts/run-vitest.mjs <file> --maxWorkers=1)src/gateway/server-methods/chat-metadata-session-writes.test.tssrc/gateway/x-publication-owner-composition.e2e.test.tsThe standalone X runs did not reproduce CI. Switching to CI's actual launcher and prebuilt-runtime setting reproduced the exact 404/200 assertion on the base; the head passed that single launcher replay. This is evidence that the failure predates the PR, not a claim that the passing head replay fixed it. The metadata group replay used the original configs, include patterns, and worker override from the failed CI job.
All task leases are stopped. The working tree is clean, the PR remains open, and auto-merge is disabled. The lead owns landing. The metadata lock and pre-existing unused-export gate remain explicit gaps.