Repository navigation
chore(test): stop Codex Computer Use and Signal batching tests flaking under load - #157334
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
…gnals The Computer Use elicitation test ran on real time with a 5s attempt budget that starts before async preparation. Under load the deadline controller armed an already-overdue watchdog, the timeout handler aborted the run, and finalization correctly reported aborted:true for the completed variant. Harness waits also used vi.waitFor, which advances fake clocks even when the awaited request already exists and so spends the execution budget. Record requests/handlers/server responses with deferred waiters, expose turn acceptance from the attempt wrapper, run the Computer Use test on a fake deadline clock, and add an activation regression with a 1ms budget that fails on the polling fixture.
…ll-clock polling The batched-reply test polled replyMock with a 5s real-time vi.waitFor and aborted the monitor when it expired. Under host load, dispatch of the debounced events started after that budget, so the test stopped valid in-flight work (Mac: 3/3 fail, Linux: 3/3 pass). Advance the 10ms debounce with fake timeouts after the ingress monitor is idle and await actual sends; assert per-message MessageSid/RawBody so merged events still fail.
4dab170 to
7f2ff83
Compare
|
Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 10:54 AM ET / 14:54 UTC. ClawSweeper reviewWhat this changesThe branch replaces polling in Codex app-server and Signal test harnesses with event-based waits and updates their assertions. Merge readiness✅ Ready for maintainer review Keep open: current main still has the timing-sensitive waits, and source review found no definite defect in this focused repair. Priority: P2 Review scores
Verification
How this fits togetherThe Codex plugin tests drive synthetic app-server turns and check their outcomes. Signal tests feed inbound events through the monitor and check the resulting replies. flowchart LR
A[Codex test turn] --> B[App-server fixture]
B --> C[Request and acceptance signals]
C --> D[Turn assertions]
E[Signal inbound events] --> F[Ingress monitor and debounce]
F --> G[Reply assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +124. Total +124 across 14 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the waits tied to fixture-owned completion signals and retain assertions for Codex terminal outcomes and distinct Signal replies. Do we have a high-confidence way to reproduce the issue? No high-confidence current-main execution was established in this read-only review. Source confirms the timing-sensitive waits, and the PR reports failures on loaded hosts. Is this the best way to solve the issue? Yes. Fixture-owned request and delivery signals address the stated timing dependency without changing product behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1b32a8b3c7fc. 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.
|
* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (134 commits) fix(build): scope normalization declarations to package sources (#157174) fix: exit after validating Codex model references (#157323) fix(gateway): guard workspace adoption during active work (#157259) fix(update): rebuild stale Git runtimes when source is already current (#156996) fix: require a click before diagnosing failed updates (#157359) test(release): provide sealed artifact inputs to writer fixtures fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683) fix(test): prepare native UI fixtures before compilation fix(test): await outbound delivery readiness before assertions fix: clarify deferred Codex catalog refresh warnings (#157352) fix(skills): refresh skills after watched directories are replaced (#156324) ci: reduce Node fixture overhead and defer seven release matrices (#157341) chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334) fix(gateway): retain owned suspension status during restart (#157258) fix(ci): scope desktop status assertions to the selected worker chore(i18n): refresh native locales (#157337) test(daemon): use the native PowerShell probe budget (#157289) fix(exec): avoid gateway stalls during background task writes (#157177) test(cli): isolate preaction title setter state fix(test): synchronize Git backoff cancellation readiness (#157315) ...
* commit 'c4333da677cbdfe1bbaf783ed01c363ff39e93b8': (100 commits) fix(test): stop preflight mocks leaking into shared workers (#157207) fix(build): scope normalization declarations to package sources (#157174) fix: exit after validating Codex model references (#157323) fix(gateway): guard workspace adoption during active work (#157259) fix(update): rebuild stale Git runtimes when source is already current (#156996) fix: require a click before diagnosing failed updates (#157359) test(release): provide sealed artifact inputs to writer fixtures fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683) fix(test): prepare native UI fixtures before compilation fix(test): await outbound delivery readiness before assertions fix: clarify deferred Codex catalog refresh warnings (#157352) fix(skills): refresh skills after watched directories are replaced (#156324) ci: reduce Node fixture overhead and defer seven release matrices (#157341) chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334) fix(gateway): retain owned suspension status during restart (#157258) fix(ci): scope desktop status assertions to the selected worker chore(i18n): refresh native locales (#157337) test(daemon): use the native PowerShell probe budget (#157289) fix(exec): avoid gateway stalls during background task writes (#157177) test(cli): isolate preaction title setter state ...
* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (122 commits) fix(build): scope normalization declarations to package sources (#157174) fix: exit after validating Codex model references (#157323) fix(gateway): guard workspace adoption during active work (#157259) fix(update): rebuild stale Git runtimes when source is already current (#156996) fix: require a click before diagnosing failed updates (#157359) test(release): provide sealed artifact inputs to writer fixtures fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683) fix(test): prepare native UI fixtures before compilation fix(test): await outbound delivery readiness before assertions fix: clarify deferred Codex catalog refresh warnings (#157352) fix(skills): refresh skills after watched directories are replaced (#156324) ci: reduce Node fixture overhead and defer seven release matrices (#157341) chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334) fix(gateway): retain owned suspension status during restart (#157258) fix(ci): scope desktop status assertions to the selected worker chore(i18n): refresh native locales (#157337) test(daemon): use the native PowerShell probe budget (#157289) fix(exec): avoid gateway stalls during background task writes (#157177) test(cli): isolate preaction title setter state fix(test): synchronize Git backoff cancellation readiness (#157315) ...
* test(ui): cover stack-free tooltip disconnect cleanup * fix(build): scope normalization declarations to package sources Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy. * Merge normalization declaration scope for tooltip proof * commit '81aeccb3db80136a118d6d2f98b67d836ec25e51': fix(build): scope normalization declarations to package sources * fix(ui): avoid retaining tooltip anchors in abort reasons * Merge main to include native wrapper source inventory repair * commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (134 commits) fix(build): scope normalization declarations to package sources (#157174) fix: exit after validating Codex model references (#157323) fix(gateway): guard workspace adoption during active work (#157259) fix(update): rebuild stale Git runtimes when source is already current (#156996) fix: require a click before diagnosing failed updates (#157359) test(release): provide sealed artifact inputs to writer fixtures fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683) fix(test): prepare native UI fixtures before compilation fix(test): await outbound delivery readiness before assertions fix: clarify deferred Codex catalog refresh warnings (#157352) fix(skills): refresh skills after watched directories are replaced (#156324) ci: reduce Node fixture overhead and defer seven release matrices (#157341) chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334) fix(gateway): retain owned suspension status during restart (#157258) fix(ci): scope desktop status assertions to the selected worker chore(i18n): refresh native locales (#157337) test(daemon): use the native PowerShell probe budget (#157289) fix(exec): avoid gateway stalls during background task writes (#157177) test(cli): isolate preaction title setter state fix(test): synchronize Git backoff cancellation readiness (#157315) ... Co-authored-by: Vincent Koc <[email protected]>
…g under load (openclaw#157334) * test(codex): replace app-server harness polling with owned request signals The Computer Use elicitation test ran on real time with a 5s attempt budget that starts before async preparation. Under load the deadline controller armed an already-overdue watchdog, the timeout handler aborted the run, and finalization correctly reported aborted:true for the completed variant. Harness waits also used vi.waitFor, which advances fake clocks even when the awaited request already exists and so spends the execution budget. Record requests/handlers/server responses with deferred waiters, expose turn acceptance from the attempt wrapper, run the Computer Use test on a fake deadline clock, and add an activation regression with a 1ms budget that fails on the polling fixture. * test(signal): drive batched debounce with owned signals instead of wall-clock polling The batched-reply test polled replyMock with a 5s real-time vi.waitFor and aborted the monitor when it expired. Under host load, dispatch of the debounced events started after that budget, so the test stopped valid in-flight work (Mac: 3/3 fail, Linux: 3/3 pass). Advance the 10ms debounce with fake timeouts after the ingress monitor is idle and await actual sends; assert per-message MessageSid/RawBody so merged events still fail.
* test(ui): cover stack-free tooltip disconnect cleanup * fix(build): scope normalization declarations to package sources Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy. * Merge normalization declaration scope for tooltip proof * commit '81aeccb3db80136a118d6d2f98b67d836ec25e51': fix(build): scope normalization declarations to package sources * fix(ui): avoid retaining tooltip anchors in abort reasons * Merge main to include native wrapper source inventory repair * commit 'f11e16cd65951f284264bd202b49984e21091cf5': (134 commits) fix(build): scope normalization declarations to package sources (openclaw#157174) fix: exit after validating Codex model references (openclaw#157323) fix(gateway): guard workspace adoption during active work (openclaw#157259) fix(update): rebuild stale Git runtimes when source is already current (openclaw#156996) fix: require a click before diagnosing failed updates (openclaw#157359) test(release): provide sealed artifact inputs to writer fixtures fix(ios): preserve chat state and adapt layout when iPad windows resize (openclaw#156683) fix(test): prepare native UI fixtures before compilation fix(test): await outbound delivery readiness before assertions fix: clarify deferred Codex catalog refresh warnings (openclaw#157352) fix(skills): refresh skills after watched directories are replaced (openclaw#156324) ci: reduce Node fixture overhead and defer seven release matrices (openclaw#157341) chore(test): stop Codex Computer Use and Signal batching tests flaking under load (openclaw#157334) fix(gateway): retain owned suspension status during restart (openclaw#157258) fix(ci): scope desktop status assertions to the selected worker chore(i18n): refresh native locales (openclaw#157337) test(daemon): use the native PowerShell probe budget (openclaw#157289) fix(exec): avoid gateway stalls during background task writes (openclaw#157177) test(cli): isolate preaction title setter state fix(test): synchronize Git backoff cancellation readiness (openclaw#157315) ... Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Fixes: two plugin test files fail intermittently on loaded hosts. The Codex Computer Use elicitation test reports a completed turn as
aborted: true, and the Signal batched-reply test sees 0 replies instead of 2.User Impact
No user-visible change. Maintainers and contributors stop seeing red PR CI and failed local runs from these tests. Product code is unchanged.
Why This Change Was Made
Both tests depended on wall-clock time, which
docs/help/testing/writing-tests.mdforbids.extensions/codex/src/app-server): the attempt's 5s execution budget starts before async preparation. Under load, the deadline controller arms an already-overdue watchdog, the timeout handler aborts the run, and finalization correctly reportsaborted: truefor the "completed" variant. Harness waits usedvi.waitFor, which advances fake clocks even when the awaited request already exists, so it also spent the budget. The harness now resolves deferred waiters when requests, handlers, and server responses are recorded, and exposes turn acceptance from the attempt wrapper. The Computer Use test runs on a fake deadline clock. Sibling tests now await acceptance or prompt persistence where they relied on the old polling order, and all their assertions still apply.extensions/signal/src): the batched-reply test polledreplyMockwith a 5s real-timevi.waitForand then aborted the monitor. Under load, debounced dispatch started after that budget, so the test cancelled valid in-flight work (Mac: 3/3 fail, Linux: 3/3 pass). The test now advances the 10ms debounce with fake timeouts once ingress is idle, and awaits the actual sends. ExactMessageSid/RawBodychecks still fail if the two events are merged.The other reported Signal failure ("cancels a pending reply-session conflict retry…", CI job 107407804689) ran on PR head c41aae5. That head predates 8b14034, which already replaced that test's polling on
main. It is not changed here.Evidence
run-attempt.activation.test.ts: an accepted attempt with a 1ms budget. Against the original polling fixtures it fails withaborted: true, timedOut: true, promptError: "codex app-server execution budget timed out"; with the fix it passes.extensions/codex/src/app-serversuite: 50 files, 737 tests passed. Linux Testbox run: https://github.com/openclaw/openclaw/actions/runs/36009225426expected 2 calls, got 0. A temporary mutation that merges the two events is rejected by the stronger assertions. 20/20 Linux full-file runs and 70/70 shared-harness sibling tests passed. Testbox: https://github.com/openclaw/openclaw/actions/runs/36001546896node scripts/check-changed.mjsandgit diff --checkpass.node scripts/run-vitest.mjs <file> --maxWorkers=1, heavily loaded host, so not a speedup claim): Codex Computer Use 421s before, 354s after. Signal responseprefix on the same Testbox: 62.8s before, 48.2s after.