Skip to content

fix(test): synchronize subagent recovery validation - #157242

Merged
roboclaw-bot merged 1 commit into
mainfrom
fix/release-requester-wake-20260924
Sep 26, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
fix/release-requester-wake-20260924

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes subagent recovery fixtures spending fake retry time while native worker reads have not reached the agent RPC, and using an outdated scripted timeout-summary contract.

User Impact

No production behavior changes. Recovery validation observes actual work entry, preserves meaningful failure outcomes, and cleans up owned work even when settlement rejects. The built-Gateway timeout scenario again exercises the current tool and compaction contracts.

Why This Change Was Made

Most of the original proposal now has a landed replacement. This candidate keeps main’s registered async task owner, requester and sentinel joins, awaited registration, transcript matching and accepted task-write drain. It does not restore the old async-export spy or archive helper.

Only the remaining fixture changes are retained: observe RPC entry while racing the existing lifecycle producer, retain serial joins and unconditional cleanup, assert the replacement finalizer’s task identity, and give the scripted timeout provider direct tools plus distinct turn-prefix/history summaries. Deadlines, delivery assertions and authority policy are unchanged.

Requested by Peter Steinberger during release-verification repair.

Worked on by

Work sessions

Evidence

Merged: 22e8095bdec1db6c13126674d5cc161390af186c at 2026-09-26 02:32:48 UTC through native completed-evidence admission. Exact attempted head, current-main containment, human co-author credit, native completion receipt/comment and native worktree/branch cleanup were verified. No admin bypass or altered drift policy was used.

Merged source 7857e7e, verified tree df3ae4226ca92a5db7bec0945b0181cb663ab991, starts from main 9665d17 and changes four test/helper files, +103 / −34. Current main’s replacements in #158020, #157150 and #157634 are retained rather than duplicated.

Readiness and cleanup

The current-main baseline passed 14/14 standalone and 58/58 grouped; the historical intermittent failure was not naturally reproduced. Controlled checks established the narrower synchronization defect: the original loop consumed 800 ms of fake retry time before observing the first RPC, versus 0 ms with explicit entry observation through the same sibling-race entrypoint. Injected producer rejection and normalized retryable-before-first-RPC each still failed the intended case, with 13 other tests passing. Temporary controls were removed.

Final lifecycle source passed 485 test executions: retry-grace 20 × 14, the three-file lifecycle group 3 × 58, archive 26, and the shared-helper announce-loop consumer 5. Standalone retry runs took 21.74–39.49 s wall (546.35 s total); group runs 71.02 / 57.18 / 67.51 s; archive 24.49 s; announce-loop 27.50 s. Native sequencing covered both retry→requester→archive and requester→retry→archive, not a fabricated original full-shard replay.

These fixture-owned source tests use actual worker-backed state and mocked Gateway dispatch through the supported process-local E2E build-skip contract. They are not built-Gateway or packaged-runtime proof. The existing accepted-write drain remains enabled. Exact-source changed checks and independent P0–P2 review passed for this lifecycle patch; the complete four-file composition then passed canonical changed-scope checks, including core/package/root-test types, all three dead-export scans, lint, formatting and ratchets. Fresh repository autoreview of that full composition was scoped-clean through P2. Commit hooks preserved the exact reviewed tree. Completed hosted CI/review evidence is recorded below.

The retry file was at its 1,000 counted-line cap. Only its scoped readiness contract was extracted into the existing support file; no new helper file, production seam, baseline change, timer increase or weakened assertion was introduced. The historical early-retryable sibling outcome remains unexplained and is not claimed fixed by passing runs.

Built timeout recovery

The timeout file is byte-identical to separately qualified commit 49f91db. Configured Blacksmith Testbox, Node24.19.0 / pnpm12.4.2 / 4 CPUs, ran a normal private-QA build (556.15 s, exit0) and both complete timeout/steering files (8/8, 131.84 s wall). The timeout case itself passed in 43.274 s, preserving one completed child, durable delivery, exactly one outbound completion and completion within the compaction window.

That proof’s exact content tree was d7cf6f6b52c4e89756d83499b5ec417dd4024283, with all 49,946 source entries verified before/after. It also contained a separate steering fixture not included in this PR. The timeout file and Gateway implementation inputs are unchanged here; this is scoped reuse, not a claim that the complete four-file candidate was rebuilt on that lease. The lease is stopped/completed and raw captures remain private. No live-provider, Codex, Windows/macOS or full-release success is claimed.

Completed hosted proof

CI36211046795 / attempt1 completed successfully: 34 successful jobs, 21 skips, zero failures. Both required CI-gate contexts and dependency/security statuses passed. The fresh exact-head ClawSweeper review found no actionable findings or before-merge items.

Preflight and executing-job checkout logs, corroborated by the commit API, bind execution to merge 08025540a73b7c0b63cc239ef9e7731eefbe0bf3, parents main7f5db650… + this PR head, tree d8508e2ea8de135014f087e2437ccc28360e441c. The changed-test job ran pnpm build qaRuntime successfully in47.4s, then passed archive26, retry/grace14 and the built-Gateway timeout case1 (55.763s assertion /68.67s Vitest).

This supplies new integrated-tree runtime evidence beyond the earlier separately qualified timeout run. It is not a full default production build, platform matrix or natural reproduction of the historical intermittent failure.

Superseded scope and remaining limits

The former six-file proposal and its historical stress results are not relabeled as current proof. The previously proposed repeated 66/67-file Gateway matrix was never run and is not counted here. After consuming the owning mainline replacements, this PR qualifies only its remaining fixture contracts through the focused source tests, independent built timeout case and normal exact-head CI/review gates. The broader frozen release diagnostic is not claimed green.


View the OpenClaw team session

@clawsweeper

clawsweeper Bot commented Sep 24, 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.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 24, 2026 11:28
@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. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 25, 2026, 10:21 PM ET / September 26, 2026, 02:21 UTC (Revision 6).

ClawSweeper review

What this changes

The branch makes subagent recovery tests observe agent RPC entry and settle owned work, checks replacement task identity, and updates the built-Gateway timeout fixture for current tool and compaction behavior.

Merge readiness

✅ Ready for maintainer review

Keep open. Merged work covers related fixtures, but current main retains the timing-based wait addressed here. The verified test merge preserves this PR’s distinct repair, and review found no blocking patch defect.

Priority: P2
Reviewed head: 7857e7efab23f6a1b89e4837086db41f952b5a55

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The narrowed fixture repair is coherent and supported by substantial scoped validation, with no discrete blocking defect found.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This bot-authored, test-only PR has no contributor live-proof gate. Its body reports worker-backed lifecycle checks and a separately qualified built-Gateway run through a scripted provider and QA transport with one delivered child completion; raw captures were private, and no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This bot-authored, test-only PR has no contributor live-proof gate. Its body reports worker-backed lifecycle checks and a separately qualified built-Gateway run through a scripted provider and QA transport with one delivered child completion; raw captures were private, and no stored-data contract changes.
Evidence reviewed 9 items Introduced repair: The pinned PR delta replaces fake-clock polling with RPC-entry observation and a race against retained root work.
Current-main gap: Current main still advances fake timers by 100 ms per attempt while waiting for an agent call; it does not have the branch’s entry signal.
Settlement boundary: The reused observer joins admitted root work and asynchronous scopes, including work admitted during drainage; the changed teardown calls it before resetting the fixture.
Findings None None.
Security None None.

How this fits together

The subagent registry records child completion before announcing results to a requester. These tests check that asynchronous work and a Gateway timeout recovery path produce one durable completion.

flowchart LR
A[Child lifecycle event] --> B[Registry and worker reads]
B --> C[Agent RPC entry]
C --> D[Fixture wait]
D --> E[Delivery assertions]
F[Gateway recovery turn] --> G[Scripted provider]
G --> E
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +69. Total +69 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 103 34 +69
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 103 34 +69

Review metrics

Metric Value Why it matters
Controlled retry-clock use 800 ms before, 0 ms after The reported control measures whether native worker reads consume the fixture’s fake retry window.

Technical review

Best possible solution:

Keep recovery assertions tied to observed RPC entry and settled owner work, while retaining the built-Gateway check for current timeout and compaction behavior.

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

Yes for the fixture timing defect: current main advances fake time while waiting for worker-backed RPC entry, and the PR reports a controlled before-and-after check. This review did not run the test, and the historical intermittent failure was not naturally reproduced.

Is this the best way to solve the issue?

Yes. Observing RPC entry and joining its producer is narrower than increasing retry time; the Gateway fixture tests the current direct-tool and summary contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded recovery-validation repair with no production behavior change.
  • merge-risk: 🚨 automation: The changed shared E2E wait and cleanup sequence affects CI failure attribution and completion.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This bot-authored, test-only PR has no contributor live-proof gate. Its body reports worker-backed lifecycle checks and a separately qualified built-Gateway run through a scripted provider and QA transport with one delivered child completion; raw captures were private, and no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-24T11:35:52.328Z sha 3a4138a :: blocked before merge. :: none
  • reviewed 2026-09-24T11:47:16.376Z sha 756b5ed :: blocked before merge. :: none
  • reviewed 2026-09-24T13:54:17.681Z sha 35ef957 :: blocked before merge. :: none
  • reviewed 2026-09-24T16:34:19.991Z sha 35ef957 :: blocked before merge. :: none
  • reviewed 2026-09-24T17:34:33.013Z sha 35ef957 :: blocked before merge. :: none

@roboclaw-bot roboclaw-bot changed the title fix(test): wait for durable requester settlement fix(test): wait for worker-backed lifecycle settlement Sep 24, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 24, 2026
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: M labels Sep 24, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 24, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 24, 2026
@roboclaw-bot roboclaw-bot self-assigned this Sep 26, 2026
Preserve current main lifecycle owners and accepted task-write drains. Observe RPC entry without advancing fake retry time, join retained producers and restore fixtures on failure, assert the replacement task identity, and align the scripted timeout fixture with current tool and summary contracts. No production behavior or test deadlines change.

Co-authored-by: steipete <[email protected]>
@roboclaw-bot
roboclaw-bot force-pushed the fix/release-requester-wake-20260924 branch from 35ef957 to 7857e7e Compare September 26, 2026 02:14
@roboclaw-bot roboclaw-bot changed the title fix(test): wait for worker-backed lifecycle settlement fix(test): synchronize subagent recovery validation Sep 26, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 26, 2026
@roboclaw-bot
roboclaw-bot merged commit 22e8095 into main Sep 26, 2026
121 of 123 checks passed
@roboclaw-bot
roboclaw-bot deleted the fix/release-requester-wake-20260924 branch September 26, 2026 02:32
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
Preserve current main lifecycle owners and accepted task-write drains. Observe RPC entry without advancing fake retry time, join retained producers and restore fixtures on failure, assert the replacement task identity, and align the scripted timeout fixture with current tool and summary contracts. No production behavior or test deadlines change.

Co-authored-by: steipete <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant