Bugfix: Why does chat-triggered generation produce '5 modules, 0 fil...
Documentation for Sessions
🐛 Bugfix: Why does chat-triggered generation produce '5 modules, 0 fil...
Date: 2026-03-11
Time: 18:13:28 UTC
Session: gspace1-204.10
Agent: backend
Confidence: 97%
Status: ✅ Documented
📋 Decision Context
Question:
Why does chat-triggered generation produce '5 modules, 0 files' and no GitLab repo?
Task: Not specified
🎯 Decision Made
Chosen:
Pass universeId through the entire chat→controller→engine→agentLoop→tool chain. Add fail-fast validation in start_module_generation tool when spaceId/universeId are missing.
Options Considered:
- No alternatives documented
💭 Reasoning
Frontend chat only sent spaceId in POST /engine/message. universeId was extracted from pageContext (a text string that failed JSON.parse). Without universeId, PRE-FLIGHT (GitLab init) and DEPLOY are both skipped — the phase executor checks session.request.spaceId && session.request.universeId at line 130, 168, 380, 431, and 435. Fixed by: (1) frontend injects UniverseContextService and sends universeId+slugs, (2) backend accepts and forwards through 4 layers, (3) tool fails fast instead of silently generating orphaned modules.
📁 Files Involved
libs/libs-ai/vitto-chat/src/lib/services/vitto-chat-engine.service.tsAPIs/backend-vitto-api/src/app/engine/vitto.controller.tsAPIs/backend-vitto-api/src/app/engine/vitto-engine.service.tsAPIs/backend-vitto-api/src/app/engine/agent-loop.service.tsAPIs/backend-vitto-api/src/app/tools/tool-registry.service.ts
🔗 Related
- Decision ID:
dev_1773252808291_np61vs5 - Session: 204
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation