Repository navigation
test(subagents): settle yielded wait continuation - #160987
giodl73-repo wants to merge 1 commit into
Conversation
|
🦞👀 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 September 29, 2026, 1:22 AM ET / 05:22 UTC. ClawSweeper reviewWhat this changesAdds a zero-time fake-timer advance to the subagent registry test before it drains tracked completion work, so the collector-yield assertion can observe the settled run. Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open. Current main still has the test timing gap, and the focused change follows the settlement pattern used by nearby cases. No actionable patch defect was found; repeatability in the original failing shard remains unverified. Priority: P3 Review scores
Verification
How this fits togetherThe subagent registry records child-agent runs and reconciles results returned by the Gateway's agent.wait operation. This test supplies a yielded wait result and checks that a collector finishes without being treated as cancelled. flowchart LR
A[Gateway wait result] --> B[Subagent registry]
B --> C{Collector yielded?}
C --> D[Completion work]
E[Fake timer turn] --> D
D --> F[Recorded terminal run]
F --> G[Test assertion]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +1. Total +1 across 1 file. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the collector-yield assertion in the registry test and ensure its pending continuation is admitted before the test drains tracked completion work. Do we have a high-confidence way to reproduce the issue? No high-confidence repeatable reproduction has been demonstrated in this read-only review. The PR reports intermittent failures in a named shard, and current-main source shows the pre-drain timing gap. Is this the best way to solve the issue? Yes. Advancing the suite's fake clock before draining observed work matches nearby tests and preserves the existing terminal and no-cancellation assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e2c8c3f3e7b4. LabelsLabel 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
|
The subagent registry collector-yield case drained owned root work before the fake-timer zero-delay agent.wait continuation ran, so under shard load the run could still be running when asserted. It failed twice in checks-node-changed on #160620 and on #160969 while passing standalone. Advance fake timers by zero before draining, matching the suite's existing lifecycle-settlement pattern. Diagnosis and fix from #160987. Co-authored-by: Gio Della-Libera <[email protected]>
|
Landed on |
…ork (#161038) Cherry-pick of 4c61161 (#160987) for the 2026.9.7 release batch. Co-authored-by: Gio Della-Libera <[email protected]>
The subagent registry collector-yield case drained owned root work before the fake-timer zero-delay agent.wait continuation ran, so under shard load the run could still be running when asserted. It failed twice in checks-node-changed on openclaw#160620 and on openclaw#160969 while passing standalone. Advance fake timers by zero before draining, matching the suite's existing lifecycle-settlement pattern. Diagnosis and fix from openclaw#160987. Co-authored-by: Gio Della-Libera <[email protected]>
What Problem This Solves
The subagent registry suite uses fake timers. Its yielded
agent.waitcase drained observed root work before advancing the zero-delay continuation, so the unchanged test could leave the run inrunningstate under shard load.Change
Advance fake timers by zero before draining the owned root-work scope, matching the suite's existing lifecycle-settlement pattern.
Evidence
oxfmt --check src/agents/subagents/registry/subagent-registry.test.tsgit diff --checkchecks-node-changed-compact-large-3-2on fix: cron jobs treat node policy denials as failures #160620, including job https://github.com/openclaw/openclaw/actions/runs/36521681830/job/109259906811checks-node-changedpasses on this PR: https://github.com/openclaw/openclaw/actions/runs/36524887298/job/109265902690