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:

  1. Just change the frontend SSE URL and hope event formats are compatible
  2. Add event translation layer in frontend + GET SSE endpoint on Vitto + complete DEPLOY phase
  3. 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


🔗 Related


Auto-generated by MCP Smart Consolidation