Investigation: What is causing 30 pre-existing test failures in backend-vit...
Documentation for Sessions
📝 Investigation: What is causing 30 pre-existing test failures in backend-vit...
Date: 2026-03-18
Time: 16:50:13 UTC
Session: gspace1-234.7
Agent: backend
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
What is causing 30 pre-existing test failures in backend-vitto-api?
Task: S234.2: Investigate pre-existing test failures for handoff
🎯 Decision Made
Chosen:
Root cause identified: 3 test suites have outdated test module setups. (1) phase-executor.spec.ts and vitto-core.controller.spec.ts both missing UserDossierService mock provider — added as a dependency likely in S231 but tests not updated. (2) daily-digest-rich.spec.ts calling DailyDigestService constructor with 5 args when it now expects 6 (VittoObservabilityService added). Created handoff document at docs/english/sessions/S234/S234-failed-tests-handoff.md with exact fix instructions.
Options Considered:
- No alternatives documented
💭 Reasoning
These are NOT regressions from S234 work — confirmed by running tests on the base commit. All 30 failures trace to missing NestJS DI providers in test setups. When services gain new constructor dependencies, the test files must be updated to provide mocks. This is a common maintenance gap when multiple agents work on the codebase and tests aren't run end-to-end after each session. The fix is mechanical: add mock providers to the test module setup blocks.
📁 Files Involved
APIs/backend-vitto-api/src/app/engine/__tests__/phase-executor.spec.tsAPIs/backend-vitto-api/src/app/engine/controllers/__tests__/vitto-core.controller.spec.tsAPIs/backend-vitto-api/src/app/proactive/__tests__/daily-digest-rich.spec.ts
🔗 Related
- Decision ID:
dev_1773852612948_db7z1ij - Session: 234
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation