Repository navigation
test: stabilize flaky fixtures (batch f036) - #159046
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 26, 2026, 2:22 PM ET / 18:22 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch changes Slack, Gateway, Doctor, CLI, SCP, and Android test fixtures to coordinate readiness and process cleanup, and prepares CLI worker artifacts used by those tests. Merge readiness✅ Ready for maintainer review Current main still contains the fixture races this PR addresses. The branch remains a coherent test-stability change, and source review found no discrete introduced defect. Its exact-head validation is still pending. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's test tooling prepares runtime artifacts before test workers start. The affected fixtures then exercise channel, Gateway, CLI, and release paths and feed their results into CI. flowchart LR
A[CI test selection] --> B[Prepared worker artifacts]
B --> C[Test fixture setup]
C --> D{Ready and owned?}
D --> E[Channel and process scenarios]
E --> F[Test results]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +313, Other +34. Total +347 across 15 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the fixture-owned readiness and cleanup changes, and use the normal exact-head CI gate to verify that the existing assertions execute successfully. Do we have a high-confidence way to reproduce the issue? No high-confidence final-head reproduction was recorded: the PR describes intermittent failures, but its focused Testbox attempt did not reach test execution. Source inspection shows the Gateway port race and fixture lifetime paths. Is this the best way to solve the issue? Yes, provisionally. The changes synchronize on fixture-owned readiness and join child work while preserving the existing assertions; exact-head execution is still needed to verify the result. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 31445e843ad8. LabelsLabel changes: No label 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
HistoryReview history (2 earlier review cycles)
|
Align the webchat fixture's runtime registry with its disabled-plugin config. Shared channel stubs otherwise load bundled message adapters during tool resolution, delaying the test deadline and letting stale teardown interrupt the following case. Proof: both reported cases passed 10 isolated runs; the complete 13-case file passed twice. Formatting, typechecking, targeted lint, and P2 autoreview passed. check-changed hit only Knip ETIMEDOUT on both permitted attempts.
Align supplied and ambient fixture config to avoid cold bundled-plugin discovery. Own and join dispatch work before resetting shared state, and wait on Bolt readiness events. Control the stalled-auth deadline through real request and socket-close events, with cancellation-aware cleanup and fixture-owned database setup.
Wait for the existing bound-port announcement on an OS-assigned port instead of racing the implicit one-second startup poll. Preserve the real health check, cancellation, cleanup, and stream assertions. The final full-shard run passes both streams and global run observation.
Scope real plugin discovery to each fixture and prepare the compiled Discord package needed by config migration coverage. Keep cold unrelated plugin imports outside the existing test deadlines.
Keep the broadcast fixture stabilization but drop the startup-only build prerequisite that pushes the retained CLI runtime cohort beyond its existing prediction bound. Preserve main startup behavior and all bounds. Include Doctor preflight in its exact runtime ownership expectations.
8e19a41 to
2af19e0
Compare
* test(gateway): stabilize CLI question authority fixtures Align the webchat fixture's runtime registry with its disabled-plugin config. Shared channel stubs otherwise load bundled message adapters during tool resolution, delaying the test deadline and letting stale teardown interrupt the following case. Proof: both reported cases passed 10 isolated runs; the complete 13-case file passed twice. Formatting, typechecking, targeted lint, and P2 autoreview passed. check-changed hit only Knip ETIMEDOUT on both permitted attempts. * test(slack): stabilize auth monitor fixtures Align supplied and ambient fixture config to avoid cold bundled-plugin discovery. Own and join dispatch work before resetting shared state, and wait on Bolt readiness events. Control the stalled-auth deadline through real request and socket-close events, with cancellation-aware cleanup and fixture-owned database setup. * test(gateway): stabilize mock provider readiness Wait for the existing bound-port announcement on an OS-assigned port instead of racing the implicit one-second startup poll. Preserve the real health check, cancellation, cleanup, and stream assertions. The final full-shard run passes both streams and global run observation. * test(commands): stabilize doctor preflight fixtures Scope real plugin discovery to each fixture and prepare the compiled Discord package needed by config migration coverage. Keep cold unrelated plugin imports outside the existing test deadlines. * test(cli): stabilize startup and broadcast fixtures * test(scripts): stabilize Android qualification fixture * test(auto-reply): stabilize SCP cancellation fixture * test: preserve existing CLI runtime shard budget Keep the broadcast fixture stabilization but drop the startup-only build prerequisite that pushes the retained CLI runtime cohort beyond its existing prediction bound. Preserve main startup behavior and all bounds. Include Doctor preflight in its exact runtime ownership expectations.
What Problem This Solves
Fixes intermittent test failures caused by cold plugin discovery, process startup races, and fixture work outliving its test in campaign batch f036.
User Impact
Developer validation becomes more deterministic. Runtime production behavior, test assertions, and coverage cases are preserved.
Why This Change Was Made
Align the webchat fixture registry with its disabled-plugin config; own and join Slack dispatches and drive startup-auth timeouts from real request/socket events; wait for the mock provider's bound-port announcement; scope Doctor's real plugin discovery; prepare CLI broadcast artifacts; and join Android qualification and SCP process trees under their test lifetimes.
Replay notes against main
7b93d64b27a6701ed2935197cecf7f3bbfe9481f:09f0e33d4569,d548a1a0099f,dac3f47701c5,88814f80ab22,f1a41115db83,6d39296169c4, andbcf05c4edc68, preserving their messages.ee1967c4ade6: terminal Anthropic catalog publication is already fixed by0ac0de35dd49ad769837bbc77a70c100a5e7ec0c(fix(anthropic): stabilize session catalog watcher arming #154164), including stronger deferred-work cleanup.No changed path matches the current CODEOWNERS rules.
Evidence