# Spec Review Notes — Recoil Workspace POC

**Reviewed by:** Gemini 3.1 Pro + Opus 4.6 (parallel 1-round review)
**Date:** 2026-04-12
**Spec:** BUILD_SPEC.md (originally 4,586 lines / 12 phases → fixed 4,417 lines / 8 phases)

## Applied Fixes

All CRITICAL and HIGH findings were applied to the spec before dispatch:

| ID | Severity | Finding | Fix Applied |
|----|----------|---------|-------------|
| C1 | CRITICAL | Sequential MCP inserts across 4 phases (sub-agent hazard) | Collapsed Phases 3-6 into single Phase 3 |
| C2 | CRITICAL | JS placeholder replacement (sub-agent hazard) | Collapsed Phases 9-10 into single Phase 6 |
| C3 | CRITICAL | Startup --port parsing bug | Restructured to while/shift pattern |
| C4 | CRITICAL | pollShots() compares object to itself | Capture oldEpisodes before overwrite |
| C5 | CRITICAL | Server /api/shot missing fields | Added attempts, max_attempts, coverage_of |
| H1 | HIGH | Double store open in approve_shot | Single atomic update_shot call |
| H2 | HIGH | submit_generation no status update | Set generation_requested=True on shot |
| H3 | HIGH | reject_shot swallows missing take_id | Return error |
| M1 | MEDIUM | Inspector re-renders on take change | DOM class toggle instead |
| M2 | MEDIUM | Keyboard nav limited to expanded episodes | Build from all episodes, auto-expand |

## Deferred Items (not blocking)

- Inspector `inspectorRow()` XSS escaping (added isHtml parameter)
- Test quote-style tolerance (uses regex)
- session_log generation_completed event (v2)
- Media type dedup (removed from show_in_viewer, state.py handles it)

## Review Artifacts

- `consultations/recoil/recoil-workspace-design/spec_review_gemini.md`
- `consultations/recoil/recoil-workspace-design/spec_review_opus.md`
