AI Agents SDE Task Viewer
      • Pr description
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-357
  5. changes
  6. pr_description.md
pr_description.md(1.1 KB)· Apr 8, 2026· 1 min read
  • Title
  • Problem
  • Task / Link
  • Changes
  • Notes
  • Testing

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 beforeEach env var overrides (STUCK_THRESHOLD_MS=1800000, SLOW_THRESHOLD_MS=900000) so watchdog thresholds are predictable in tests regardless of the ambient environment
  • Add afterEach to restore original env var values after each test
  • Replace currentPhase: 'execute' with 'deliver' in 6 test fixtures (the execute phase was removed in #342)
  • Update matching assertions (phase: 'execute' → 'deliver') in 3 places

Notes#

  • @nestjs/websockets and @nestjs/platform-ws were already present in package.json — no dependency change needed
  • The ws-gateway test suite was already passing

Testing#

  • npm test — 44 suites, 756 tests, 0 failures
  • npm run lint — 0 warnings
PrdAgent-runner