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 56 additions and 23 deletions
Showing only changes of commit a8b4fe567b - Show all commits

View File

@@ -73,12 +73,16 @@ Requirements for the Phase 1 SPEC. Each maps to one phase in ROADMAP.md.
### Export ### Export
- [ ] **REQ-screenshot-on-export**: On "Save archive" click, the extension - [x] **REQ-screenshot-on-export**: On "Save archive" click, the extension
captures a PNG screenshot of the active tab via captures a PNG screenshot of the active tab via
`chrome.tabs.captureVisibleTab()` and includes it as `screenshot.png` in the `chrome.tabs.captureVisibleTab()` and includes it as `screenshot.png` in the
archive. Binding: DEC-008. archive. Binding: DEC-008.
COMPLETED Phase 2 (2026-05-20): `captureScreenshot()` in src/background/index.ts
invoked at SAVE entry; archive layout A28 set-equality verifies `screenshot.png`
presence in the zip (UAT harness 29/29 GREEN). Shipped in Phase 1 via Plan
01-09 SAVE flow; Phase 2 closure verifies layout contract.
- [ ] **REQ-popup-ui**: The extension exposes a minimal popup with a single - [x] **REQ-popup-ui**: The extension exposes a minimal popup with a single
button labeled "Сохранить отчёт об ошибке" and a sub-label "Последние 30 сек button labeled "Сохранить отчёт об ошибке" and a sub-label "Последние 30 сек
видео + 10 мин лога". Button state machine: видео + 10 мин лога". Button state machine:
`idle → "Сохраняю..." → "Готово! ✓" → idle` (3 s revert). On click: `idle → "Сохраняю..." → "Готово! ✓" → idle` (3 s revert). On click:
@@ -86,8 +90,13 @@ Requirements for the Phase 1 SPEC. Each maps to one phase in ROADMAP.md.
(3) request rrweb snapshots from Content Script, (4) assemble archive, (3) request rrweb snapshots from Content Script, (4) assemble archive,
(5) trigger download, (6) display "Готово! ✓". Russian strings are part of (5) trigger download, (6) display "Готово! ✓". Russian strings are part of
the contract and preserved verbatim. the contract and preserved verbatim.
COMPLETED Phase 2 (2026-05-20): SAVE-only popup state machine shipped end-to-end
via Plan 01-09 (state machine + Russian i18n strings via chrome.i18n.getMessage
with `|| <en-const>` fallback per Plan 01-12 pattern). Phase 2 verifies the
end-to-end SAVE → assembly → Blob URL download path via UAT harness A24 + A25
(Puppeteer-driven). 171/171 vitest GREEN.
- [ ] **REQ-archive-layout**: The archive is named - [x] **REQ-archive-layout**: The archive is named
`session_report_YYYY-MM-DD_HH-MM-SS.zip` and contains exactly: `session_report_YYYY-MM-DD_HH-MM-SS.zip` and contains exactly:
``` ```
session_report_2025-05-15_14-32-10.zip session_report_2025-05-15_14-32-10.zip
@@ -102,8 +111,11 @@ Requirements for the Phase 1 SPEC. Each maps to one phase in ROADMAP.md.
``` ```
Binding: CON-archive-layout. Binding: CON-archive-layout.
- SPEC §10 acceptance criteria: #7. - SPEC §10 acceptance criteria: #7.
COMPLETED Phase 2 (2026-05-20): archive assembly shipped Phase 1 via Plan 01-08
(webm-remux + JSZip); Phase 2 verifies the 5-entry layout via UAT harness A28
set-equality (jszip-parsed; not order-dependent). 29/29 UAT GREEN.
- [ ] **REQ-meta-json-schema**: `meta.json` inside the archive conforms to the - [x] **REQ-meta-json-schema**: `meta.json` inside the archive conforms to the
verbatim schema (D-P2-02 + D-P2-03 cutover; replaces the 7-field verbatim schema (D-P2-02 + D-P2-03 cutover; replaces the 7-field
`url: string` shape per audit P1 #10 amendment 2026-05-20): `url: string` shape per audit P1 #10 amendment 2026-05-20):
```json ```json
@@ -135,13 +147,26 @@ Requirements for the Phase 1 SPEC. Each maps to one phase in ROADMAP.md.
Binding: CON-meta-json-schema (this REQ-text supersedes the original Binding: CON-meta-json-schema (this REQ-text supersedes the original
CON-meta-json-schema 7-field shape — the original is preserved in the CON-meta-json-schema 7-field shape — the original is preserved in the
SPEC for provenance; this REQ documents the Phase 2 cutover). SPEC for provenance; this REQ documents the Phase 2 cutover).
COMPLETED Phase 2 (2026-05-20): SessionMetadata in src/shared/types.ts has the
8-field shape with `urls: string[]` + `schemaVersion: string` (no `url` field);
src/background/tab-url-tracker.ts (246 LOC) dedupes/filters tab URLs with first-seen
ordering; createArchive in src/background/index.ts emits all 8 fields with
`schemaVersion: '2'`. Verified by UAT harness A26 (8-field strict) + A27 (multi-tab
urls[] strict mode with tabs permission) + tests/build/strict-meta-json-validation.test.ts
(8 tests) + tests/background/meta-json-urls-schema.test.ts (5 tests).
### Manifest & Install ### Manifest & Install
- [x] **REQ-manifest-permissions**: `manifest.json` declares exactly the - [x] **REQ-manifest-permissions**: `manifest.json` declares exactly the
permission set in DEC-011 (`tabCapture`, `activeTab`, `downloads`, `scripting`, permission set in DEC-011 + Amendment 1 (`desktopCapture` per D-01,
`storage`; `host_permissions: ["<all_urls>"]`) and requests a user gesture `activeTab`, `tabs` per Amendment 1, `downloads`, `scripting`, `storage`,
for `tabCapture` on first activation. Binding: DEC-011, CON-manifest-permissions. `offscreen`, `notifications`; `host_permissions: ["<all_urls>"]`) and requests
a user gesture for `desktopCapture` via getDisplayMedia on activation.
Binding: DEC-011 + Amendment 1 (added `tabs` per Phase 2 D-P2-02 meta.urls
requirement 2026-05-20), CON-manifest-permissions.
Phase 2 verification (2026-05-20): manifest.json permissions array intact incl.
`tabs` entry (tests/i18n/manifest-i18n.test.ts pin); permissions validation passes
in pre-checkpoint bundle gates (5/5 PASS).
COMPLETED Phase 1 Plan 01-12 (2026-05-20): manifest:name + :description + COMPLETED Phase 1 Plan 01-12 (2026-05-20): manifest:name + :description +
:action.default_title migrated to `__MSG_*__` placeholders + default_locale='en'; :action.default_title migrated to `__MSG_*__` placeholders + default_locale='en';
manifest validation PASS in pre-checkpoint bundle gates (`tests/i18n/manifest-i18n.test.ts` manifest validation PASS in pre-checkpoint bundle gates (`tests/i18n/manifest-i18n.test.ts`
@@ -162,10 +187,17 @@ Requirements for the Phase 1 SPEC. Each maps to one phase in ROADMAP.md.
### Performance & Security ### Performance & Security
- [ ] **REQ-archive-export-latency**: From the moment the user clicks the - [x] **REQ-archive-export-latency**: From the moment the user clicks the
export button, the ZIP archive lands in the "Downloads" folder in under export button, the ZIP archive lands in the "Downloads" folder in under
5 seconds. Binding: CON-archive-export-latency. 5 seconds. Binding: CON-archive-export-latency.
- SPEC §10 acceptance criteria: #6. - SPEC §10 acceptance criteria: #6.
COMPLETED Phase 2 (2026-05-20): Plan 02-02 migrated download from base64 data:
URL (which exceeded Chrome's ~2 MB data-URL cap for real payloads) to
offscreen-minted Blob URL (`blob:chrome-extension://...`) via
`URL.createObjectURL` per D-P2-01 (closes audit P0-6). chrome.downloads.onChanged
listener revokes the URL on state.current==='complete' | 'interrupted'.
Verified empirically by UAT harness A25 — Puppeteer-driven real-Chrome <5s
SAVE→zip latency assertion (29/29 UAT GREEN).
- [ ] **REQ-password-confidentiality**: Passwords do not appear in rrweb - [ ] **REQ-password-confidentiality**: Passwords do not appear in rrweb
snapshots OR the user event log. Masking is enforced via rrweb v2 snapshots OR the user event log. Masking is enforced via rrweb v2

View File

@@ -2,16 +2,16 @@
gsd_state_version: 1.0 gsd_state_version: 1.0
milestone: v2.0.0 milestone: v2.0.0
milestone_name: milestone milestone_name: milestone
status: executing status: ready_to_plan
stopped_at: /gsd-resume-work loaded HANDOFF.json (a440c7d). Phase 1 closed; Phase 2 planning complete (4 plans validated, plan-checker iter-2 GREEN). Awaiting user direction on `/gsd-execute-phase 2` (canonical) vs `--wave 1` (RED tests only). stopped_at: Phase 2 closed 2026-05-20 — 4/4 plans landed, UAT harness 29/29 GREEN, vitest 171/171 GREEN, bundle gates 6/6 PASS, verifier verdict PASSED (T5 override per user delegation + harness coverage). Phase 3 prep awaits.
last_updated: "2026-05-20T13:09:26.050Z" last_updated: "2026-05-20T18:00:00.000Z"
last_activity: 2026-05-20 -- Phase 02 execution started last_activity: 2026-05-20 -- Phase 02 closed
progress: progress:
total_phases: 4 total_phases: 4
completed_phases: 1 completed_phases: 2
total_plans: 18 total_plans: 18
completed_plans: 14 completed_plans: 18
percent: 78 percent: 50
--- ---
# Project State # Project State
@@ -23,17 +23,17 @@ See: .planning/PROJECT.md (updated 2026-05-15)
**Core value:** When an operator hits a bug, one click MUST produce a **Core value:** When an operator hits a bug, one click MUST produce a
self-contained archive that lets support reproduce what happened — in under 5 s, self-contained archive that lets support reproduce what happened — in under 5 s,
no server, no password leaks. no server, no password leaks.
**Current focus:** Phase 02stabilize-export-pipeline **Current focus:** Phase 3SPEC §10 smoke verification + DOM/event-log verification (kickoff pending)
## Current Position ## Current Position
Phase: 02 (stabilize-export-pipeline) — EXECUTING Phase: 2 of 4 (Stabilize export pipeline) — **COMPLETE** 2026-05-20 via gsd-verifier audit PASSED (5/5 must-haves verified; T5 override per user delegation 2026-05-20 + saved memory `feedback-trust-harness-over-manual-uat.md`; VERIFICATION.md at `.planning/phases/02-stabilize-export-pipeline/02-VERIFICATION.md`). 4/4 plans landed; UAT harness 24→29 GREEN; vitest 153→171 GREEN; bundle gates 6/6 PASS; D-P2-01 closes audit P0-6; D-P2-02 + D-P2-03 close audit P1 #10.
Phase 2 of 4 (Stabilize export pipeline) — PLANNING COMPLETE; 4 plans validated (02-01..02-04) + plan-checker iter-2 GREEN; ready for `/gsd-execute-phase 2` Phase 3 of 4 (SPEC §10 smoke + DOM/event-log verification) — kickoff pending
Plan: 1 of 4 Plan: 18 of 18 complete (Phase 1: 14 + Phase 2: 4 = 18; Phase 3: 0 of TBD)
Status: Executing Phase 02 Status: Phase 2 complete; Phase 3 kickoff pending
Last activity: 2026-05-20 -- Phase 02 execution started Last activity: 2026-05-20
Progress: [██████████] Phase 1 100% · Overall 1/5 phases complete Progress: [██████████░░░░░░░░░░] Phase 1 + Phase 2 complete · Overall 2/4 phases complete
### Plan 01-10 closure (2026-05-20) ### Plan 01-10 closure (2026-05-20)
@@ -115,7 +115,7 @@ Progress: [██████████] Phase 1 100% · Overall 1/5 phases co
**Velocity:** **Velocity:**
- Total plans completed: 0 - Total plans completed: 4
- Average duration: — - Average duration: —
- Total execution time: — - Total execution time: —
@@ -128,6 +128,7 @@ Progress: [██████████] Phase 1 100% · Overall 1/5 phases co
| 3. Stabilize export pipeline | 0 | — | — | | 3. Stabilize export pipeline | 0 | — | — |
| 4. SPEC §10 smoke verification | 0 | — | — | | 4. SPEC §10 smoke verification | 0 | — | — |
| 5. Harden + clean up | 0 | — | — | | 5. Harden + clean up | 0 | — | — |
| 02 | 4 | - | - |
**Recent Trend:** **Recent Trend:**