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>
This commit is contained in:
@@ -98,8 +98,11 @@ directory + `vite.config.ts` inline string + `src/background/`.
|
||||
### Phase 2: Stabilize export pipeline
|
||||
**Goal**: A click on "Сохранить отчёт об ошибке" produces a SPEC-conformant ZIP
|
||||
archive on disk in under 5 s, containing a screenshot taken at click time,
|
||||
laid out per CON-archive-layout, with `meta.json` per CON-meta-json-schema, and
|
||||
declared by a manifest carrying exactly the permission set in DEC-011.
|
||||
laid out per CON-archive-layout, with `meta.json` per CON-meta-json-schema
|
||||
(post-2026-05-20 amendment: 8-field shape with `urls: string[]` replacing
|
||||
`url: string` + new `schemaVersion: '2'` cutover marker per D-P2-02 + D-P2-03),
|
||||
and downloaded via an offscreen-minted Blob URL (closes audit P0-6 base64
|
||||
data-URL cap; D-P2-01).
|
||||
|
||||
**Depends on**: Phase 1 (export consumes the video buffer + the rrweb/event-log
|
||||
infrastructure already shipped in src/content/index.ts; original "Phase 2 DOM"
|
||||
@@ -108,9 +111,10 @@ dependency removed per 2026-05-20 re-phasing).
|
||||
**Scope note (2026-05-20):** Plans 01-08 (webm-remux + JSZip), 01-09 (popup
|
||||
state machine + SAVE-only UI), 01-10 (welcome tab + i18n), and 01-12 (manifest
|
||||
i18n + en+ru locales) already shipped most of the originally-planned export
|
||||
surface. Phase 2 likely collapses to 2-3 small plans closing residual gaps:
|
||||
screenshot-at-click capture, meta.json schema validation, and SPEC §10 #6
|
||||
<5s export-latency verification.
|
||||
surface. Phase 2 closes the AUDIT residuals: P0-6 (base64 → Blob URL via
|
||||
offscreen-minted URL.createObjectURL per DEC-006) + P1 #10 (meta.json
|
||||
`url:string` → `urls:string[]` schema migration) + strict 8-field schema
|
||||
validation + UAT harness <5s latency assertion (REQ-archive-export-latency).
|
||||
|
||||
**Requirements**: REQ-popup-ui, REQ-screenshot-on-export, REQ-archive-layout,
|
||||
REQ-meta-json-schema, REQ-archive-export-latency, REQ-manifest-permissions
|
||||
@@ -134,14 +138,30 @@ REQ-meta-json-schema, REQ-archive-export-latency, REQ-manifest-permissions
|
||||
opening it reveals exactly the layout in REQ-archive-layout
|
||||
(`video/last_30sec.webm`, `rrweb/session.json`, `logs/events.json`,
|
||||
`screenshot.png`, `meta.json` at the root) with no extra entries.
|
||||
3. `meta.json` validates against the verbatim CON-meta-json-schema (all 7
|
||||
fields present, types correct, `timestamp` is ISO-8601 with `Z`).
|
||||
3. `meta.json` validates against the verbatim CON-meta-json-schema (8 fields
|
||||
per the 2026-05-20 D-P2-02/D-P2-03 amendment: `schemaVersion`, `timestamp`,
|
||||
`urls`, `userAgent`, `extensionVersion`, `videoBufferSeconds`,
|
||||
`logDurationMinutes`, `totalEvents`; `urls` is a non-empty deduplicated
|
||||
`string[]` of operator tab URLs visited during the 30s window; types
|
||||
correct; `timestamp` is ISO-8601 with `Z`).
|
||||
4. `manifest.json` in `dist/` after `npm run build` declares exactly the
|
||||
permission set in DEC-011 with no additional or missing entries; loading
|
||||
unpacked into Chrome produces no permission-related warnings or errors in
|
||||
`chrome://extensions/`.
|
||||
5. A real >2 MB archive downloads to disk successfully (the canonical 5-10 MB
|
||||
operator bug-report archive — previously failed via base64 data-URL cap).
|
||||
The chrome.downloads.download call site receives a `blob:` URL (not
|
||||
`data:application/zip;base64,`); URL.revokeObjectURL is dispatched via
|
||||
chrome.downloads.onChanged 'complete' (D-P2-01 lifecycle).
|
||||
|
||||
**Plans**: 4 plans (02-01 through 02-04). Wave 1 RED tests → Wave 2 parallel
|
||||
implementation (Blob URL + meta.urls) → Wave 3 harness extension + operator
|
||||
empirical checkpoint.
|
||||
- [ ] 02-01-PLAN.md — Wave 0 RED tests: blob-url-download.test.ts + meta-json-urls-schema.test.ts + strict-meta-json-validation.test.ts pinning D-P2-01/D-P2-02/D-P2-03 contracts (TDD)
|
||||
- [ ] 02-02-PLAN.md — Wave 1 Blob URL pipeline (D-P2-01, closes P0-6): offscreen CREATE/REVOKE handlers via base64-on-wire; SW downloadArchive rewrite; chrome.downloads.onChanged revoke lifecycle
|
||||
- [ ] 02-03-PLAN.md — Wave 1 meta.urls + tab-url-tracker (D-P2-02 + D-P2-03, closes P1 #10): SessionMetadata 7→8 fields with schemaVersion+urls; chrome.tabs.onActivated/onUpdated listeners; REQUIREMENTS.md REQ-meta-json-schema amendment
|
||||
- [ ] 02-04-PLAN.md — Wave 2 harness A24+A25+A26+A27 + operator empirical checkpoint: blob:URL prefix, <5s SAVE→zip latency, meta.json 8-field shape, multi-tab dedup; pre-checkpoint bundle gates + operator UAT cycle 1
|
||||
|
||||
**Plans**: TBD
|
||||
**UI hint**: yes
|
||||
|
||||
### Phase 3: SPEC §10 smoke verification + DOM/event-log verification
|
||||
@@ -247,6 +267,6 @@ Phases execute in numeric order: 1 → 2 → 3 → 4 → 5.
|
||||
| Phase | Plans Complete | Status | Completed |
|
||||
|-------|----------------|--------|-----------|
|
||||
| 1. Stabilize video pipeline | 14/14 | **CLOSED 2026-05-20** via gsd-verifier audit GREEN (17/17 must-haves; commit 586836f); all markers flipped | Functional contract closed 2026-05-19 via Plan 01-13 harness PASS; design/brand contract closed 2026-05-20 via Plan 01-12 brand-fit ack; welcome-tab contract closed 2026-05-20 via Plan 01-10 cycle-2 operator ack "All good" + 5 inter-cycle debug fixes |
|
||||
| 2. Stabilize export pipeline | 0/TBD | Not started (narrowed scope post-2026-05-20 re-phasing; ~2-3 plans expected) | - |
|
||||
| 2. Stabilize export pipeline | 0/4 | Plans landed 2026-05-20 (4 plans: Wave 0 RED → Wave 1 Blob URL + meta.urls parallel → Wave 2 harness + operator checkpoint); execution pending | - |
|
||||
| 3. SPEC §10 smoke + DOM/event-log verification | 0/TBD | Not started (absorbed Phase-2 DOM verification per 2026-05-20 re-phasing; ~2-3 plans) | - |
|
||||
| 4. Harden + clean up (optional) | 0/TBD | Not started (deferred backlog: cursor visibility, dark-surface logo, tabs perm gap, ffprobe flakes, ROADMAP backfill, rrweb-version upgrade research, REQ-password-confidentiality v2 candidate) | - |
|
||||
|
||||
Reference in New Issue
Block a user