Skip to content

test(infra): await recursive spawn model entry - #149199

Merged
steipete merged 2 commits into
mainfrom
codex/qa-simulated-process
Sep 15, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/qa-simulated-process

Conversation

@steipete

@steipete steipete commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

The recursive-spawn production-boundary test returns an accepted result and then waits for the background production path to reach the embedded runner. Its 15-second polling deadline failed on two exact-head CI attempts: the accepted, active, warning-free run needed 28 and 37 seconds to reach that cold lifecycle point.

Resolve a deferred event when the mocked embedded runner is entered and await it with a measured 60-second failure bound. A timeout still passes through the current owner-fact diagnostics and AsyncWorkScope cleanup. The exact call-count, authority, lineage, model-selection, session-state, and cleanup assertions remain unchanged.

Validation:

  • Node: src/agents/subagents/spawn/subagent-spawn.production-boundary.test.ts — 10 passed
  • patched custom Bun: the same file — 10 passed
  • pnpm check:changed
  • fresh P0–P2 autoreview on current main: clean after resolving its bounded-cleanup and staged-import findings

@clawsweeper

clawsweeper Bot commented Sep 15, 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 agents Agent runtime and tooling extensions: qa-lab size: S maintainer Maintainer-authored PR labels Sep 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 12:28 PM ET / 16:28 UTC (Revision 3).

ClawSweeper review

What this changes

The recursive-spawn test waits for an explicit model-runner entry signal with a 60-second deadline instead of polling for 15 seconds.

Merge readiness

✅ Ready for maintainer review

Keep open: this remains a useful, focused test repair absent from current main. The revised finite wait addresses the earlier suspended-test concern without weakening the assertions; no blocking introduced defect was found.

Priority: P2
Reviewed head: ab3ce37c620d325f54944cbdc8e807dc9b46a3d1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test repair with a bounded wait, preserved assertions, and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER association exempts this test-only PR from external-contributor runtime proof; no authority-changing exception applies. Reported Node and Bun test results are supplemental and were not rerun during this read-only review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER association exempts this test-only PR from external-contributor runtime proof; no authority-changing exception applies. Reported Node and Bun test results are supplemental and were not rerun during this read-only review.
Evidence reviewed 8 items Verified introduced change: The merge-base-to-head diff changes only the test's entry notification and bounded wait. Existing authority, lineage, model, session, and cleanup assertions remain intact; diff whitespace validation passed.
Failure handling and review continuity: The earlier concern at #149199 (comment) targeted an indefinitely pending entry promise. Current source bounds that promise, reports owner facts on rejection, and reaches the existing finally block that resolves the model and closes owned work. It does not immediately observe terminal-before-entry, but that omission no longer establishes the reported indefinite suspension. The earlier reviewed commit was unavailable for a direct comparison.
Outer test deadline: The isolated spawn project inherits the shared 120-second test timeout. The changed entry wait is bounded at 60 seconds and existing cleanup at 15 seconds; setup also consumes the outer test budget.
Findings None None.
Security None None.

How this fits together

The test sends a child-agent request through OpenClaw’s real Gateway admission path, stopping at a mocked model runner. It checks authority, model selection, session lineage, and cleanup around that boundary.

flowchart LR
 A[Parent agent fixture] --> B[Child spawn request]
 B --> C[Gateway admission]
 C --> D[Background execution]
 D --> E[Model entry signal]
 E --> F[Assertions or timeout diagnostics]
 F --> G[Owned work cleanup]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +17. Total +17 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 20 3 +17
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 20 3 +17

Review metrics

Metric Value Why it matters
Failure budget 60-second entry wait; 15-second cleanup; 120-second outer test timeout The revised wait is finite and leaves nominal cleanup headroom, although setup also consumes the outer budget.

Technical review

Best possible solution:

Retain event-based synchronization with a finite failure deadline, owner-fact diagnostics, and the existing behavioral assertions and cleanup.

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

No deterministic reproduction was established in this read-only review; the body reports two loaded CI runs exceeding the current 15-second deadline, consistent with the inspected asynchronous path.

Is this the best way to solve the issue?

Yes: the explicit entry event and measured finite deadline fit this boundary test while preserving its assertions. Immediate terminal detection would improve failure latency, but the former unbounded-wait defect is addressed.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4d6b18b6ca46.

Labels

Label justifications:

  • P2: This is a bounded test-reliability repair with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied MEMBER association exempts this test-only PR from external-contributor runtime proof; no authority-changing exception applies. Reported Node and Bun test results are supplemental and were not rerun during this read-only review.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: 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 (2 earlier review cycles)
  • reviewed 2026-09-15T15:25:42.485Z sha 30b32c52752e4264af33ebf2f0f9b11ccb1e6c1a :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-15T15:41:35.416Z sha 027136e :: needs maintainer review before merge. :: none

@steipete steipete changed the title test(infra): stabilize runtime boundary fixtures test(infra): await recursive spawn model entry Sep 15, 2026
@steipete
steipete force-pushed the codex/qa-simulated-process branch from 30b32c5 to 027136e Compare September 15, 2026 15:33
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 15, 2026
@vincentkoc

Copy link
Copy Markdown
Member

P2: make the model-entry wait observe execution termination.

At 027136e594eb78ea828cdf79b5574bc1c26b1679, modelRunStarted.promise at src/agents/subagents/spawn/subagent-spawn.production-boundary.test.ts:453 only settles inside the model mock. If an accepted Gateway execution fails before that call, the production dispatcher records the terminal result and completes, but this await remains pending.

Vitest 5's outer timeout rejects a wrapper and starts afterEach; it does not unwind the suspended test body or force its finally to run (timeout implementation, teardown ordering). The fixture can restore its environment while this test's cleanup remains unresolved.

Please link the entry signal to the exact execution's terminal outcome and cancellation, fail on terminal-before-entry, and join owned work before fixture restoration. Keep the event-based success assertions and verify a pre-model failure path. This is an introduced failure-path issue, not attribution of the original CI timeout. The preexisting cleanup-wait/release weakness can remain a separate follow-up.

@vincentkoc vincentkoc self-assigned this Sep 15, 2026
@steipete
steipete force-pushed the codex/qa-simulated-process branch from 027136e to ab3ce37 Compare September 15, 2026 16:22
@steipete
steipete merged commit 38c3edc into main Sep 15, 2026
105 of 107 checks passed
@steipete
steipete deleted the codex/qa-simulated-process branch September 15, 2026 16:47
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@vincentkoc

Copy link
Copy Markdown
Member

Resolved in ab3ce37c620d325f54944cbdc8e807dc9b46a3d1, now landed in 38c3edcc4caf692bbb9ff0078bda002587528036. The finite 60-second rejecting entry deadline returns failure through the existing diagnostics and finally cleanup, resolving the unbounded-wait concern in my earlier P2 comment. The substantive assertions remain intact.

Exact-head CI passed; the owning test job passed all 10 cases.

Follow-up — spawn fixture teardown after drain timeout: the existing closeBoundGateway release-after-unsuccessful-drain behavior predates this change and remains separate.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
* test(infra): stabilize runtime boundary fixtures

* test(infra): bound cold spawn entry wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

2 participants