a991e1732a
docs(02-01): complete RED gate — 3 test files pin D-P2-01 + D-P2-02 + D-P2-03 + F2
...
Plan 02-01 Wave 0 RED gate closed. Three failing test files (16 it()
blocks total: 11 RED + 5 GREEN regression guards) pin the locked
decisions for Phase 2 ahead of Plans 02-02 + 02-03 implementation:
- blob-url-download.test.ts (3 RED) — D-P2-01 offscreen Blob URL
pipeline (closes audit P0-6: base64 data: URL → blob: URL).
- meta-json-urls-schema.test.ts (5 RED) — D-P2-02 meta.url → meta.urls
migration + F2 empty-tracker → urls:[] resolution.
- strict-meta-json-validation.test.ts (3 RED + 5 GREEN) — D-P2-03
strict 8-field schema validation with EXPECTED_KEYS pin including
planner-suggested `schemaVersion` 8th field.
Test count delta: 155 GREEN → 159 GREEN + 11 RED (+4 GREEN regression
guards, +11 RED test contracts). Vitest reporter:
Test Files 4 failed | 27 passed (31)
Tests 12 failed | 159 passed (171)
(12 failed = 3 + 5 + 3 RED from this plan + 1 pre-existing flaky
ffprobe test in webm-remux.test.ts — out of scope; documented in
SUMMARY.md Deferred Issues.)
Tier-1 grep gate: 13/13 GREEN preserved (this plan touches no
production code).
Planner-resolved tensions carried forward in SUMMARY.md:
- D-P2-03 'non-empty urls[]' vs CONTEXT.md permissive empty-array →
F2 resolved in favor of permissive (Test 3 of Task 3 relaxed).
- 8th field name `schemaVersion` → tentative planner pick;
Plan 02-03 implementer commits to schemaVersion: '2' const.
- tab-url-tracker module seam → planner-suggested name
`src/background/tab-url-tracker.ts` with getTabUrlsSeen() export.
- Plan claim 'ALL 8 fail' reconciled honestly: 3 RED + 5 GREEN
regression guards (timestamp/semver/totalEvents/buffer-seconds/
duration-minutes already match current 7-field shape).
Plan suggestions reconciled with reality:
- vitest env: 'node' not 'jsdom' (Node 24 has URL/Blob/performance
globals; jsdom not in devDeps). FileReader polyfill inline.
- Task 2 Test 1 source-text scan instead of tsc-compile-failure
(vitest.config.ts typecheck:{enabled:false}).
Per worktree-mode constraint: STATE.md, ROADMAP.md, REQUIREMENTS.md
NOT modified. The orchestrator owns those writes after all worktree
agents in Wave 0 complete.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-20 15:36:09 +02:00
a440c7d76b
wip: phase-02 paused — 4 plans validated, ready for execution
...
Phase 2 (Stabilize export pipeline) planning ceremony complete:
- /gsd-discuss-phase 2 → 02-CONTEXT.md (cc042a5 ) with 3 locked decisions
(D-P2-01 offscreen Blob URL; D-P2-02 meta.urls schema; D-P2-03 full scope)
- /gsd-plan-phase 2 → 4 plans (0608b22 ) → revision iteration 1 per checker
(9dcfcf0; B1 tabs permission + 4 informational flags resolved) →
plan-checker iteration 2 GREEN → constraint sync (df8c086 )
- DEC-011 Amendment 1 landed: `tabs` permission added to manifest for D-P2-02
meta.urls feature
HANDOFF.json + .continue-here.md capture:
- 10 completed-this-session items (resume + researcher + Plan 01-14 + Plan
01-12 + Plan 01-10 cycle-2 + Phase 1 verifier + alpha distribution +
re-phasing + Phase 2 discuss + Phase 2 plan)
- 3 remaining tasks (Phase 2 execute, Phase 3 prep, Phase 4 optional)
- 5 decisions this session
- 2 advisory anti-patterns (/gsd-remove-phase CLI cascading bug;
charter-shift-via-discuss-phase pattern)
- Phase 4 backlog (8 items accumulated)
- Test baselines (vitest 153, UAT 24, FORBIDDEN_HOOK_STRINGS 12)
Branch identity preserved at gsd/phase-01-stabilize-video-pipeline per
/gsd-plan-phase workflow invariant — ROADMAP phase rename does NOT mutate
branch name.
Alpha distribution shipped to testers in parallel:
dist-archives/mokosh-build-2026-05-20-6dbed91.zip
SHA256: 2a9ffe6797534d6a4cf5e040dccde8772245407483693efa17fdd1caca8b1f66
Next session: /gsd-resume-work → /gsd-execute-phase 2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-20 14:56:53 +02:00
9dcfcf0793
fix(02): revise plans per checker (B1 + 4 flags) — add tabs permission for D-P2-02
...
- BLOCKER B1: add `tabs` to manifest.json permissions (DEC-011 Amendment 1
cites Phase 2 D-P2-02 meta.urls feature as justification). Honors
D-P2-02 "all tabs visible" wording verbatim. Updates manifest-i18n test
expected permission list lockstep.
- F1: add A28 harness assertion for REQ-archive-layout strict zip-layout
verification (5 entries, no extras).
- F2: createArchive empty-tracker fallback removed; logs warn + sets
urls:[] instead of fake [extension-origin URL]. 02-01 RED test pins
empty-tracker → urls:[].
- F3: 02-02 Task 3 prose deliberation struck; typed `blob-url-mint-failed`
throw is the resolved-only contract.
- F4: 02-02 Task 3 verify block adds full-suite `npm test` after focused
test runs.
- A27 strict-mode (Plan 02-04): REQUIRES both URLs in meta.urls; FAILS
on length < 2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-20 14:25:20 +02:00
0608b22427
feat(02): plans 01-04 — Phase 2 export pipeline closure (Blob URL + meta.urls + schema + harness)
...
Wave structure (4 plans, 3 waves):
- 02-01 (Wave 1 RED): 15 RED tests pinning D-P2-01 (blob: URL contract), D-P2-02
(meta.urls schema + dedup + filter), D-P2-03 (strict 8-field validation +
schemaVersion '2' cutover marker).
- 02-02 (Wave 2): Offscreen-minted Blob URL pipeline — extends PortMessageType
with CREATE/REVOKE messages; SW downloadArchive rewrite (data: → blob: via
base64-on-wire to offscreen + URL.createObjectURL + chrome.downloads.onChanged
revoke lifecycle). Closes audit P0-6; unblocks >2 MB archives.
- 02-03 (Wave 2): meta.urls schema migration + tab-url-tracker module
(chrome.tabs.onActivated + onUpdated → deduplicated, filtered, first-seen-
ordered string[]); SessionMetadata 7→8 fields with schemaVersion + urls;
REQUIREMENTS.md REQ-meta-json-schema amendment. Closes P1 #10 .
- 02-04 (Wave 3): UAT harness A24+A25+A26+A27 — blob: URL prefix, <5s SAVE→zip
latency, meta.json 8-field shape, multi-tab dedup; pre-checkpoint bundle gates
per saved memory + operator empirical UAT cycle 1. Tier-1 FORBIDDEN_HOOK_STRINGS
inventory stays at 12 (no new hook symbols — chrome.* monkey-patches + JSZip
+ production APIs only).
Locked decisions honored (per 02-CONTEXT.md):
- D-P2-01: offscreen-minted Blob URL via existing keepalivePort + base64 wire
format (reuses D-12 precedent at src/shared/binary.ts).
- D-P2-02: meta.json url:string → urls:string[]; URL filter per CONTEXT.md
<specifics> (include https://, chrome-extension://; exclude chrome://, about:,
devtools://, file://); dedup + first-seen ordering.
- D-P2-03: full scope; 8-field strict schema validation with schemaVersion='2'
as the 8th field (planner-resolved tentative pick; revisable by plan-checker).
Architectural constraints preserved:
- Always-on charter (Plan 01-09 Amendment 3): no finally-block in saveArchive;
no clearTabUrlsSeen on SAVE.
- Tier-1 FORBIDDEN_HOOK_STRINGS = 12 (no new test-hook symbols).
- Never await import(...) in src/background/index.ts (Plan 01-11 SUMMARY).
- Pre-checkpoint bundle gates per feedback-pre-checkpoint-bundle-gates.md (run
in 02-04 Task 4 before operator surface).
Plan validation: gsd-sdk frontmatter.validate + verify.plan-structure GREEN
for all 4 plans.
ROADMAP updated: Phase 2 Plans list + Goal/Success Criteria block annotated
with D-P2-02/D-P2-03 amendments + 5th success criterion (Blob URL + revoke
lifecycle for >2 MB archives); Progress table 0/TBD → 0/4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-20 14:03:14 +02:00
cc042a5583
docs(02): capture phase context — discuss-phase complete
...
Phase 2 (Stabilize export pipeline) discuss-phase landed via inline canonical
workflow execution. 02-CONTEXT.md captures 3 locked decisions:
- **D-P2-01:** Offscreen-minted Blob URL pipeline replaces base64 data: URL
download path (src/background/index.ts:709-710). SW Blob → offscreen
URL.createObjectURL → SW chrome.downloads.download → URL.revokeObjectURL on
onChanged. Closes audit P0-6. Unblocks real-archive size (>2 MB).
- **D-P2-02:** meta.json schema migrates singular `url: string` to plural
`urls: string[]` capturing all tabs visible during the 30s recording window.
Schema-breaking change requires REQUIREMENTS.md REQ-meta-json-schema
amendment + SessionMetadata type update. Closes audit P1 #10 captured-URL bug.
- **D-P2-03:** Full Phase 2 scope = Blob URL migration + meta.urls schema
migration + strict meta.json schema validation test + UAT harness A24+
<5s latency assertion. ~3-4 plans expected.
Decision provenance:
- D-P2-01 rationale: user "up to you. If you think we need to migrate — good
let's do it." Plus analysis: real archives EXCEED base64 cap.
- D-P2-02 rationale: user picked "All tabs' URLs as an array
(meta.json.urls)" — highest informational fidelity for multi-tab bug
reproduction. Privacy acceptable per "log is internal" v1 charter.
- D-P2-03 rationale: user picked "Full scope: bug fixes + schema + harness
latency assertion".
Canonical references + code context + deferred items captured in CONTEXT.md.
Phase boundary explicit: not from-scratch; closes residual gaps after Plans
01-08/01-09/01-10/01-12 substantively shipped REQ-popup-ui + REQ-archive-
layout + REQ-screenshot-on-export.
Next: /gsd-plan-phase 2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-20 13:41:08 +02:00