Milestone v1 (v2.0.0): Mokosh — Session Capture #1

Merged
strategy155 merged 297 commits from gsd/phase-04-harden-clean-up-optional into main 2026-05-31 15:34:17 +00:00
2 changed files with 66 additions and 13 deletions
Showing only changes of commit 9c5ff8b2a7 - Show all commits

View File

@@ -3,15 +3,15 @@ gsd_state_version: 1.0
milestone: v2.0.0
milestone_name: milestone
status: executing
stopped_at: mid-Plan-01-09 closeout (Bug B routing fix pending); resumed 2026-05-17
last_updated: "2026-05-17T14:30:13Z"
last_activity: 2026-05-17
stopped_at: Plan 01-13 Wave 4 closure docs landed; Plan 01-09 functional contract closed via harness PASS; awaiting operator brand/design ack (Plan 01-13 Task 9) + Plan 01-10 welcome tab + Plan 01-12 design integration (designer reply pending)
last_updated: "2026-05-19T10:40:00Z"
last_activity: 2026-05-19
progress:
total_phases: 5
completed_phases: 0
total_plans: 10
completed_plans: 9
percent: 92
completed_plans: 11
percent: 95
---
# Project State
@@ -27,13 +27,28 @@ no server, no password leaks.
## Current Position
Phase: 1 of 5 (Stabilize Video Pipeline) — REOPENED 2026-05-17 (Plan 01-09 Bug B fix pending; Plan 01-10 Wave 3 pending)
Phase: 1 of 5 (Stabilize Video Pipeline) — Plan 01-09 closed-by-harness 2026-05-19; awaiting Plan 01-13 operator brand/design ack + Plan 01-10 welcome tab + Plan 01-12 design integration (designer reply pending)
Next phase: 2 of 5 (Stabilize DOM + event-capture privacy)
Plan: 8 of 10 complete (Plan 01-09 closeout pending Bug B state-machine routing fix; Plan 01-10 pending Wave 3)
Status: Phase 1 reopened mid-Plan-01-09; Bug B blocking closure
Last activity: 2026-05-17
Plan: 11 of 10 complete (counter > total because Plans 01-11 spike-pivot + 01-13 harness were added mid-phase past the original 10-plan ceiling; ROADMAP.md plan count needs sync as separate concern)
Status: Phase 1 functional contract closed; remaining gates are operator-facing (brand/design ack + designer typography reply for 01-12) + Plan 01-10 welcome tab
Last activity: 2026-05-19
Progress: [█████████] 92% (Phase 1) — 0/5 phases fully complete (Phase 1 was 100% on 2026-05-15, reopened by Plan 01-09 operator UAT)
Progress: [█████████] 95% (Phase 1) — 0/5 phases fully complete (Phase 1 was 100% on 2026-05-15, reopened by Plan 01-09 operator UAT; functionally closed again 2026-05-19 via Plan 01-13 harness PASS)
### Plan 01-13 landing (2026-05-19)
- Puppeteer-based UAT harness at HEAD `d793c9e` (Wave 3D); `npm run test:uat` exits 0 with 14/14 GREEN
- Bug A regression rewind empirically verified (commit body 6a77967 — Plan 01-13 Wave 3C)
- Bug B regression rewind empirically verified (commit body b665919 — Plan 01-13 Wave 3B)
- Plan 01-09 functional contract closed via harness PASS: Task 5 steps 4, 5, 7-13, 15 now covered by harness assertions A1-A13 per `01-09-PLAN.md` Amendment 2
- Operator gates retained on Plan 01-09: Step 1 (build verification) + Step 14 (brand/design ack — the Plan 01-13 Task 9 operator checkpoint)
- Plan 01-11 closed as spike-pivot (ba5474c SUMMARY); architecture lessons (no `await import(...)` in SW; `track.dispatchEvent('ended')` not `track.stop()`; `__MOKOSH_UAT__` Vite define-token) carried forward into Plan 01-13's Approach B harness
### Outstanding Phase 1 gates
- **Plan 01-13 Task 9 (operator checkpoint):** orchestrator-owned; brand/design ack on loaded extension (Plan 01-13 charter carves visual presentation out of harness scope)
- **Plan 01-10 (welcome tab):** Wave 3 still pending — operator-facing onboarding surface (Russian copy; first-run only)
- **Plan 01-12 (design integration):** awaiting designer reply on Newsreader typography (one designer follow-up already documented in MEMORY intel-unlock f768498 — Newsreader has no Cyrillic glyphs, alternative font selection pending)
## Performance Metrics
@@ -128,9 +143,11 @@ Items acknowledged and carried forward from previous milestone close:
## Session Continuity
Last session: 2026-05-17T14:30:13Z
Stopped at: resumed from /gsd-pause-work checkpoint ed82fd6; Bug A icons (a881bf0) + intel-unlock (f768498) committed; spawning /gsd-debug for Bug B state-machine routing
Resume file: .planning/phases/01-stabilize-video-pipeline/.continue-here.md (consumed; HANDOFF.json deleted post-resumption)
Last session: 2026-05-19T10:40:00Z
Stopped at: Plan 01-13 Wave 4 Task 8 (closure docs) landed; harness 14/14 GREEN at d793c9e; Plan 01-09 amendment 2 + STATE.md sync committed; awaiting orchestrator Plan 01-13 Task 9 (operator brand/design checkpoint surfacing)
Resume file: none (Wave 4 docs commit is self-contained; orchestrator owns Task 9 spawn)
Prior session: 2026-05-17T14:30:13Z — resumed from /gsd-pause-work checkpoint ed82fd6; Bug A icons (a881bf0) + intel-unlock (f768498) committed; /gsd-debug spawned for Bug B state-machine routing (subsequently resolved via the recovery-flow amendment at Plan 01-09 Task 5 step 11)
## Phase 1 Closure Notes

View File

@@ -582,6 +582,42 @@ NO 'as any', NO @ts-ignore — every new chrome.* call must be properly typed vi
- grep -n "notifications" manifest.json returns at least one match within the permissions array.
</verification>
## Amendment 2 (2026-05-19) — Closure via Plan 01-13 Harness
**Closure gate change.** Task 5's 15-step operator-driven empirical checkpoint is superseded as the primary closure gate by Plan 01-13's Puppeteer-based UAT harness (`npm run test:uat`). At commit `d793c9e` (Plan 01-13 Wave 3D) all 14 harness assertions are GREEN; the harness drives Chrome end-to-end via an extension-internal page (`tests/uat/extension-page-harness.html`) with synthetic `getDisplayMedia` + offscreen test hooks, and exercises every functional contract Task 5 originally verified manually. See `.planning/phases/01-stabilize-video-pipeline/01-13-SUMMARY.md` (written post-Task-9 of Plan 01-13) for the assertion-to-contract mapping.
**Coverage map — original Task 5 steps now covered by `npm run test:uat`:**
| Task 5 step | Original manual check | Harness assertion |
|-------------|----------------------|-------------------|
| Step 4 | onStartup notification fires within ~2 s | A8 (Bug A canonical: chrome.notifications.create called once with valid icon) |
| Step 5 | Picker is monitor-only (entire-screen) | A3 (displaySurface === 'monitor' on captured track via synthetic stream) |
| Step 7 | Badge transitions to REC on START_RECORDING | A2 (chrome.action badge text === 'REC' after toolbar onClicked path) |
| Step 8 | Buffer holds last 30 s across continuous capture | A11 (35 s synthetic playback yields ≥ 3 self-contained segments via offscreen test hook) |
| Step 9 | Popup opens (NOT picker) on toolbar click while recording; SAVE produces zip | A4 + A5 (setPopup pointing at SAVE-only popup during isRecording; SAVE_ARCHIVE → chrome.downloads zip) |
| Step 10 | Zip contains video/last_30sec.webm that plays end-to-end | A12 + A13 (ffprobe-via-host on extracted webm; zip structure + meta.json schema validation) |
| Step 11 | Stop-sharing → badge OFF, NO recovery notification (Bug B fix) | A6 (Bug B canonical: track.dispatchEvent('ended') → badge='', notification count delta = 0) |
| Step 12 | Post-stop toolbar click re-triggers picker | A6 indirectly + A4 (setPopup back to '' after stop puts onClicked in path) |
| Step 13 | Idle toolbar click triggers picker directly | A1 (SW bootstraps with setIdleMode → setPopup('')); A2 covers the click → REC path |
| Step 15 | ERROR state + recovery notification for genuine error codes | A7 (synthetic RECORDING_ERROR with non-user-stopped code → ERR badge + recovery notification create) |
Original Task 5 step 6 (manual picker dismiss + accept) is a UI-handler step subsumed by A3's synthetic-stream bypass — the picker UI itself is not the contract; the post-grant `displaySurface === 'monitor'` validation is, and A3 pins it.
**Operator steps retained:**
The harness cannot verify two things, both retained as operator-facing gates:
1. **Step 1 (build verification)** — `npm run build` must exit 0 against the operator's local toolchain (Node version, npm registry availability, etc.). The harness assumes `dist/` exists; this step is the build-environment sanity check.
2. **Step 14 (brand / design check)** — Plan 01-13's charter explicitly does NOT cover visual / brand / typography correctness (notification iconography, badge color contrast against the operator's OS theme, popup typography rendering on the operator's locale). This is the operator-only gate per Plan 01-13's scope. The operator visually inspects the loaded extension on their actual Chrome + OS combination and confirms the brand presentation matches the design intent.
**What Plan 01-09 closure now requires:**
- `npm run build` exit 0 (operator's local sanity check — Step 1 retained).
- `npm run test:uat` exit 0 with 14/14 GREEN (replaces operator Steps 4, 5, 7-13, 15 — the functional contract).
- Operator brand/design ack on the loaded extension (Step 14 retained as the operator gate Plan 01-13 carves out).
The historical 15-step empirical checkpoint (lines 519-548 above) remains in this document as the reference for the original closure intent, and as a fallback if the harness toolchain becomes unavailable (e.g., Puppeteer breakage on a future Chrome major where the harness needs revision).
<success_criteria>
Plan 01-09 is complete when:
1. The 4 displaySurface tests + 13 toolbar/badge/notification/popup-idle-race tests (17 new total) are all GREEN.