Architecture: How to wire the platform generation pipeline end-to-end: Fro...
Documentation for Sessions
🏗️ Architecture: How to wire the platform generation pipeline end-to-end: Fro...
Date: 2026-02-23
Time: 18:18:55 UTC
Session: gspace1-138.8
Agent: backend
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
How to wire the platform generation pipeline end-to-end: Frontend → Vitto (orchestrator) → backend-ai-api (persistence/deployment)?
Task: S138 pipeline unification implementation
🎯 Decision Made
Chosen:
Three-layer fix: (1) Added GET /start SSE endpoint to Vitto controller for EventSource compatibility, (2) Completed DEPLOY phase to call deploy-modules on backend-ai-api after persist + generate manifestJSON, (3) Rewrote frontend startWorkflow() with VITTO_PHASE_MAP translation layer that converts module-gen.* events to phase_start/phase_complete/workflow_complete format
Options Considered:
- Just change the frontend SSE URL and hope event formats are compatible
- Add event translation layer in frontend + GET SSE endpoint on Vitto + complete DEPLOY phase
- Rewrite Pipeline B to emit Pipeline A event formats natively
💭 Reasoning
The disconnect had three separate breakpoints: (a) No GET endpoint on Vitto — EventSource is GET-only but Vitto only had POST endpoints, making browser SSE impossible. Added @Get('start') @Sse() that mirrors the POST generate endpoint. (b) DEPLOY phase was half-built — triggerPlatformDeploy() existed but was never called, deployTriggered was hardcoded false. Completed it to call deploy-modules after persist, registering modules in the universe via backend-ai-api's PlatformOrchestrationController. (c) SSE event format mismatch — Pipeline B uses dot-notation namespaced events (module-gen.phase-start) while frontend expected snake_case (phase_start) with different data shapes. Added VITTO_PHASE_MAP constant and per-event translation in addEventListener callbacks. Also fixed resumeWorkflow() which was calling POST resume/:sessionId via EventSource (GET-only) — changed to GET stream/:sessionId.
📁 Files Involved
apis/backend-vitto-api/src/app/module-generation/module-generation.controller.tsapis/backend-vitto-api/src/app/module-generation/phases/module-gen-phase.executor.tslibs/libs-ai/gograb-ai-lib/src/lib/services/workflow-state.service.ts
🔗 Related
- Decision ID:
dev_1771870735260_vzoo8yo - Session: 138
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation