Context
CI now runs bun test on the clean module suites (src/bus, src/tuner, src/observability, src/skills-tuner, src/governance — ~700 tests, all green) via the new Test workflow. The root src/__tests__/ suite is excluded because a full bun test on main is 2518 pass / 41 fail, and all 41 failures live in src/__tests__/.
The 41 failures split two ways
- Cross-test pollution — tests that pass in isolation but fail in the shared process (e.g.
Phase 18: runner modelOverride wiring passes alone, fails in the pack). Root cause is shared module/singleton/env/file state between test files. This is the same class the SDC mark-tests-passing.sh works around with TEST_ARGS scoping.
- Infra-dependent — tests that fail even in isolation because they need a DB/queue/service not present in CI (e.g.
Event Processor → 9 fail alone).
Representative failing files: event-processor, jobs, escalation/*, gateway/*, policy/*, mcp_proxy_*, pty-*, runner, integration/*.
Goal
Make src/__tests__/ green (fix pollution via proper per-test isolation/teardown; gate or mock the infra-dependent tests), then widen the CI Test job's paths toward the full bun test. Landmark: CI runs the whole suite green.
Why it matters
The reason this surfaced: PR #290's 3 hanging collectObservations tests showed green in CI because CI ran no tests at all. The scoped Test job catches that class in the module dirs now; closing this issue extends the safety net to the whole codebase.
Context
CI now runs
bun teston the clean module suites (src/bus,src/tuner,src/observability,src/skills-tuner,src/governance— ~700 tests, all green) via the newTestworkflow. The rootsrc/__tests__/suite is excluded because a fullbun teston main is 2518 pass / 41 fail, and all 41 failures live insrc/__tests__/.The 41 failures split two ways
Phase 18: runner modelOverride wiringpasses alone, fails in the pack). Root cause is shared module/singleton/env/file state between test files. This is the same class the SDCmark-tests-passing.shworks around withTEST_ARGSscoping.Event Processor→ 9 fail alone).Representative failing files:
event-processor,jobs,escalation/*,gateway/*,policy/*,mcp_proxy_*,pty-*,runner,integration/*.Goal
Make
src/__tests__/green (fix pollution via proper per-test isolation/teardown; gate or mock the infra-dependent tests), then widen the CITestjob's paths toward the fullbun test. Landmark: CI runs the whole suite green.Why it matters
The reason this surfaced: PR #290's 3 hanging
collectObservationstests showed green in CI because CI ran no tests at all. The scopedTestjob catches that class in the module dirs now; closing this issue extends the safety net to the whole codebase.