Repository navigation
Conversation
Return rejected programs before draining unresolved sibling bridges. Keep unrelated idle-worker retirement outside cell settlement and distinguish tool heartbeats from model progress. Preserve successful draining and raw tool execution custody; regression coverage verifies continuation, queued input, and existing inactivity outcomes.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
Codex Review Summary: ✅ CompletedThis 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. |
|
@clawsweeper re-review The final head is Please review the rejected-program settlement, retained raw tool custody, detached idle retirement, and separation of tool heartbeats from semantic progress. The original production incident's exact await remains unproven, as the description states. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR settles rejected Code Mode programs promptly, detaches unrelated worker retirement, and prevents tool heartbeats from extending model-progress deadlines. Example: A cell runs await Promise.all([held_action({}), failing_action({})]); and failing_action throws while held_action never replies.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes source-verifiable settlement and watchdog defects still present on main, with no actionable correctness or security findings. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherCode Mode workers execute guest JavaScript and exchange tool requests with the host settlement owner; the embedded stream watchdog separately receives provider progress and tool-activity notifications and emits timeout cancellation. flowchart TD
A[Agent turn] --> B[Code Mode settlement owner]
B --> C[Node or QuickJS worker]
C --> B
B --> D[Tool execution scheduler]
D --> E[Tool implementations]
F[Provider stream and tool heartbeats] --> G[Stream watchdog]
G --> A
Technical reviewBest possible solution: Use the existing settlement, scheduler, retirement, and watchdog owners to finish failed calls promptly while preserving successful draining and underlying execution custody. Do we have a high-confidence way to reproduce the issue? Source shows rejected programs entering sibling-drain waits and argument-free tool notifications resetting semantic progress; committed regressions exercise these triggers, and the body reports red/green results without proving the original incident's exact await. Is this the best way to solve the issue? The patch is the smallest complete production repair: narrow executor conditions expose rejection to the existing settlement owner, retirement reuses tracked cleanup, and one timer default separates tool activity from provider progress. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 80ba593b8b14. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +5, Tests +352, Docs +5, Other +3. Total +365 across 12 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel 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 Reviewed November 9, 2026, 11:56 PM ET / November 10, 2026, 04:56 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…penclaw#196435) Return rejected programs before draining unresolved sibling bridges. Keep unrelated idle-worker retirement outside cell settlement and distinguish tool heartbeats from model progress. Preserve successful draining and raw tool execution custody; regression coverage verifies continuation, queued input, and existing inactivity outcomes.
## What Problem This Solves An agent cannot collect an already-finished background process when unrelated Code Mode continuations fill all 64 suspended-run slots. The fresh observer fails before reaching `process`, even with outer `awaitResults: true`. ## User Impact and Solution Required-completion cells keep their owner until settlement and cannot publish suspended continuations, so they no longer reserve a suspension slot at inline dispatch or checkpoint settlement. Agents can collect the original process result without relaunching work. Capacity errors and troubleshooting guidance explain this recovery path. Default suspension admission, existing-run reservation transfer, process retention, authority checks, and cancellation are unchanged. This complements #196435's rejected-cell settlement fix; it addresses fresh-observer admission rather than process-output loss. It intentionally permits actively owned required-completion cells at the suspension cap, not a new total-live-cell resource limit. ## Evidence - One real native background process and 64 genuine parked VM continuations: default observation fails without dispatch; required observation retrieves the original terminal output. Assertions retain one launch, one poll, the 64-slot cap, active-resume reservation, cancellation, and capacity recovery. - Regression fails on base `5e8ed5f5b437e3a8438a036eb42c4d98009d0d86`, passes with the fix. - Seven focused suites: **169 tests passed**, including agent-loop recovery, Node/QuickJS failure origins, required wait/cancellation, shell terminal draining, bridge behavior, and prompt-prefix stability. - Core and changed-test TypeScript, targeted type-aware lint, formatting, MDX, and diff checks passed. - Exact **59-line** allocation records the native-process setup and assertions added to the existing capacity test; shared scalar unchanged. Local test-line ratchet passes with 17 lines slack, and the previous head's complete baseline-ratchet CI passed. Saturation test takes about 2 seconds locally. - No new queue, quota, recovery manager, or persistent state. Production delta: 9 added / 3 removed lines. ## CI repairs Earlier heads exposed two inherited worker containment expectation failures in `checks-node-changed-11`. Source inspection and base reproduction established stale expectations after #194473's root-aware recovery and #196756's compact JSON serialization. Current main `18adeb3f1768b3c1371b3c294f06397d5cb352ea` still had those expectations; no competing fix was found. The follow-up updates only `src/worker/worker-runtime-permissions.suite.ts`: independent per-policy literal expectations and exact compact JSON output. Rejection status, tool name, escaped path, operator-only hint separation/logging, unchanged outside-file contents, and file-mode assertions remain intact. No permission behavior, ignores, retries, or gates were weakened. - `node scripts/run-vitest.mjs src/worker/worker.runtime.test.ts --maxWorkers=1`: **69 passed**, 40.79 seconds suite / 47.24 seconds wrapper. The existing suite's real background-process cleanup tests dominate duration; the two repaired cases take 29/24 ms. - Changed-test TypeScript graph (`gateway-other`), type-aware lint, formatting, diff check, and test-line ratchet passed. - New-head CI is being evaluated separately; previous-head results are not claimed as current-head CI proof. ## Review and limitations Independent native-subagent reviews of the implementation, exact allocation, and worker repair found no actionable defects. Local reviewer CLIs and bound autoreview tool were unavailable; no review tools were installed. These were narrative independent reviews, not helper-enforced isolation or structured helper validation. Hosted review of `1269cc403ec7243b847eb4cbec0ff0b5a8d08f6e` also reported no findings. The new saturation case executes Node. QuickJS support is backed by shared owner-path inspection and existing parity/failure tests, not a separate saturation run. No shipped Gateway/live-model saturation capture or guarantee of model recovery choices is claimed; proof exercises the actual Code Mode/native-process integration boundary. ## Main integration (November 11, 2026) Merged main into the published PR branch without rewriting history (head `33a9fa55f09e6cbb41300cc0aa67ee9ef2edf94b`). Verified tree equivalence with the reviewed rebase plus the disjoint main update. The equivalent rebased code passed the native-process capacity regression and 69 worker tests, targeted type-aware lint, and formatting. The final merge passed diff checks and the test-line ratchet with 10 lines slack; no shared budget increase. Updated-head CI verified on November 11, 2026: 71 checks passed, 59 skipped, no failures or pending checks on `33a9fa55f09e6cbb41300cc0aa67ee9ef2edf94b`. The PR remains open; no merge was performed. ## Main conflict resolution (November 12, 2026) Merged main `4947e40db109` normally into the PR without force-pushing. New head: `225c5b5bcf06f45ef6018580425bc94349c1b9c2`. The only conflict was in the worker containment test: main now has the same corrected messages and compact JSON expectation. Kept the already-reviewed independent per-policy literal expectations; no new production behavior. The database-worker test inventory auto-merged both additions. Scoped proof on the integrated tree: native-process saturation regression passed; all 69 worker runtime tests passed; worker test typecheck, type-aware lint, formatting, and diff check passed. Existing implementation review remains applicable to this mechanical integration. The initial worker invocation hit unresolved conflict markers after a failed editing command; the corrected complete worker suite passed. Current-head CI is pending and is required before merge; previous-head green checks are not claimed as current proof. <!-- openclaw-publication:496957c8-5491-47fa-9565-7ecf6d229daa -->
Release adaptation: preserve the existing release Code Mode harness and local cross-platform node command helper; port the native-process capacity regression and database-worker inventory with an exact 72-line allocation. Resolve documentation at existing release anchors. Omit the unrelated worker permission expectation repair. Production hunks remain upstream-equivalent. Companion dispositions: existing completion owner, native process registry, cleanup, cancellation and required wait contracts are present-equivalent. Main-only harness/helper refactors and #196435 rejected-cell settlement are not prerequisites; no later same-path changes within the pinned e0dd020 audit. Independent source review passed. Runtime and branch verification remain pending exact-candidate CI; no local product execution. (cherry picked from commit e0dd020) Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
## What Problem This Solves An agent cannot collect an already-finished background process when unrelated Code Mode continuations fill all 64 suspended-run slots. The fresh observer fails before reaching `process`, even with outer `awaitResults: true`. ## User Impact and Solution Required-completion cells keep their owner until settlement and cannot publish suspended continuations, so they no longer reserve a suspension slot at inline dispatch or checkpoint settlement. Agents can collect the original process result without relaunching work. Capacity errors and troubleshooting guidance explain this recovery path. Default suspension admission, existing-run reservation transfer, process retention, authority checks, and cancellation are unchanged. This complements openclaw#196435's rejected-cell settlement fix; it addresses fresh-observer admission rather than process-output loss. It intentionally permits actively owned required-completion cells at the suspension cap, not a new total-live-cell resource limit. ## Evidence - One real native background process and 64 genuine parked VM continuations: default observation fails without dispatch; required observation retrieves the original terminal output. Assertions retain one launch, one poll, the 64-slot cap, active-resume reservation, cancellation, and capacity recovery. - Regression fails on base `d53716c9b1671e5509516227f720722e25d9e1d4`, passes with the fix. - Seven focused suites: **169 tests passed**, including agent-loop recovery, Node/QuickJS failure origins, required wait/cancellation, shell terminal draining, bridge behavior, and prompt-prefix stability. - Core and changed-test TypeScript, targeted type-aware lint, formatting, MDX, and diff checks passed. - Exact **59-line** allocation records the native-process setup and assertions added to the existing capacity test; shared scalar unchanged. Local test-line ratchet passes with 17 lines slack, and the previous head's complete baseline-ratchet CI passed. Saturation test takes about 2 seconds locally. - No new queue, quota, recovery manager, or persistent state. Production delta: 9 added / 3 removed lines. ## CI repairs Earlier heads exposed two inherited worker containment expectation failures in `checks-node-changed-11`. Source inspection and base reproduction established stale expectations after openclaw#194473's root-aware recovery and openclaw#196756's compact JSON serialization. Current main `ecfec37bdb3551b3555550d398d19655c9327a9f` still had those expectations; no competing fix was found. The follow-up updates only `src/worker/worker-runtime-permissions.suite.ts`: independent per-policy literal expectations and exact compact JSON output. Rejection status, tool name, escaped path, operator-only hint separation/logging, unchanged outside-file contents, and file-mode assertions remain intact. No permission behavior, ignores, retries, or gates were weakened. - `node scripts/run-vitest.mjs src/worker/worker.runtime.test.ts --maxWorkers=1`: **69 passed**, 40.79 seconds suite / 47.24 seconds wrapper. The existing suite's real background-process cleanup tests dominate duration; the two repaired cases take 29/24 ms. - Changed-test TypeScript graph (`gateway-other`), type-aware lint, formatting, diff check, and test-line ratchet passed. - New-head CI is being evaluated separately; previous-head results are not claimed as current-head CI proof. ## Review and limitations Independent native-subagent reviews of the implementation, exact allocation, and worker repair found no actionable defects. Local reviewer CLIs and bound autoreview tool were unavailable; no review tools were installed. These were narrative independent reviews, not helper-enforced isolation or structured helper validation. Hosted review of `1269cc403ec7243b847eb4cbec0ff0b5a8d08f6e` also reported no findings. The new saturation case executes Node. QuickJS support is backed by shared owner-path inspection and existing parity/failure tests, not a separate saturation run. No shipped Gateway/live-model saturation capture or guarantee of model recovery choices is claimed; proof exercises the actual Code Mode/native-process integration boundary. ## Main integration (November 11, 2026) Merged main into the published PR branch without rewriting history (head `33a9fa55f09e6cbb41300cc0aa67ee9ef2edf94b`). Verified tree equivalence with the reviewed rebase plus the disjoint main update. The equivalent rebased code passed the native-process capacity regression and 69 worker tests, targeted type-aware lint, and formatting. The final merge passed diff checks and the test-line ratchet with 10 lines slack; no shared budget increase. Updated-head CI verified on November 11, 2026: 71 checks passed, 59 skipped, no failures or pending checks on `33a9fa55f09e6cbb41300cc0aa67ee9ef2edf94b`. The PR remains open; no merge was performed. ## Main conflict resolution (November 12, 2026) Merged main `ec930d1030e9` normally into the PR without force-pushing. New head: `225c5b5bcf06f45ef6018580425bc94349c1b9c2`. The only conflict was in the worker containment test: main now has the same corrected messages and compact JSON expectation. Kept the already-reviewed independent per-policy literal expectations; no new production behavior. The database-worker test inventory auto-merged both additions. Scoped proof on the integrated tree: native-process saturation regression passed; all 69 worker runtime tests passed; worker test typecheck, type-aware lint, formatting, and diff check passed. Existing implementation review remains applicable to this mechanical integration. The initial worker invocation hit unresolved conflict markers after a failed editing command; the corrected complete worker suite passed. Current-head CI is pending and is required before merge; previous-head green checks are not claimed as current proof. <!-- openclaw-publication:496957c8-5491-47fa-9565-7ecf6d229daa -->
…196435) Backport exact production and documentation hunks; adapt regressions to the release worker and required-completion admission owners. Preserve #196927. Omit optional performance harness expansion requiring an absent helper. Baseline retirement regression timed out; fixed 129 tests in 7 files pass. Scoped types/lint/format/MDX/test-line allocation and diff checks pass. Independent local review omitted by explicit release-owner instruction. Live Gateway/model and release qualification are not claimed. (cherry picked from commit 8bb413e) Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]> (cherry picked from commit 557462eee463b4e6896e9ce6c10a897bc05c8e4c)
Retain late side-effect and no-replay proof under the required #196435 contract. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
…penclaw#196435) Release-specific adaptation for 2026.11.4: Settle rejected Node/QuickJS programs despite pending siblings and stop treating tool heartbeats as model progress; omit nonexistent expired-pool retirement path. Source commit: 8bb413e Source PR: openclaw#196435 CI qualification pending; source-only verification completed. Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes Code Mode calls staying pending after an uncaught bridge error, and silent model streams staying alive indefinitely on tool heartbeats.
User Impact
Failed Code Mode programs return a tool-error result so the agent can continue and process queued input. Finished cells no longer wait for an unrelated worker's retirement. Tool heartbeats preserve connection liveness without extending the existing model-progress deadline. Cancellation does not undo partial tool effects; inspect them before retrying.
Why This Change Was Made
Both executors drained sibling bridge calls before handling an already-rejected program. They now return the rejection to the cell owner, which already cancels remaining bridge observers while the scheduler retains custody of underlying tool implementations. Successful programs still drain their dispatched calls. Node worker retirement reuses its existing tracked cleanup owner outside the finished caller's async context. The stream timer no longer mistakes argument-free tool activity notifications for semantic model progress.
No new timeout values, configuration, retries, caches, or schemas. Production delta is +5 lines for the two rejection conditions and ownership comments; retirement and inactivity changes are net zero.
Evidence
The real Agent + Node worker regression times out on the original source and passes with Node and QuickJS after the fix, including an error result, continued assistant output, and a queued follow-up. Held unrelated worker-retirement and unresolved tool-heartbeat regressions also fail before and pass after. Focused agent-loop/parity/failure-origin coverage passed 99 tests; lifecycle passed 21; stream-idle/progress passed 33; final lifecycle plus prompt-prefix stability passed 35.
The missing-response boundary test uses a real Node worker, admitted reply controller, and follow-up queue: active at 899,999 ms,
run_stalledat the existing 900,000 ms quiet-tool bound, public failed/aborted result, and queue release. Its 11-test suite passes. Provider execution is stubbed in this test; it does not establish a full live-provider run or durable Gateway terminal-notice persistence.Controlled real-worker measurements used five processes per arm with A/A and alternating AB/BA order. All 25 baseline failure cells remain pending at a 250 ms cutoff; all 25 fixed cells settle naturally (2.09 ms median, 2.94 ms p95). Healthy joined-16 latency is 3.183→2.991 ms, sampled allocation 435.81→444.01 KiB, main CPU 14.371→15.214 ms for eight cells including warmup. These fall within control variation; no throughput improvement is claimed. The worker fixture has 160 tools and does no DB/workspace I/O. Full 35 GiB DB/62k-file/btrfs Gateway scale was not exercised.
The journal's phase milestones log only their first occurrence and terminal timing logs require profiling. The exact production incident cannot be attributed solely from a gap in those logs; these are independently reproduced owner defects.
Validation: full build and final runtime refresh passed. Independent Codex review of the final contents from base
c7152f3bda8eto headae87f21e3a55is scoped-clean through P2, with no actionable findings. Fixture-only type/lint findings frompnpm check:changedwere corrected; final typecheck and lint reruns pass. Its remaining dead-export findings reproduce on the exact branch parent (22 production, 8 full-tree): introducing commits are established for 18 production entries, including #196207, while four older barrel entries still lack first-failure attribution. These are recorded as baseline failures, not passing checks.Real Gateway QA with a synthetic provider passed
qa-channel-failed-tool-terminal-finalization: one failed Code Mode execution, one ordinary provider continuation, one visible reply, and a persisted paired tool result. Terminal-outcome and durable session-failure suites passed 67 tests.stalled-turn-auto-recoveryfails identically on the candidate and exact branch parent (111.962/111.723 seconds), with no tool events. Its unchanged #161069 fixture expects a diagnostic-owned 30-second abort removed by #175837 (36e277d76147); #177557 subsequently documents diagnostic timings as reporting-only. This is a main QA regression, not passing recovery proof. The run settles with a visible failure; the real-worker/controller test above proves the never-returning bridge bound and queue release.Exact-head CI run 42755649685 completed with only
checks-fast-baseline-ratchetsand its aggregate gate failing. The failure is a 12-line test-budget deficit on the CI main parent9cebce499eb5, reproduced locally at exactly 6,615,840 lines / 6,615,828 ceiling. #196385 (b42488cbd9e6) introduced nine missing lines and #196416 (e27557203a52) added three. This PR adds 352 test lines and allocates exactly 352, preserving the inherited 12-line deficit (CI: 6,616,192 / 6,616,180). Repair is already tracked in #196432; no allowance is added here to hide it. All other selected CI jobs, including security, build, typecheck, lint, tests and UI/browser lanes, passed. Landing must retain this failed CI result and its attribution if using the authorized inherited-failure route.