docs(fix-d12): resolve debug session and update STATE

- Mark .planning/debug/d12-blob-port-transfer-fails.md as
  status: resolved; fill in the Resolution section with the
  applied fix (5 commit hashes, files changed), verification
  output (15/15 tests, tsc clean, vite build green, zero
  as-any/ts-ignore in fix-touched files), and inline answers
  to the specialist-review questions raised by the planner.
  Move the file to .planning/debug/resolved/.
- Update STATE.md frontmatter (stopped_at) + Decisions log
  + Session Continuity to record the D-12 fix landing and
  the open Plan 07 ffprobe gate (still requires operator
  smoke.sh + ffprobe re-run before Phase 1 can close).
- Land smoke.sh — the operator's D-12 acceptance-gate harness
  that surfaced the original failure. Self-contained: dedicated
  /tmp/mokosh-smoke-profile, auto-accept desktop-capture picker,
  Downloads polling, ffprobe gate, fixture staging.

REQ-video-ring-buffer remains NOT-complete — Plan 07 owns it,
operator must re-run ./smoke.sh to verify the fix end-to-end
in Chrome.

Refs: debug session d12-blob-port-transfer-fails (resolved).
This commit is contained in:
2026-05-15 20:23:29 +02:00
parent d5bb948d95
commit bf076199b4
3 changed files with 343 additions and 6 deletions

View File

@@ -3,8 +3,8 @@ gsd_state_version: 1.0
milestone: v2.0.0
milestone_name: milestone
status: executing
stopped_at: Completed Plan 01-06 — vite.config.ts collapse (226 -> 21 lines), orphan offscreen/ dir deleted, dist build green, crxjs Outcome A confirmed and SW URL reconciled (chrome.runtime.getURL('src/offscreen/index.html')); 9/9 tests still green; Plan 07 next (ffprobe acceptance gate)
last_updated: "2026-05-15T16:16:50.760Z"
stopped_at: D-12 port-blob serialization bug fixed via base64 wire-format (debug session d12-blob-port-transfer-fails resolved). Five commits on gsd/phase-01-stabilize-video-pipeline (c0d9166, d653283, 2831849, d5bb948 + this docs commit). All 15 tests green (incl. 6-test port-serialization contract — RED reproduces the 75-byte garbage, GREEN pins the base64 fix). tsc clean, npm run build succeeds. Plan 07 ffprobe gate still open — operator must re-run ./smoke.sh to verify the fix end-to-end in Chrome.
last_updated: "2026-05-15T18:20:00.000Z"
last_activity: 2026-05-15
progress:
total_phases: 5
@@ -101,6 +101,7 @@ current work:
- [Phase ?]: [Phase 01-05]: indexedDB.deleteDatabase('VideoRecorderDB') in onInstalled — T-1-NEW-05-02 / RESEARCH.md Runtime State Inventory cleanup of orphaned IDB from pre-Phase-01 builds
- [Phase ?]: [Phase 01-06]: Collapsed vite.config.ts from 226 -> 21 lines (RESEARCH.md Example B verbatim); deleted 174-line inline copy-offscreen plugin (audit P0 #1 root cause) and the orphan offscreen/ top-level directory (D-08)
- [Phase ?]: [Phase 01-06]: crxjs Outcome A confirmed — dist/src/offscreen/index.html (preserves src/ prefix from rollupOptions.input key). SW URL adjusted to chrome.runtime.getURL('src/offscreen/index.html'); RESEARCH.md Pitfall 5 binding empirically verified
- [Phase 01-07-debug-d12]: D-12 port-blob serialization fixed via base64 wire-format encode/decode (debug session d12-blob-port-transfer-fails resolved 2026-05-15). chrome.runtime.Port JSON-serializes payloads across extension contexts so Blob payloads were silently corrupted (JSON.stringify(blob) === "{}" → SW saw [{}, {}, ...] → new Blob([...]) coerced each to "[object Object]" → 75-byte text instead of WebM). Added src/shared/binary.ts (blobToBase64 / base64ToBlob), TransferredVideoChunk wire-format type, offscreen encode side, SW decode side. All 15 tests green incl. 6-test port-serialization spec. Re-run smoke.sh + ffprobe still required for end-to-end verification.
### Pending Todos
@@ -123,7 +124,6 @@ Items acknowledged and carried forward from previous milestone close:
## Session Continuity
Last session: 2026-05-15T16:16:50.743Z
Stopped at: Completed Plan 01-06 — vite.config.ts collapse (226 -> 21 lines), orphan offscreen/ dir deleted, dist build green, crxjs Outcome A confirmed and SW URL reconciled (chrome.runtime.getURL('src/offscreen/index.html')); 9/9 tests still green; Plan 07 next (ffprobe acceptance gate)
intel synthesis. Coverage validated: 11/11 v1 REQs mapped.
Resume file: None
Last session: 2026-05-15T18:20:00.000Z
Stopped at: D-12 port-blob serialization bug fixed via base64 wire-format encode/decode (debug session d12-blob-port-transfer-fails resolved). 5 commits on gsd/phase-01-stabilize-video-pipeline; all 15 tests green; tsc clean; npm run build succeeds. REQ-video-ring-buffer NOT yet marked complete — Plan 07 ffprobe gate still owns that, operator must re-run ./smoke.sh + ffprobe to verify the fix end-to-end in Chrome before closing Phase 1.
Resume file: .planning/debug/resolved/d12-blob-port-transfer-fails.md