Plan 01-13 Task 9 closure for operator empirical UAT bug
.planning/debug/01-09-save-stops-recording.md. Adds the harness
assertion that empirically verifies the SAVE-auto-stops-recording fix
(committed at 4f4c3e2) holds end-to-end through a real Chrome instance
+ real MediaRecorder + real chrome.action + real chrome.notifications.
A14 design (read-only post-state check):
1. Snapshot active mokosh-recovery-* notification ids (delta baseline).
2. Settle 500ms for the post-A13 SAVE finally block to land.
3. Read chrome.action.getBadgeText/getPopup + getActiveNotificationIds.
4. Assert badge='', popup='', recoveryDelta=0 — three checks total.
A14 chains off A13's SAVE_ARCHIVE (which under the new fix auto-stops
the recording per SPEC one-shot intent). A14 does NOT dispatch its own
SAVE — A13's SAVE is the event A14 observes the post-state of. This
keeps the harness wall-clock minimal (~500ms added for A14, no
additional 11s segment-settle).
Amendment to A13: now does setupFreshRecording + 11s segment-settle
BEFORE its own SAVE_ARCHIVE dispatch. Under the new fix, A12's
SAVE_ARCHIVE stopped the recording — without this A13 would dispatch
against an empty buffer and fail with EmptyVideoBufferError. The
amendment adds ~11s to harness wall-clock; acceptable given the SPEC
SAVE=stop contract is now load-bearing.
A14 contract notes per orchestrator simpler-design recommendation:
- direct isRecording proxy check skipped (no bridge op exposes it;
transitively verified via badge='' — production state machine
pairs isRecording transitions with badge transitions atomically)
- recovery-notif check is delta-based (A7 left a mokosh-recovery-*
in the active set; we verify A13's SAVE did NOT add another one)
Files modified:
- tests/uat/extension-page-harness.ts: +assertA14 (~110 lines) +
A13 amended with setupFreshRecording + 11s settle + 1 new
SETUP check + window.__mokoshHarness export wire
- tests/uat/lib/harness-page-driver.ts: +driveA14 wrapper
- tests/uat/harness.test.ts: +A14 in drivers array + header doc +
total 14/14 → 15/15 + import line
Verification:
- npm run test:uat: 15/15 GREEN (was 14/14)
- npx tsc --noEmit: exit 0 (no type errors)
- npm run build: exit 0 (production bundle clean)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
15 KiB
15 KiB