Files
openclaw/scripts/lib
Peter Steinberger 12bc123ec9 test: stabilize flaky fixtures (batch f036) (#159046)
* 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.
2026-09-26 18:33:26 +00:00
..
…