# Build Log — EP001 Full Pipeline
Started: 2026-03-11 01:56
Plan: /Users/joeturnerlin/Dropbox/CLAUDE_PROJECTS/starsend/EP001_FULL_PIPELINE_PLAN.md
Working directory: /Users/joeturnerlin/Dropbox/CLAUDE_PROJECTS/starsend
Validation: Phase-specific (see plan)
Linters: none
Visual mode: no
Total phases: 3

---

## Phase 1: Fix Pipeline Bugs for Dry-Run
- Status: PASS
- Started: 01:57
- Completed: 02:03
- Build time: 4m 49s
- Validation time: 10s
- Debug time: 0s
- Total time: 5m 23s
- Debug passes: 0
- Validation: dry-run --episode 1 --project starsend-test -> exit 0 (9/9 shots dry_run)
- Est. cost: ~$1.50
- Files touched: orchestrator/manifest.py, orchestrator/scene_planner.py, orchestrator/pipeline.py, lib/prompt_engine.py (verified)
- Fixes: manifest dict/list, SeedDance→Kling routing, ENV shot detection (num_chars==0), video output dir, T2V compiled_prompts preference

## Phase 2: Generate 9 Production Keyframes
- Status: PASS
- Started: 02:04
- Completed: 02:45
- Build time: 42m 8s
- Validation time: 5s
- Debug time: 3m (SH02A retry after broken pipe)
- Total time: 42m 13s
- Debug passes: 1 (SH02A retry)
- Validation: 9/9 keyframe PNGs exist in output/frames/ep_001/
- Est. cost: ~$1.21 (Gemini NBP) + ~$3.00 (accidental Kling t2v from routing bug) = ~$4.21
- Files touched: orchestrator/pipeline.py (--tier simple fix)
- Bug fix: --tier simple now bypasses route_shot() to force all shots through StillPipeline
- Output: 9 keyframe PNGs (~7MB each, 9:16 vertical)
- Stale state archived to: projects/starsend-test/state/starsend/_archive_20260311_020458/

## Phase 3: Generate 9 Videos from Keyframes
- Status: PASS
- Started: 02:46
- Completed: 03:12
- Build time: 25m 40s
- Validation time: 5s
- Debug time: 0s
- Total time: 25m 40s
- Debug passes: 0
- Validation: 9/9 MP4 files exist in output/video/ep_001/
- Est. cost: ~$4.00 (Kling 3.0 I2V, 9 shots)
- Files created: tools/generate_ep001_videos.py
- Output: 9 video MP4 files (2.4-5.4 MB each)
- Model: Kling 3.0 I2V (Veo 3.1 failed due to model profile key mismatch + duration constraints)
- Bugs discovered (not blocking, for future fix):
  - model_profiles.json: veo-3.1-generate-preview not aliased to veo-3.1
  - KlingClient.poll_status(): hardcodes text2video endpoint for I2V tasks
  - Kling backoff too aggressive (grows to 300s, should cap at 30-60s)

---

## Summary
- Total phases: 3
- Passed: 3
- Failed/Blocked: 0
- Skipped: 0
- Total duration: ~1h 16m (wall clock)
- Build time: ~1h 12m (mostly API wait time)
- Debug time: ~3m
- Validation time: ~20s
- Completed: 2026-03-11 03:12
- Est. total cost: ~$9.71 (Gemini: ~$1.21, Kling: ~$7.00, Claude: ~$1.50)

### Time Breakdown by Phase
| Phase | Build | Debug | Validate | Total |
|-------|-------|-------|----------|-------|
| 1. Fix Pipeline Bugs | 4m 49s | 0s | 10s | 5m 23s |
| 2. Generate Keyframes | 42m 8s | 3m | 5s | 42m 13s |
| 3. Generate Videos | 25m 40s | 0s | 5s | 25m 40s |

### Blockers
None

### Bugs Fixed (8 total)
1. `lib/recoil_bridge.py`: _plan_path() not project-aware (pre-harness fix)
2. `lib/recoil_bridge.py`: _normalize_plan_shots() missing — flat fields not populated (pre-harness fix)
3. `lib/recoil_bridge.py`: load_breakdown() not project-aware for bible (pre-harness fix)
4. `orchestrator/manifest.py`: init_shots() list vs dict
5. `orchestrator/scene_planner.py`: SeedDance stub blocking dialogue shots
6. `orchestrator/scene_planner.py`: ENV shots with 0 chars mis-routed to t2v
7. `orchestrator/pipeline.py`: --tier simple not overriding pipeline routing
8. `orchestrator/pipeline.py`: video output dir not separate from frames dir

### Bugs Discovered (3, not fixed — for future runs)
1. `config/model_profiles.json`: veo-3.1-generate-preview not aliased
2. `lib/api_client.py`: KlingClient.poll_status() hardcodes t2v endpoint
3. `lib/api_client.py`: Kling backoff grows to 300s (too aggressive)

### Output Files
- 9 keyframes: `projects/starsend-test/output/frames/ep_001/STA_EP001_S00_shot_EP001_SH*.png`
- 9 videos: `projects/starsend-test/output/video/ep_001/shot_*.mp4`
- 6 bonus t2v videos (from Phase 2 routing bug): `projects/starsend-test/output/video/ep_001/EP001_SH*_t2v.mp4`
- Generation script: `tools/generate_ep001_videos.py`
