Title#
Fix watchdog unit test failures caused by pipeline refactor and env threshold overrides
Problem#
Two root causes broke 6 watchdog tests: STUCK_THRESHOLD_MS / SLOW_THRESHOLD_MS env vars set to 99,999,999ms in the agent environment caused age checks to never trigger, and currentPhase: 'execute' fixture values referenced the removed execute phase.
Task / Link#
Closes #357
Changes#
- Add
beforeEachenv var overrides (STUCK_THRESHOLD_MS=1800000,SLOW_THRESHOLD_MS=900000) so watchdog thresholds are predictable in tests regardless of the ambient environment - Add
afterEachto restore original env var values after each test - Replace
currentPhase: 'execute'with'deliver'in 6 test fixtures (theexecutephase was removed in #342) - Update matching assertions (
phase: 'execute'→'deliver') in 3 places
Notes#
@nestjs/websocketsand@nestjs/platform-wswere already present inpackage.json— no dependency change needed- The ws-gateway test suite was already passing
Testing#
npm test— 44 suites, 756 tests, 0 failuresnpm run lint— 0 warnings