Testing Director Report: Platform Generation E2E Test
Documentation for Handoffs
Testing Director Report: Platform Generation E2E Test
Session 138 | February 23, 2026
Test Summary
| Item | Result |
|---|---|
| Test URL | http://localhost:6200/space/chrome-space-1/universe/paks-uni-1/vibe |
| Template | Fitness Studio |
| Attempts | 2 (both failed identically) |
| Result | BLOCKED — 100% reproducible crash |
| Error | enhance.enhancedPrompt.substring is not a function |
| Crash Point | After DECOMPOSE phase, entering PLAN phase |
Critical Discovery: Frontend Uses Pipeline B
The network request confirms the frontend calls Pipeline B (backend-vitto-api), NOT Pipeline A (backend-ai-api):
GET http://localhost:3003/vitto-api/module-generation/start
?description=Create+a+fitness+studio+platform+with+membership+management...
&spaceId=69250a03857479fe44376823
&universeId=universe_1768598939515_vfjz6wten
This means the S138.2 architectural decision to "wire frontend to Pipeline B" has already been partially implemented — the frontend IS calling Pipeline B. But Pipeline B crashes before reaching the EXECUTE phase.
Phases Observed (Both Runs)
| Phase | Status | Progress |
|---|---|---|
| Prompt Enhancement (ENHANCE) | Completed | 0% → 50% |
| Domain Analysis (ANALYZE) | Completed | 50% → 67% |
| Module Decomposition (DECOMPOSE) | Completed | 67% |
| Module Planning (PLAN) | CRASHED | Never started |
Root Cause Analysis
The Bug: Type Mismatch Between Prompt Template and Code
Three files disagree about what enhancedPrompt is:
1. Prompt Template Says: Object
File: apis/backend-vitto-api/src/prompts/module-gen/system-enhance.prompt.md (line 34)
The LLM is instructed to return:
"enhancedPrompt": {
"title": "System Title",
"description": "Detailed description with implied features",
"keyFeatures": ["feature1", "feature2"],
"targetUsers": ["user-type-1", "user-type-2"],
"impliedRequirements": ["auth", "settings", "dashboard"]
}
2. TypeScript Type Says: String
File: apis/backend-vitto-api/src/app/module-generation/module-generation.types.ts (line 95)
export interface ModuleGenEnhanceResult {
enhancedPrompt: string; // ← WRONG — should be an object
}
3. Executor Code Assumes: String
File: apis/backend-vitto-api/src/app/module-generation/phases/module-gen-phase.executor.ts (line 159)
const systemName = enhance.enhancedPrompt.substring(0, 60); // ← CRASHES
Secondary Bug: Analyze Phase Gets [object Object]
File: apis/backend-vitto-api/src/app/module-generation/phases/analyze.phase.ts (line 46)
enhancedPrompt: enhanceResult.enhancedPrompt, // passes object
This is then interpolated into the analyze prompt template as {{enhancedPrompt}}, which renders as [object Object]. The ANALYZE phase "works" but receives garbage data for the enhanced prompt.
Recommended Fix
Option A: Update Type + All Consumers (Recommended)
- Update type in
module-generation.types.ts:
export interface ModuleGenEnhanceResult {
understanding: string;
confidence: number;
clarifyingQuestions: string[];
enhancedPrompt: {
title: string;
description: string;
keyFeatures: string[];
targetUsers: string[];
impliedRequirements: string[];
};
modulePreview: Array<{ name: string; type: ModuleGenTemplateType; entities: string[] }>;
recommendations: string[];
}
- Fix executor line 159:
const systemName = typeof enhance.enhancedPrompt === 'string'
? enhance.enhancedPrompt.substring(0, 60)
: enhance.enhancedPrompt?.title?.substring(0, 60) || 'Generated Platform';
- Fix analyze phase line 46 — serialize the object for the template:
enhancedPrompt: typeof enhanceResult.enhancedPrompt === 'string'
? enhanceResult.enhancedPrompt
: JSON.stringify(enhanceResult.enhancedPrompt, null, 2),
Option B: Quick Fix (Defensive Only)
Just fix line 159 with a safe access pattern. This unblocks generation but leaves the ANALYZE phase receiving [object Object].
Files That Need Changes
| File | Line | Change |
|---|---|---|
apis/backend-vitto-api/src/app/module-generation/module-generation.types.ts |
95 | Update enhancedPrompt type from string to object interface |
apis/backend-vitto-api/src/app/module-generation/phases/module-gen-phase.executor.ts |
159 | Safe access: enhance.enhancedPrompt?.title?.substring(0, 60) |
apis/backend-vitto-api/src/app/module-generation/phases/analyze.phase.ts |
46 | Serialize object before passing to template |
Other Observations
UI/UX Findings (Positive)
- Template selection page renders correctly with all 6 templates
- Fitness Studio template auto-fills description properly
- SSE streaming works perfectly — real-time phase progress, AI Activity panel updates, percentage counter
- Phase completion events render with green checkmarks
- "Platform Suggestions" feature works (showed Education Platform at 91% match)
- Error display is clear with "Go Back" and "Try Again" buttons
UI/UX Finding (Issue)
- "Platform Suggestions" popup is difficult to dismiss — Escape key doesn't work, clicking the X on the suggestion bar doesn't dismiss it, had to click a small icon to close it
Architecture Confirmation
- Frontend calls
localhost:3003/vitto-api/module-generation/start(Pipeline B) - The SSE events use Pipeline B's phase names: "enhance completed", "analyze completed", "Module Decomposition"
- This means Pipeline B is already wired to the frontend — contradicting the S138.2 analysis that said "Pipeline B is NOT connected to UI"
- The S138 fixes applied to
workflow.service.ts(Pipeline A) are irrelevant — they fix a pipeline the frontend doesn't call
Impact Assessment
The 3 fixes from S138 (generateFinalManifest, extractModuleDataFromManifest, autoSyncModulesToCanvas) were applied to the WRONG pipeline. The frontend uses Pipeline B, not Pipeline A. Those fixes need to be re-evaluated in the context of Pipeline B's architecture.
However, Pipeline B has its own DEPLOY phase which handles persistence differently. The generation can't reach DEPLOY because it crashes at PLAN. Fixing the enhancedPrompt type mismatch is the #1 priority — it unblocks the entire generation flow.
Priority for Coding Team
| # | Priority | Action |
|---|---|---|
| 1 | CRITICAL | Fix enhancedPrompt type mismatch (3 files listed above) |
| 2 | HIGH | Re-test full generation flow after fix (must reach DEPLOY phase) |
| 3 | MEDIUM | Verify Pipeline B's DEPLOY phase correctly persists modules to universe |
| 4 | LOW | Fix Platform Suggestions popup dismissal UX |