Repository navigation
fix(test): prevent late announcements from contaminating registry tests - #157681
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: needs maintainer review before merge. Reviewed September 24, 2026, 7:51 PM ET / 23:51 UTC. ClawSweeper reviewWhat this changesThe branch moves a subagent registry test into its existing settlement helper and waits for that case’s asynchronous announcement cleanup before it finishes. Merge readiness✅ Ready for maintainer review Keep open. Current main still has the unjoined test case, while the proposed fixture repair addresses a credible cross-case announcement leak. No actionable patch defect emerged from source review. Priority: P3 Review scores
Verification
How this fits togetherThe subagent registry reconciles child-run state with persisted session results and then performs completion cleanup, including announcements. Its test suite uses shared mocks to check those outcomes across successive cases. flowchart LR
A[Persisted child result] --> B[Registry sweep]
B --> C[Completion reconciliation]
C --> D[Announcement cleanup]
D --> E[Test work observer]
E --> F[Next test case]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +26. Total +26 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep asynchronous announcement settlement within the test case that starts it, preserving the original reconciliation assertions and the later case’s announcement-count check. Do we have a high-confidence way to reproduce the issue? Yes, for a controlled fixture race: hold the announcement-module loader and run the registry suite through the later count assertion. The PR reports that result, while this read-only review did not execute it on current main. Is this the best way to solve the issue? Yes. Joining work through the existing root-work observer addresses the originating fixture without weakening either case’s assertions or changing production delivery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8cd71d28c9fe. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash auto-merge.
|
* commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits) fix(ci): prevent Security Review checkout retry collisions (#157652) fix(ci): recover interrupted Security Review response bodies (#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) ...
* commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) docs(gateway): show how we build OpenClaw on Team (#157675) refactor: verify IRC surrogate chunking over loopback (#157580) ...
* fix(ui): keep Stop available while drafts cannot send * chore: integrate main fixes for Stop UI validation * commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits) fix(ci): prevent Security Review checkout retry collisions (#157652) fix(ci): recover interrupted Security Review response bodies (#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) ... Co-authored-by: Vincent Koc <[email protected]>
* fix(ui): keep Stop available while drafts cannot send * chore: integrate main fixes for Stop UI validation * commit '5dae23c843013fce2e0bb80037d232bbabfc70e5': (41 commits) fix(ci): prevent Security Review checkout retry collisions (openclaw#157652) fix(ci): recover interrupted Security Review response bodies (openclaw#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (openclaw#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131) refactor(msteams): share stored service URL validation (openclaw#157706) fix(codex): honor configured tool PATH in native commands (openclaw#157290) refactor(msteams): share approval kind labels (openclaw#157705) fix(sessions): keep session results current during cold reads (openclaw#156121) fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535) refactor(i18n): reuse native branch candidate extraction (openclaw#157636) fix(update): preserve recovery files after ownership refusal (openclaw#148890) fix(test): prevent late announcements from contaminating registry tests (openclaw#157681) fix(e2e): scan full onboarding logs for prompts (openclaw#157624) refactor(session-tools): derive contracts from schemas (openclaw#156365) refactor(channels): derive config contracts from schemas (openclaw#156367) perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689) refactor: reuse prepared fixtures in slow core tests (openclaw#157685) refactor(codex): reuse marketplace reference selection (openclaw#157621) chore(ui): refresh control ui locales (openclaw#157710) ... Co-authored-by: Vincent Koc <[email protected]>
* refactor(ui): share slash-command failure results * Merge main to incorporate the upstream update type fix * commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits) fix(subagents): stop completion transcript retry loops (#157571) perf(sessions): remove duplicate foreground history reference scans (#157572) improve(typesafe): defer startup work until the first decision (#157380) fix(update): restore npm-pack helper typechecking (#157659) fix(packaging): avoid heap exhaustion on large bundles (#157471) refactor(infra): share process error handler registries (#157632) chore(ui): refresh control ui locales (#157573) fix(gateway): release remote Skills subscriptions when shutdown drains (#157592) perf(plugins): reuse declared tool membership during resolution (#156205) fix(ui): pasted text previews fail before sending (#157390) fix(agents): wait for database resources during deletion (#157631) improve: move operator profile database reads off the Gateway thread (#155800) fix: explain rejected settings without losing edits (#157549) fix: keep Gateway responsive while recording trajectory events (#157598) fix(auth): show SIWC email and selected model account identity (#157629) docs: explain Codex app approval precedence (#155089) refactor(wizard): share select prompt requests (#157607) fix(ui): omit empty sections from conversation Markdown exports (#157590) fix(doctor): explain update lint supervisor refusals (#156547) fix(ui): GitHub folder links lose repository context (#157619) ... * Merge frozen main to include the question fixture authority fix * commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) docs(gateway): show how we build OpenClaw on Team (#157675) refactor: verify IRC surrogate chunking over loopback (#157580) ... * chore: merge frozen main prerequisite repairs Co-authored-by: Vincent Koc <[email protected]>
* refactor(ui): share slash-command failure results * Merge main to incorporate the upstream update type fix * commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits) fix(subagents): stop completion transcript retry loops (openclaw#157571) perf(sessions): remove duplicate foreground history reference scans (openclaw#157572) improve(typesafe): defer startup work until the first decision (openclaw#157380) fix(update): restore npm-pack helper typechecking (openclaw#157659) fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471) refactor(infra): share process error handler registries (openclaw#157632) chore(ui): refresh control ui locales (openclaw#157573) fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592) perf(plugins): reuse declared tool membership during resolution (openclaw#156205) fix(ui): pasted text previews fail before sending (openclaw#157390) fix(agents): wait for database resources during deletion (openclaw#157631) improve: move operator profile database reads off the Gateway thread (openclaw#155800) fix: explain rejected settings without losing edits (openclaw#157549) fix: keep Gateway responsive while recording trajectory events (openclaw#157598) fix(auth): show SIWC email and selected model account identity (openclaw#157629) docs: explain Codex app approval precedence (openclaw#155089) refactor(wizard): share select prompt requests (openclaw#157607) fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590) fix(doctor): explain update lint supervisor refusals (openclaw#156547) fix(ui): GitHub folder links lose repository context (openclaw#157619) ... * Merge frozen main to include the question fixture authority fix * commit 'dc64cc3a3a3cf38fff1e44c1d7af42a32929d7e4': (25 commits) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (openclaw#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131) refactor(msteams): share stored service URL validation (openclaw#157706) fix(codex): honor configured tool PATH in native commands (openclaw#157290) refactor(msteams): share approval kind labels (openclaw#157705) fix(sessions): keep session results current during cold reads (openclaw#156121) fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535) refactor(i18n): reuse native branch candidate extraction (openclaw#157636) fix(update): preserve recovery files after ownership refusal (openclaw#148890) fix(test): prevent late announcements from contaminating registry tests (openclaw#157681) fix(e2e): scan full onboarding logs for prompts (openclaw#157624) refactor(session-tools): derive contracts from schemas (openclaw#156365) refactor(channels): derive config contracts from schemas (openclaw#156367) perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689) refactor: reuse prepared fixtures in slow core tests (openclaw#157685) refactor(codex): reuse marketplace reference selection (openclaw#157621) chore(ui): refresh control ui locales (openclaw#157710) docs(gateway): show how we build OpenClaw on Team (openclaw#157675) refactor: verify IRC surrogate chunking over loopback (openclaw#157580) ... * chore: merge frozen main prerequisite repairs Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Fixes an intermittent subagent registry test failure when announcement cleanup from an earlier case reaches a later case's shared mock.
User Impact
No user-visible behavior changes. This is a test fixture repair that keeps asynchronous cleanup within the case that started it.
Why This Change Was Made
The persisted-completion case waits for the registry outcome but can finish before its eligible announcement cleanup settles. Join that work through the existing
observeRootWorkowner infinally, after the original outcome and archive assertions. Move the same case into the existing task-settlement helper to respect the main fixture's line budget, preserving its registration position, setup, and assertions. The later case's announcement count and 20-second fake-time advance remain unchanged.Evidence
A controlled delay at the real announcement-module loader reproduced the original count failure: 185 cases passed and the later case saw two calls instead of one. The extra call carried the earlier producer's run ID. With the fixture join, the same held loader kept settlement pending until release, cleanup completed in its originating case, and all 186 cases passed. No announcement was fabricated or filtered.
The final two-file candidate passed 20 full-file runs (3,720 cases; median 26.965 seconds, range 23.64–35.81), three original 88-file cohorts (1,478 passes and 14 existing skips each; 96.29, 92.61, and 96.56 seconds), and three additional lifecycle/cleanup/recovery shards. Selected formatting, size/assertion, graph, type, and lint checks passed, and independent review found no actionable issue.
Those stress results bind to the original failing CI merge
b6f43e66c1f6c2bfd76a38be542349adedee525dwith candidate tree9964f3ae878e4d216f27ee5542382e7c41067c25. The patch is integrated onto main0484d7a3ecf52589b0d3d98741e58e5f6b5bf661, preserving its newer registration awaits and shared scope observer. On published heade4dc6855acc59eff578c8fd684575a9840a08caa, the pristine whole file passed all 186 cases in 33.93 seconds. A narrowly scoped real-loader hold also passed all 186 in 30.39 seconds: the actual current settler stayed pending until release, the producer announced before reset with zero remaining roots, and the later unchanged 20-second assertion saw onlyrun-aborted-end. Exact-head CI 36073249467 completed successfully. Remote proof used Node 24.19.0, two workers, and the original 8 GiB V8 limit on a 16 GB host, versus roughly 32 GB available in the original CI runner. The controller retained all repetition summaries and successful gate results; raw per-run logs became unavailable after the proof lease completed.The historical CI log did not record the second caller's arguments. This proves a controlled cross-fixture mock leak, not the exact historical caller or duplicate production transport delivery. No new test cases, production changes, timeout increases, or retry-based fixes are introduced.
Initial integrated CI exposed a pre-existing
UpdateStepResulttype import error outside this patch. The branch incorporates the canonical fix from #157659 (b5cfc8dd9221e23c04f336555eb061a289ec5b4d); the net PR remains the same two fixture files.An initial integration diagnostic passed the producer barrier but failed the later count assertion (185 passes, one failure). That probe wrapped every loader call in an additional async step; its second caller was not recorded. The corrected probe returns unselected loader promises unchanged, restores the loader spy immediately after the producer settles, and records target identities before the assertion. The earlier confounded result is retained without attributing its unobserved caller. Current raw logs were collected and hash-verified before the lease was closed.