AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-357
  5. plan
  6. plan.md
plan.md(1.7 KB)· Apr 8, 2026· 1 min read
  • Summary
  • Files
  • Steps
  • Verification
  • Risks

Plan: Fix unit test failures on rc/multi-tenant#

Summary#

Fix 2 failing test suites (8 failures total) caused by the pipeline refactor that removed the execute phase and a missing @nestjs/websockets dependency. All watchdog test fixtures reference currentPhase: 'execute' which no longer exists in PHASE_ORDER, and the ws-gateway spec cannot resolve its gateway import.

Files#

FileActionDescription
src/watchdog/watchdog.service.spec.tsmodifyReplace currentPhase: 'execute' with 'deliver' in 5 test fixtures; update phase assertions
src/ws-gateway/ws-gateway.gateway.tsinspectVerify @nestjs/websockets import — root cause of suite failure
package.jsonmodifyAdd @nestjs/websockets + @nestjs/platform-ws as dependencies (if missing)

Steps#

  1. Replace 'execute' phase references in watchdog spec — change currentPhase: 'execute' to 'deliver' in all 5 affected test fixtures (lines 77, 100, 197, 226, 252, 295); update corresponding assertion strings (phase: 'execute' -> 'deliver') at lines 91, 266, 305.
  2. Install missing @nestjs/websockets dependency — add @nestjs/websockets and @nestjs/platform-ws to package.json so the ws-gateway module resolves correctly.
  3. Run npm test, tsc --noEmit, and npm run lint — verify all 44 suites pass with zero failures.

Verification#

  • npm test — 0 failures, all 44 suites pass
  • tsc --noEmit — no type errors
  • npm run lint — zero warnings

Risks#

  • The @nestjs/websockets missing dependency may be intentional (optional module) — if so, the ws-gateway spec should be skipped or the import mocked instead of adding the dependency.
ContextPrd