From 48c70535ffc4b22885e51a21b30cc97f0ccd5ff5 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 22 May 2026 18:20:28 +0200 Subject: [PATCH] =?UTF-8?q?docs(04-06):=20re-plan-checker=20iter-2=20?= =?UTF-8?q?=E2=80=94=20PASSED=20on=20f3baa3a=20(0=20BLOCKER=20+=203=20cosm?= =?UTF-8?q?etic-advisories)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Validation of the iter-2 re-plan against commit f3baa3a. Both iter-1 BLOCKERs are correctly resolved; 3 iter-1 advisories all fixed. BLOCKER 1 (fictitious A17.8 delegation) → RESOLVED via genuine new host-side A35 driver. Every test-infrastructure claim was spot-checked against live code this session: - vite.test.config.ts:95 — welcome.html builds to dist-test/src/welcome/ - welcome.ts:194-198 — populateMark runs at DOMContentLoaded (verified) - A17 already uses chrome.runtime.getURL('src/welcome/welcome.html') — same canonical URL A35 will use via page.goto - driveA33 signature (page, browser, extensionId, downloadsDir) at line 2622-2627 — driveA35 is a sound subset - harness.test.ts:580 total = drivers.length + 1 (auto-increments) - Browser + Page imported at harness-page-driver.ts:43 - launch.ts:473-542 opens only victimPage + harnessPage - welcome-hero__mark zero hits in all current harness files - welcome.css:72 sets color: var(--mks-fg-inverse) on .welcome-hero__mark (cascade target); .welcome-hero__mark-img is bare selector (matches svg) BLOCKER 2 (phantom failing test) → RESOLVED via behavior-based gate that distinguishes flake from regression by isolation re-run (no test filename hard-coded). Verified live this session: - Full vitest run: 184/184 GREEN (flake did NOT fire this run) - strict-meta-json in isolation: 8/8 GREEN - webm-remux in isolation: 5/5 GREEN - Confirms iter-1's diagnosis: the '1 fail' is the 04-CONTEXT #9/#10 parallel-vitest/ffprobe family, not a named test. DEFECT 2 line classification (22/47/82/135/205 flip; 40/89/109/110 leave) preserved unchanged. welcome.css drop preserved. Thesis preserved (currentColor Option A + cursor verification-only + operator empirical Task 4). FORBIDDEN_HOOK_STRINGS stays at 12. Atomic-commit structure + frontmatter + gsd-sdk verify.plan-structure all GREEN. 3 NEW cosmetic-advisories (all non-blocking): - ADVISORY-2A: stale banner string at harness.test.ts:283 (does not include A33/A34 today; planner's 'append A35' instruction has a slightly stale premise; banner is cosmetic, no gate depends on it) - ADVISORY-2B: Task 3 rationale prose says SKIP_PROD_REBUILD gates dist-test rebuild; actually it gates dist/ (the A0 grep gate); the command behavior is correct, only the prose is slightly off - ADVISORY-2C: threat model could note A35 is appended LAST in drivers array (which makes the pollution-of-future-drivers concern moot; verified independently safe) VERDICT: PASSED. Proceed to /gsd:execute-phase 04-06. Co-Authored-By: Claude Opus 4.7 --- .../04-06-REPLAN-CHECKER-iter-2.md | 322 ++++++++++++++++++ 1 file changed, 322 insertions(+) create mode 100644 .planning/phases/04-harden-clean-up-optional/04-06-REPLAN-CHECKER-iter-2.md diff --git a/.planning/phases/04-harden-clean-up-optional/04-06-REPLAN-CHECKER-iter-2.md b/.planning/phases/04-harden-clean-up-optional/04-06-REPLAN-CHECKER-iter-2.md new file mode 100644 index 0000000..f7b4761 --- /dev/null +++ b/.planning/phases/04-harden-clean-up-optional/04-06-REPLAN-CHECKER-iter-2.md @@ -0,0 +1,322 @@ +# 04-06 RE-PLAN VALIDATION — iter-2 + +**Plan:** `.planning/phases/04-harden-clean-up-optional/04-06-PLAN.md` +**Commit reviewed:** `f3baa3a` (iter-2 re-plan after iter-1 BLOCKERs) +**Reviewer:** gsd-plan-checker (re-plan validation loop, iter-2) +**Prior verdict (iter-1, deb68df):** ITERATE-NEEDED — 2 BLOCKERs + 1 WARNING + 3 cosmetic-advisories +**Date:** 2026-05-22 + +--- + +## VERDICT: PASSED + +**0 BLOCKER · 0 WARNING · 3 cosmetic-advisories** + +The iter-2 re-plan correctly resolves both iter-1 BLOCKERs and all 3 iter-1 advisories. Every test-infrastructure claim the planner asserted this session was spot-checked against the live codebase and confirmed accurate. The new A35 host-side harness assertion is soundly designed against the verified driveA32/A33/A34 patterns; the vitest gate logic is behavior-based and tolerates the 04-CONTEXT #9/#10 flake family without hard-coding any test filename. Plan is ready to execute. + +--- + +## iter-1 BLOCKER 1 — fictitious A17.8 live-DOM delegation + +### iter-2 fix: NEW host-side A35 assertion (driveA35) + +**Status: RESOLVED.** + +The iter-1 BLOCKER was real: the iter-1 plan claimed live-DOM injection + currentColor cascade was "delegated to A17.8 in real Chrome," but A17.8 is 100% string-grep on `jsText` against a detached DOMParser parse of the welcome HTML — no live tab, no `populateMark()` invocation, no `.welcome-hero__mark svg` query. + +iter-2's fix is the new host-side **A35** driver. Spot-check verification of every load-bearing claim against the live code: + +| Claim | Verified | Evidence | +|-------|----------|----------| +| `welcome.html` builds to `dist-test/src/welcome/welcome.html` | YES | `vite.test.config.ts:95`: `welcome: 'src/welcome/welcome.html'` (mode test, outDir `dist-test`) | +| `welcome.html` builds to `dist/src/welcome/welcome.html` (prod) | YES | `vite.config.ts:166`: same input under prod outDir `dist/` | +| `chrome-extension:///src/welcome/welcome.html` is the canonical URL | YES | `extension-page-harness.ts:2099` already uses `chrome.runtime.getURL('src/welcome/welcome.html')` to fetch it (A17) — exactly the URL `page.goto()` will use | +| `populateMark()` runs at DOMContentLoaded | YES | `welcome.ts:194-198`: `if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); }` — `init()` calls `populateMark()` first (line 188). `page.goto(url, { waitUntil: 'domcontentloaded' })` resolves AFTER DOMContentLoaded fires, so populateMark has run synchronously by then. The optional `waitForSelector('.welcome-hero__mark svg')` adds a defensive race-free guard. | +| `driveA35(page: Page, browser: Browser, extensionId: string)` signature matches the host-side driver pattern | YES | `driveA32(page: Page)` (line 2464), `driveA33(page, browser, extensionId, downloadsDir)` (line 2622-2627), `driveA34(page, downloadsDir)` (line 2817) — all host-side, all build `CheckRecord[]` directly without `page.evaluate(window.__mokoshHarness)`. driveA35's signature is a sound subset of driveA33's (no downloadsDir needed). | +| `Browser` + `Page` types already imported in harness-page-driver.ts | YES | line 43: `import type { Browser, Page } from 'puppeteer';` | +| `launchHarnessBrowser` returns `{ browser, extensionId, harnessPage, victimPage, downloadsDir, swConsole, offConsole }` (handles.browser + handles.extensionId reachable) | YES | `launch.ts:534-542` | +| Existing harness opens only victimPage + harnessPage | YES | `launch.ts:473-474` (victimPage.goto file://), `launch.ts:478` (harnessPage = await browser.newPage()), `launch.ts:524` (harnessPage.goto chrome-extension://.../extension-page-harness.html). NO other newPage() in launch.ts. | +| `welcome-hero__mark` selector returns zero hits across all current harness files | YES | `grep 'welcome-hero__mark' tests/uat/...` returns ZERO matches across extension-page-harness.ts, harness-page-driver.ts, harness.test.ts. The pre-iter-2 claim that "live-DOM is delegated to A17.8" was indeed false. | +| `.welcome-hero__mark` wrapper sets `color: var(--mks-fg-inverse)` (cascade target) | YES | `welcome.css:72` — line 64-73 block sets `color: var(--mks-fg-inverse)` on `.welcome-hero__mark`. | +| `.welcome-hero__mark-img` is a bare class selector (matches `` and `` identically) | YES | `welcome.css:91` — bare `.welcome-hero__mark-img { width: 60%; height: 60%; display: block; }`, no `img.` qualifier. | +| `.welcome-hero__mark` wrapper exists in `welcome.html` with `data-mokosh-slot="mark"` | YES | `welcome.html:49`: `