mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-07-12 02:08:25 +00:00
Every test gets a fresh page but all tests share one backend, locally and on CI alike (the CI job is deliberately unsharded). A test ending while its prompt still executed left that work running, and the next test's fresh page connected mid-execution and inherited its async errors or its busy queue. Drain the backend to idle in an afterEach in all four backend-running specs, while the finishing test's own page is still open so late events land there: no test can affect the next. The drain helper moves to the shared fixture util (drainBackendToIdle, byte-identical body); the auto-run tier's queue guard and runBatch post-timeout drain rewire to it with their explicit budgets. The hooks use a 10s budget: a no-op when already idle, and a backend still busy past it is wedged, which the auto-run tier's 150s guard surfaces with the restart diagnostic. DETECTION_PROOF.md's caveat is rewritten to match, and a false claim that CI shards one backend per pack is corrected in every location (code comments and doc): the CI job runs the whole suite against one fresh backend on an unloaded runner, which is why executions stay inside their budgets there. Empirical: a full-suite run with the hook eliminated the cross-test bleed class entirely (zero mount/save-reload/core-smoke console or overlay failures, previously 3-5 per run). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>