Skip to content

fix(agents): collect process results at suspended-run capacity - #196927

Merged
RomneyDa merged 8 commits into
mainfrom
openclaw/retro-continuation
Nov 12, 2026
Merged

RomneyDa merged 8 commits into
mainfrom
openclaw/retro-continuation

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

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.

RomneyDa and others added 2 commits November 11, 2026 00:20
Required-completion cells cannot publish suspended runs, so do not reserve their slots before collecting existing results. Preserve default admission and existing-run ownership, and give callers recovery guidance without replaying effects.

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 496957c8-5491-47fa-9565-7ecf6d229daa
@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: S labels Nov 11, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 11, 2026
RomneyDa and others added 2 commits November 11, 2026 00:37
Record exactly the 59 added regression lines for real process collection under suspended-run saturation; leave the shared baseline unchanged.

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 93e0700f-0694-407a-8ced-759df67e99fe
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 1269cc403ec7243b847eb4cbec0ff0b5a8d08f6e, but the PR head is now 33a9fa55f09e6cbb41300cc0aa67ee9ef2edf94b. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-11T01:06:42.745Z sha 1269cc4 :: needs maintainer review before merge. :: none

RomneyDa and others added 3 commits November 11, 2026 01:44
Preserve exact rejection, output and operator-hint assertions while matching root-aware recovery guidance and compact JSON tool results.

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 60a26937-f0ea-4c37-8ec4-fd1421b464aa
Integrate current main without rewriting the published PR history. Tree matches the reviewed rebased patch plus the disjoint current-main update.

Co-authored-by: RomneyDa <[email protected]>
@clawsweeper clawsweeper Bot removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 11, 2026
Preserve the independently reviewed per-policy literal expectations; current main now carries equivalent containment text and compact JSON assertions.

Co-authored-by: RomneyDa <[email protected]>
@RomneyDa
RomneyDa enabled auto-merge (squash) November 12, 2026 01:01
@RomneyDa
RomneyDa merged commit e0dd020 into main Nov 12, 2026
139 checks passed
@RomneyDa
RomneyDa deleted the openclaw/retro-continuation branch November 12, 2026 01:10
RomneyDa added a commit that referenced this pull request Nov 12, 2026
Restore the upstream live-config selector from cba956f and optional cancellation signal contract. Use the existing release config-path reader for boolean approval explanations instead of importing the later normalization refactor. Fixes the compiled-subprocess and declaration-build prerequisites observed in CI 43134462281; runtime qualification remains pending. Independent P0-P2 source review found no findings. The seven #196927 files are unchanged.

Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 12, 2026
Backport the Vincent-approved narrow #196927 fix to release/2026.11.5.
Required-completion cells retain their owner instead of reserving a slot
for a suspended continuation, so an observer can collect the original
native process result with all 64 suspension slots occupied.

Keep the existing suspension cap, active-resume reservation, cancellation,
execution limits, and native process retention contracts unchanged. Add
the native-process regression, its database-worker classification, recovery
guidance, and exact 59-line regression allocation without raising the
shared test budget.

Release adaptation: omit the source worker-containment expectation cleanup.
This branch still produces the older shared recovery hint and pretty JSON
that its existing tests require; importing newer expectations would be wrong.
Preserve branch-local plugin reload behavior; no unrelated companions are
imported. #196924/#196929 applicability remains with the release owner.

Proof: native saturation regression fails at required observer collection
on base 7ca4c3c, then passes with this fix.
Nine owner, agent-loop, Node/QuickJS, required-wait, native process-delivery,
and prefix suites pass (172 tests). Unchanged worker runtime/containment
and classifier-registry suites pass (81 tests). Core and affected-test
TypeScript, type-aware lint, formatting, docs MDX/link checks, staged
test-line ratchet, and diff checks pass.

Companion audit limitation: the helper refuses the shallow repository
because baseline and e0dd020 have no auditable merge base. Direct bounded
source/owner/caller comparisons verified the required-completion contracts;
no remote/history mutation or future-main import was used. Independent
review and release qualification remain with the parent release owner.

(cherry picked from commit e0dd020)

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 12, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant