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:
2026-05-21 10:00:07 +02:00
parent 526ac78046
commit 76fffb35b9
5 changed files with 137 additions and 54 deletions

View File

@@ -35,7 +35,7 @@ must_haves:
- "All P1 polish items (#11 + #14 + #15) cited as GREEN with Plan 04-01 evidence"
- "All Phase 4 hardening items (setimmediate + dead-code + generate-icons + A29 race fix + cursor verification + dark-logo + ROADMAP backfill) cited as GREEN with their plan + commit refs"
- "Pre-checkpoint bundle gates 6/6 PASS evidence (per saved memory feedback-pre-checkpoint-bundle-gates.md)"
- "Operator empirical ack from Plan 04-06 cited verbatim with date stamp"
- "Operator empirical ack from Plan 04-06 cited verbatim with date stamp (REVISION iter-2 WARNING 4 — Task 1 verify greps the ack literal from 04-VERIFICATION.md to confirm it's a REAL ack, not a placeholder)"
- "Deferred Items table carries forward the v1.1/v2 items: rrweb v2 upgrade + programmatic SW-RAM measurement + REQ-password-confidentiality v2 candidate"
- "ROADMAP.md Phase 4 row flipped [x] with closure date; harness count updated from 33 to 35 (Plans 04-04 + 04-05 added A33 + A34)"
- "ROADMAP.md Plans 01-08..01-13 rows verified per D-P4-05 backfill (per plan-checker flag #4)"
@@ -133,6 +133,9 @@ Per CONTEXT §"Deferred Ideas" — v1.1/v2 items to carry forward in 04-VERIFICA
- REQ-password-confidentiality v2 candidate (D-P3-02; only if charter reverses)
- Alpha-tester findings integration (D-P4-04; routed via separate maintenance window)
Operator empirical ack format (REVISION iter-2 — WARNING 4 mitigation):
Plan 04-06 Task 4's `<resume-signal>` is canonically: `Type "approved" or describe issues (e.g., "stroke too thin", ...)`. The Phase 4 prior-art ack pattern from Plan 01-10 cycle-2 was `"All good" 2026-05-20`. The 04-VERIFICATION.md `human_verification[0].evidence` field MUST contain the verbatim operator ack from the 04-06 Task 4 SUMMARY — matching ONE of: `approved`, `All good`, `APPROVED`, `approved by`, `operator ack`, `all good`. The Task 1 `<verify><automated>` greps the file for these patterns to ensure the field is a REAL ack, not a placeholder string like "TBD" or "TODO" or "<verbatim>".
Frontmatter sketch for 04-VERIFICATION.md:
```yaml
# (yaml document marker omitted for parser-compat)
@@ -166,7 +169,7 @@ human_verification:
- test: "dark-mode operator visual aesthetic on welcome hero"
expected: "mark legible on OS dark-mode rendering surface"
why_human: "Aesthetic contrast judgment — UI-SPEC §'Manual-Only Verifications' acceptance criterion #6; canonical operator-empirical case per feedback-trust-harness-over-manual-uat.md"
evidence: "Plan 04-06 Task 4 operator ack <verbatim>"
evidence: "Plan 04-06 Task 4 operator ack <VERBATIM_ACK_FROM_PLAN_04_06_SUMMARY>"
deferred:
- truth: "rrweb 2.0.0-alpha.4 -> stable v2 upgrade"
addressed_in: "v1.1 / v2 maintenance milestone"
@@ -182,6 +185,7 @@ deferred:
evidence: "D-P4-04 charter — operator handles alpha signal out-of-band"
# (yaml document marker omitted for parser-compat)
```
The placeholder `<VERBATIM_ACK_FROM_PLAN_04_06_SUMMARY>` MUST be replaced with the actual operator response captured in 04-06-SUMMARY.md (e.g., "approved 2026-05-21" or "All good 2026-05-21" or longer verbatim quote). The Task 1 verify-gate greps for the ack literal to ensure the placeholder is NOT left intact.
</interfaces>
</context>
@@ -190,16 +194,16 @@ deferred:
<task type="auto">
<name>Task 1: Write 04-VERIFICATION.md aggregator (NEW)</name>
<files>.planning/phases/04-harden-clean-up-optional/04-VERIFICATION.md</files>
<read_first>.planning/phases/01-stabilize-video-pipeline/01-VERIFICATION.md, .planning/phases/02-stabilize-export-pipeline/02-VERIFICATION.md, .planning/phases/03-spec-10-smoke-verification-dom-event-log-verification/03-VERIFICATION.md, all Plan 04-01..04-06 SUMMARY files (.planning/phases/04-harden-clean-up-optional/04-0?-SUMMARY.md — produced by the prior plans)</read_first>
<read_first>.planning/phases/01-stabilize-video-pipeline/01-VERIFICATION.md, .planning/phases/02-stabilize-export-pipeline/02-VERIFICATION.md, .planning/phases/03-spec-10-smoke-verification-dom-event-log-verification/03-VERIFICATION.md, all Plan 04-01..04-06 SUMMARY files (.planning/phases/04-harden-clean-up-optional/04-0?-SUMMARY.md — produced by the prior plans), specifically Plan 04-06 SUMMARY for the verbatim operator ack quote (REVISION iter-2 WARNING 4 — required for human_verification[0].evidence)</read_first>
<action>
1. Read the 3 precedent VERIFICATION.md files (Phase 1 + 2 + 3) ONCE each to extract the canonical frontmatter shape + body section structure. Read each Plan 04-01..04-06 SUMMARY.md once to extract evidence (commit refs, test counts, harness assertion numbers, pre/post measurements).
1. Read the 3 precedent VERIFICATION.md files (Phase 1 + 2 + 3) ONCE each to extract the canonical frontmatter shape + body section structure. Read each Plan 04-01..04-06 SUMMARY.md once to extract evidence (commit refs, test counts, harness assertion numbers, pre/post measurements). **Specifically extract the verbatim operator ack quote from Plan 04-06 Task 4 SUMMARY** — Task 1 verify-gate requires the ack literal to be present in human_verification[0].evidence.
2. Create `.planning/phases/04-harden-clean-up-optional/04-VERIFICATION.md` with frontmatter per the sketch in `<interfaces>` above. Replace placeholder fields with actual values from the Plan 04-01..04-06 SUMMARYs:
- `verified:` — current ISO timestamp (`date -u +%Y-%m-%dT%H:%M:%SZ`)
- `score:` — fill in actual counts from SUMMARYs
- `re_verification.gaps_closed[*]` — bullet per closed gap with Plan + commit citation
- `override_notes` — populate if any T5 override applied to a Phase 4 criterion (e.g., the operator-empirical UAT for dark-logo can be cited as harness-coverage-augmented rather than override; depends on Plan 04-06 outcome).
- `human_verification[0].evidence` — verbatim operator ack quote from Plan 04-06 Task 4 SUMMARY.
- `human_verification[0].evidence` — verbatim operator ack quote from Plan 04-06 Task 4 SUMMARY (REVISION iter-2 WARNING 4 — MUST contain one of: `approved`, `All good`, `APPROVED`, `approved by`, `operator ack`, `all good` — verified by Task 1 verify-gate grep).
- `deferred[]` — 4 v1.1/v2 items per CONTEXT Deferred Ideas + the alpha-distribution item per D-P4-04.
3. Body sections (after frontmatter):
@@ -208,16 +212,16 @@ deferred:
- vitest count: 171 (Phase 3 baseline) -> 171 + new Wave 0 tests from Plans 04-01 + 04-02 + 04-06 = approximately 171 + 8 + 2 + 4 = 185 GREEN (verify exact count via final `npm test -- --run` invocation).
- UAT harness count: 33 -> 35 GREEN (Plans 04-04 A33 + 04-05 A34 added; Plan 04-03 rewrote A29 in-place, count unchanged).
- Tier-1 FORBIDDEN_HOOK_STRINGS: 12 unchanged (Phase 4 introduced no new __MOKOSH_UAT__-gated symbols per CONTEXT Claude's Discretion).
- Pre-checkpoint bundle gates: 6/6 PASS (Plan 04-02 flipped Gate 2 polarity 1 -> 0 hits `new Function`).
- Pre-checkpoint bundle gates: 6/6 PASS (Plan 04-02 flipped Gate 2 polarity 1 -> 0 hits `new Function` in canonical `dist/assets/index.ts-*.js` glob — REVISION iter-2 BLOCKER 1 mitigation in Plan 04-06).
- `## Operator-Empirical Acks (verbatim + commit refs)`:
- Append the Plan 04-06 Task 4 ack from the SUMMARY (verbatim quote + date + commit hash).
- Append the Plan 04-06 Task 4 ack from the SUMMARY (verbatim quote + date + commit hash). REVISION iter-2 WARNING 4: this line MUST contain the actual operator response (e.g., `> approved 2026-05-21` or `> All good 2026-05-21`) — NOT a placeholder.
- `## Deferred Items` — table mirroring frontmatter `deferred:`.
- `## ROADMAP backfill verification (D-P4-05)` — list of Plans 01-08..01-13 row presence + any newly-added rows. If all rows are already present (per PATTERNS.md noting lines 90-95 exist), this section's content is "Verified — no row additions needed; plan-checker flag #4 closed".
4. Commit: `docs(04-07): Phase 4 closure — 04-VERIFICATION.md aggregator (4/4 ROADMAP SCs + N/N hardening items)`.
</action>
<verify>
<automated>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</automated>
<automated>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</automated>
</verify>
<acceptance_criteria>
- File exists at `.planning/phases/04-harden-clean-up-optional/04-VERIFICATION.md`.
@@ -226,8 +230,9 @@ deferred:
- File >= 120 lines.
- `grep -c 'Plan 04-0' .planning/phases/04-harden-clean-up-optional/04-VERIFICATION.md` returns >= 6 (one per Plan 04-01..04-06 evidence citation).
- `grep -c 'commit' .planning/phases/04-harden-clean-up-optional/04-VERIFICATION.md` returns >= 6.
- REVISION iter-2 WARNING 4 — Operator ack gate: `grep -cE 'approved|All good|APPROVED|approved by|operator ack|all good' .planning/phases/04-harden-clean-up-optional/04-VERIFICATION.md` returns >= 1. This proves the `human_verification[0].evidence` field contains a real operator ack literal (not the `<VERBATIM_ACK_FROM_PLAN_04_06_SUMMARY>` placeholder or "TBD"). The pattern set matches both lowercase ("approved", "all good") and titlecase/uppercase ("All good", "APPROVED") variants per the prior-art ack format from Plan 01-10 cycle-2 ("All good" 2026-05-20) AND the canonical 04-06 Task 4 `<resume-signal>` expectation ("approved" verbatim).
</acceptance_criteria>
<done>04-VERIFICATION.md created with frontmatter + 5+ body sections + 6+ plan citations + deferred items. Commit: `docs(04-07): Phase 4 closure — 04-VERIFICATION.md aggregator`.</done>
<done>04-VERIFICATION.md created with frontmatter + 5+ body sections + 6+ plan citations + verbatim operator ack + deferred items. Commit: `docs(04-07): Phase 4 closure — 04-VERIFICATION.md aggregator`.</done>
</task>
<task type="auto">
@@ -309,6 +314,7 @@ deferred:
| T-04-07-01 | Repudiation | aggregator could over-claim closure (e.g., mark ROADMAP SC #2 GREEN when only fetch is empirically verified but XHR is not) | mitigate | Each scorecard row MUST cite specific UAT assertion ID (e.g., "A34.3 XHR 404 -> network_error" or "A34.5 XHR meta.status === 404") + commit hash; absence of an assertion = row marked PARTIAL or YELLOW with explanation |
| T-04-07-02 | Tampering | a docs-only commit could in theory be conflated with a code commit; the closure ceremony must be docs-pure | accept | Verification gate `git diff --stat HEAD~1 HEAD` on closure commits should show only `.planning/` files dirty; pre-commit check |
| T-04-07-03 | Repudiation | alpha redistribution decision is non-automated (per D-P4-04 user handles out-of-band); 04-VERIFICATION.md is advisory not gating | accept | Documented in scorecard + STATE.md status field clarifies v1 close vs CLOSED-PENDING-ALPHA distinction |
| T-04-07-04 | Repudiation (REVISION iter-2 — WARNING 4) | `human_verification[0].evidence` field could be left as a placeholder (e.g., `<verbatim>` or `TBD`) — the 04-VERIFICATION.md "passes" gates but contains no real operator ack, masking a missing closure step | mitigate | Task 1 `<verify><automated>` greps for the ack literal (`approved`, `All good`, `APPROVED`, `approved by`, `operator ack`, `all good`) in the file; count >= 1 required to pass the gate. The pattern set covers both the canonical Plan 04-06 `<resume-signal>` expectation ("approved" lowercase) AND the historical Plan 01-10 cycle-2 ack format ("All good" titlecase). If the operator response uses a non-canonical phrasing, the SUMMARY for 04-06 still records it verbatim; the executor extends the grep alternation to match. |
</threat_model>
<verification>
@@ -320,6 +326,7 @@ deferred:
- PROJECT.md: Validated section updated for Phase 4 hardening closure.
- No code or test changes in this plan; `git diff --stat HEAD~1 HEAD` shows only `.planning/` files modified.
- All Phase 4 plan SUMMARY files exist (Plans 04-01..04-06; this plan creates its own SUMMARY at completion).
- REVISION iter-2 WARNING 4: 04-VERIFICATION.md contains a verbatim operator ack literal (one of `approved`, `All good`, `APPROVED`, `approved by`, `operator ack`, `all good`); verified by Task 1 `<verify><automated>` grep count >= 1.
</verification>
<success_criteria>
@@ -328,7 +335,7 @@ deferred:
- Plans 01-08..01-13 ROADMAP backfill verified (D-P4-05).
- v1 milestone status updated: CLOSED-PENDING-ALPHA OR CLOSED.
- All Phase 4 success criteria from the ROADMAP cited as GREEN with evidence.
- Operator empirical ack from Plan 04-06 cited verbatim in 04-VERIFICATION.md.
- Operator empirical ack from Plan 04-06 cited verbatim in 04-VERIFICATION.md (REVISION iter-2 WARNING 4 — grep-pinned).
- Deferred items table carries forward v1.1/v2 items per CONTEXT.
- No code/test changes (docs-only ceremony).
</success_criteria>
@@ -341,7 +348,7 @@ After completion, create `.planning/phases/04-harden-clean-up-optional/04-07-SUM
- v1 milestone status flip (CLOSED-PENDING-ALPHA OR CLOSED — depending on alpha redistribution sequencing)
- Closure commit refs
- Final tally: UAT 35/35 GREEN; vitest >=185 GREEN; pre-checkpoint bundle gates 6/6 PASS; FORBIDDEN_HOOK_STRINGS at 12.
- Verbatim operator ack from Plan 04-06 Task 4 (REVISION iter-2 WARNING 4 — grep-verified at Task 1 closure).
- Next steps for the operator: alpha redistribution + v1.0 tag + release notes (separate workstream per D-P4-04).
</output>
</content>
</invoke>