fix(04): revise plans per checker iter-1 — 2 BLOCKERS + 2 WARNINGS fixed
Plan-checker iter-1 found 2 BLOCKERS + 4 WARNINGS. Iter-2 revision applies
surgical fixes to 4 plans + VALIDATION:
BLOCKER 1 (Plan 04-06 Task 4): wrong SW chunk glob `dist/assets/index*-bg.js`
matched zero files → Gates 2/3/4 silently PASSED. Replaced with canonical
`dist/assets/index.ts-*.js` (verified empirically: index.ts-8LkXuqac.js
on disk; RESEARCH Q1). Added glob-existence pre-gate `ls | wc -l >= 1`
to fail-loudly on future Vite chunk-naming shift.
BLOCKER 2 (Plan 04-04 Task 1): spike called non-existent
__mokoshHarness.dispatchSaveArchive (verified: harness surface is
assertA1..A31 + getManifestVersion only). Applied Option B — spike
+ driveA33 now dispatch SAVE_ARCHIVE via chrome.runtime.sendMessage
inline in page.evaluate (matches 9 existing assertA* methods:
A5/A11/A12/A13/A26/A28/A29/A30/A31). No new harness helper introduced.
WARNING 1 (Plan 04-02 Task 2): verify omitted UAT harness run. Added
`HEADLESS=1 SKIP_PROD_REBUILD=0 npm run test:uat 2>&1 | grep -c 'UAT
harness: 33/33 assertions passed'` to verify command (stdout format
confirmed at tests/uat/harness.test.ts:537).
WARNING 4 (Plan 04-07 Task 1): weak operator-ack gate (placeholder would
pass). Added `grep -cE 'approved|All good|APPROVED|approved by|operator
ack|all good' 04-VERIFICATION.md` to verify command. Covers both
canonical Plan 04-06 resume-signal ("approved" lowercase) AND prior-art
Plan 01-10 cycle-2 ack ("All good" titlecase).
WARNINGS 2 + 3 left as-is (truly advisory: scope-sanity threshold +
conservative dependency without file overlap).
04-VALIDATION.md per-task map rows updated for the 5 revised task entries
(04-02 T2 + 04-04 T1 + 04-04 T2 + 04-06 T4 + 04-07 T1). Frontmatter
adds `revised: 2026-05-21` + iter-2 notes block.
3 plans unchanged on disk (04-01, 04-03, 04-05).
Empirical confirmations used in revision:
- Harness surface: grep extension-page-harness.ts:4018 confirms
__mokoshHarness.{assertA1..A31, getManifestVersion}; no dispatchSaveArchive
- SW chunk filename: ls dist/assets/ shows index.ts-8LkXuqac.js;
no index*-bg.js matches
- SAVE_ARCHIVE precedent count: 9 existing assertA* methods use the
chrome.runtime.sendMessage pattern
- UAT harness stdout format: harness.test.ts:537 emits canonical
"UAT harness: N/N assertions passed"
Ready for plan-checker iter-3 re-verification.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,8 @@ status: draft
|
||||
nyquist_compliant: false
|
||||
wave_0_complete: false
|
||||
created: 2026-05-21
|
||||
revised: 2026-05-21
|
||||
revision_notes: "iter-2 revision — per-task map updated for 4 revised tasks (04-02 T2 UAT grep gate; 04-04 T1 Option B chrome.runtime.sendMessage; 04-06 T4 canonical SW chunk glob; 04-07 T1 ack-grep gate)"
|
||||
---
|
||||
|
||||
# Phase 04 — Validation Strategy
|
||||
@@ -44,24 +46,30 @@ created: 2026-05-21
|
||||
| 04-01 T1 RED 3 tests | 04-01 | 1 | Audit P1 #11/#14/#15 | T-04-01-01..03 | URL extraction + previousUrl + epoch normalization | unit (vitest jsdom) | `npm test -- tests/content/ --run` | ❌ NEW (Wave 0) | ⬜ pending |
|
||||
| 04-01 T2 GREEN edits | 04-01 | 1 | Audit P1 #11/#14/#15 | T-04-01-01..03 | Same; src/content/index.ts edits | unit (vitest) | `npm test -- tests/content/ --run` (+8 GREEN) + `npx tsc --noEmit` | ✗ EXISTS (modify) | ⬜ pending |
|
||||
| 04-02 T1 RED build gates | 04-02 | 1 | SC #4 dead-code + setimmediate hygiene | T-04-02-01/03 | grep gate | unit (vitest + execFile build) | `npm test -- tests/build/no-new-function-in-sw-chunk.test.ts tests/build/dead-code-grep.test.ts --run` | ❌ NEW (Wave 0) | ⬜ pending |
|
||||
| 04-02 T2 GREEN polyfill + rename + flip | 04-02 | 1 | SC #3 generate-icons + setimmediate Q1 | T-04-02-01/02/04 | queueMicrotask polyfill; .cjs rename | build-gate + unit | `npm run build && grep -c 'new Function' dist/assets/index.ts-*.js` -> 0 + `node generate-icons.cjs` exit 0 | ✗ EXISTS (modify + rename) | ⬜ pending |
|
||||
| 04-02 T2 GREEN polyfill + rename + flip (REVISION iter-2 WARNING 1) | 04-02 | 1 | SC #3 generate-icons + setimmediate Q1 + UAT preserved | T-04-02-01/02/04 | queueMicrotask polyfill; .cjs rename; JSZip fallback verified empirically | build-gate + unit + UAT | `npm run build && grep -c 'new Function' dist/assets/index.ts-*.js \| head -1; node generate-icons.cjs; npm test -- tests/build/no-new-function-in-sw-chunk.test.ts tests/build/dead-code-grep.test.ts --run; npx tsc --noEmit && HEADLESS=1 SKIP_PROD_REBUILD=0 npm run test:uat 2>&1 \| tee /tmp/04-02-task-2-uat.log \| tail -3; grep -c 'UAT harness: 33/33 assertions passed' /tmp/04-02-task-2-uat.log` -> 0 hits + cjs exit 0 + tests GREEN + tsc-clean + 1 ack-line | ✗ EXISTS (modify + rename) | ⬜ pending |
|
||||
| 04-03 T1 assertA29 rewrite | 04-03 | 2 | A29 flake stabilization | T-04-03-01/02 | cs-injection-world ISOLATED + sentinel | UAT (page-side) | `npx tsc --noEmit && npm run build:test` | ✗ EXISTS (modify) | ⬜ pending |
|
||||
| 04-03 T2 driveA29 strict-sentinel | 04-03 | 2 | A29 sentinel filter | T-04-03-01 | rrweb IncrementalSource.Mutation filter | UAT (host-side) | `HEADLESS=1 SKIP_PROD_REBUILD=1 npm run test:uat` 33/33 GREEN; 5/5 stress | ✗ EXISTS (modify) | ⬜ pending |
|
||||
| 04-04 T1 SPIKE | 04-04 | 3 | SC #1 SW state persistence empirical | T-04-04-01 | offscreen survives SW idle | spike script | `HEADLESS=1 tsx tests/uat/spike-a33-sw-persistence.ts` -> videoSize > 100_000 | ❌ NEW (Wave 0 spike) | ⬜ pending |
|
||||
| 04-04 T2 A33 + stopServiceWorker + orchestrator | 04-04 | 3 | SC #1 5-min idle harness | T-04-04-02/03/04 | CDP worker.close() + 5-min wait + SAVE | UAT | `HEADLESS=1 SKIP_LONG_UAT=1 npm run test:uat` 34/34 GREEN (skip-mode); full-mode 34/34 ~6.5 min | ✗ EXISTS (modify) | ⬜ pending |
|
||||
| 04-04 T1 SPIKE (REVISION iter-2 BLOCKER 2 — Option B chrome.runtime.sendMessage) | 04-04 | 3 | SC #1 SW state persistence empirical | T-04-04-01 | offscreen survives SW idle; SAVE_ARCHIVE via canonical chrome.runtime.sendMessage (NOT non-existent __mokoshHarness.dispatchSaveArchive) | spike script | `npx tsc --noEmit && HEADLESS=1 tsx tests/uat/spike-a33-sw-persistence.ts 2>&1 \| tee /tmp/04-04-spike.log; grep -c 'SPIKE RESULT' /tmp/04-04-spike.log; grep -c "type: 'SAVE_ARCHIVE'" tests/uat/spike-a33-sw-persistence.ts; grep -c 'dispatchSaveArchive' tests/uat/spike-a33-sw-persistence.ts` -> SPIKE RESULT line + SAVE_ARCHIVE >= 1 + dispatchSaveArchive == 0 + videoSize > 100_000 | ❌ NEW (Wave 0 spike) | ⬜ pending |
|
||||
| 04-04 T2 A33 + stopServiceWorker + orchestrator (REVISION iter-2 BLOCKER 2 — Option B) | 04-04 | 3 | SC #1 5-min idle harness | T-04-04-02/03/04 | CDP worker.close() + 5-min wait + SAVE via chrome.runtime.sendMessage inline page.evaluate | UAT | `npx tsc --noEmit && npm run build:test && HEADLESS=1 SKIP_PROD_REBUILD=1 SKIP_LONG_UAT=1 npm run test:uat 2>&1 \| tail -5 \| tee /tmp/04-04-task-2-skip.log; grep -c '34/34' /tmp/04-04-task-2-skip.log; grep -c 'dispatchSaveArchive' tests/uat/lib/harness-page-driver.ts tests/uat/extension-page-harness.ts tests/uat/harness.test.ts` -> 34/34 skip-mode + dispatchSaveArchive == 0 + full-mode 34/34 ~6.5 min | ✗ EXISTS (modify) | ⬜ pending |
|
||||
| 04-05 T1 assertA34 fetch+XHR | 04-05 | 4 | SC #2 fetch+XHR network_error | T-04-05-01 | cs-injection-world dual-trigger | UAT (page-side) | `npx tsc --noEmit && npm run build:test` | ✗ EXISTS (modify) | ⬜ pending |
|
||||
| 04-05 T2 driveA34 + orchestrator | 04-05 | 4 | SC #2 + P1 #11 end-to-end empirical | T-04-05-01 | 2 network_error entries with status===404 | UAT | `HEADLESS=1 SKIP_LONG_UAT=1 npm run test:uat` 35/35 GREEN; full-mode ~7 min | ✗ EXISTS (modify) | ⬜ pending |
|
||||
| 04-06 T1 RED inline-SVG + cursor-pin | 04-06 | 5 | UI-SPEC dark-logo + RESEARCH Finding 4 | T-04-06-01 | DOMParser inline injection (no innerHTML); cursor: 'always' literal | unit (vitest jsdom + build-grep) | `npm test -- tests/welcome/ tests/build/cursor-visibility.test.ts --run` | ❌ NEW (Wave 0) | ⬜ pending |
|
||||
| 04-06 T2 GREEN SVG + welcome.ts + globals | 04-06 | 5 | UI-SPEC stroke recolor + ?raw import | T-04-06-01 | currentColor + DOMParser inline | unit | `npm test -- tests/welcome/inline-svg.test.ts --run` 3/3 GREEN | ✗ EXISTS (modify) | ⬜ pending |
|
||||
| 04-06 T3 A17.8 + 01-07 back-patch | 04-06 | 5 | UI-SPEC harness invariant + docs hygiene | T-04-06-01 | A17.8 raw-source grep | UAT + docs | `HEADLESS=1 SKIP_LONG_UAT=1 npm run test:uat` 35/35 + grep verify | ✗ EXISTS (modify) | ⬜ pending |
|
||||
| 04-06 T4 Operator empirical | 04-06 | 5 | UI-SPEC AC #6 aesthetic judgment | T-04-06-01 | dark-mode visual contrast | manual | operator returns "approved" or describes issue | n/a | ⬜ pending |
|
||||
| 04-07 T1 04-VERIFICATION.md | 04-07 | 6 | Phase 4 closure aggregator | T-04-07-01 | scorecard + override notes + deferred items | docs aggregator | `test -f .planning/phases/04-harden-clean-up-optional/04-VERIFICATION.md && grep -cE '^## '` >= 5 | ❌ NEW | ⬜ pending |
|
||||
| 04-06 T4 Operator empirical (REVISION iter-2 BLOCKER 1 — canonical SW chunk glob) | 04-06 | 5 | UI-SPEC AC #6 aesthetic judgment | T-04-06-01/04 | dark-mode visual contrast; canonical `dist/assets/index.ts-*.js` glob (NOT non-matching `index*-bg.js`) | manual + pre-checkpoint bundle gates | `npm run build && ls dist/assets/index.ts-*.js \| wc -l; grep -cE 'new Function\(\|eval\(' dist/assets/index.ts-*.js; HEADLESS=1 SKIP_PROD_REBUILD=1 SKIP_LONG_UAT=1 npm run test:uat 2>&1 \| tail -3` -> glob match >= 1 + 0 hits + UAT 35/35 + operator returns "approved" | n/a (verification + operator) | ⬜ pending |
|
||||
| 04-07 T1 04-VERIFICATION.md (REVISION iter-2 WARNING 4 — ack-grep gate) | 04-07 | 6 | Phase 4 closure aggregator + verbatim operator ack | T-04-07-01/04 | scorecard + override notes + deferred items + verbatim operator ack from Plan 04-06 | docs aggregator | `test -f .planning/phases/04-harden-clean-up-optional/04-VERIFICATION.md && grep -cE '^## ' .planning/phases/04-harden-clean-up-optional/04-VERIFICATION.md; grep -c 'Plan 04-0' .planning/phases/04-harden-clean-up-optional/04-VERIFICATION.md; grep -cE 'approved\|All good\|APPROVED\|approved by\|operator ack\|all good' .planning/phases/04-harden-clean-up-optional/04-VERIFICATION.md` -> sections >= 5 + Plan-04 citations >= 6 + ack-literal >= 1 | ❌ NEW | ⬜ pending |
|
||||
| 04-07 T2 Marker flips | 04-07 | 6 | D-P4-05 + ROADMAP/STATE flips | T-04-07-02/03 | Phase 4 [x] + completed_phases: 4 | docs | `grep -c '\[x\] \*\*Phase 4' .planning/ROADMAP.md` >= 1 | ✗ EXISTS (modify) | ⬜ pending |
|
||||
|
||||
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
|
||||
|
||||
**Planner instructions:** Populate one row per task. Per RESEARCH finding 5 (6 new Wave-0 test files anticipated), expect ~6 unit-test rows + ~4 harness-A33+ rows + ~4 bundle-gate rows + ~3 docs rows. Format per Phase 3 03-VALIDATION precedent.
|
||||
|
||||
**REVISION iter-2 notes (2026-05-21):**
|
||||
- **04-02 T2 (WARNING 1):** `<automated>` now includes `HEADLESS=1 SKIP_PROD_REBUILD=0 npm run test:uat` + `grep -c 'UAT harness: 33/33 assertions passed'` to empirically verify JSZip fallback works at the SAVE→zip layer post-polyfill-removal.
|
||||
- **04-04 T1 + T2 (BLOCKER 2):** Option B applied — SAVE_ARCHIVE dispatched via `chrome.runtime.sendMessage({type: 'SAVE_ARCHIVE'}, ...)` directly from the harness page realm (matches established A5/A11/A12/A13/A26/A28/A29/A30/A31 precedent). The non-existent `window.__mokoshHarness.dispatchSaveArchive` is NOT introduced; gates verify `grep -c 'dispatchSaveArchive'` returns 0 across all harness files + spike script.
|
||||
- **04-06 T4 (BLOCKER 1):** Canonical SW chunk glob `dist/assets/index.ts-*.js` used for all bundle gates (Gates 2/3/4) — replaces the misquoted `dist/assets/index*-bg.js` which matched no files (silent 0-grep = spurious PASS). New glob-existence pre-gate `ls dist/assets/index.ts-*.js | wc -l >= 1` validates the glob matches BEFORE running grep gates.
|
||||
- **04-07 T1 (WARNING 4):** Ack-literal grep added — `grep -cE 'approved|All good|APPROVED|approved by|operator ack|all good' 04-VERIFICATION.md >= 1` ensures `human_verification[0].evidence` contains a real operator ack (not a placeholder).
|
||||
|
||||
---
|
||||
|
||||
## Wave 0 Requirements
|
||||
@@ -107,5 +115,6 @@ Existing infrastructure already in place (inherited from Phases 1-3):
|
||||
- [ ] No watch-mode flags — verify in planner output (focused commands use `--run`)
|
||||
- [ ] Feedback latency < ~2.5 min default (5-min idle test on dedicated lane) — confirmed by RESEARCH
|
||||
- [ ] `nyquist_compliant: true` set in frontmatter — pending sign-off after planner completes
|
||||
- [ ] REVISION iter-2 gates applied to 4 revised tasks (04-02 T2, 04-04 T1, 04-04 T2, 04-06 T4, 04-07 T1)
|
||||
|
||||
**Approval:** pending (planner fills per-task map; checker validates)
|
||||
|
||||
Reference in New Issue
Block a user