Session handover — 2026-07-08¶
Continues from session-2026-07-07-pt5-handover.md (scorecard Step 3 gate). This
session did the G_det outlier triage (the pt5 cheap prerequisite) and, on the
finding, fixed the alignment root cause so G_det is gate-ready — the option-1
path the user picked. Two slices, both closed; one code+validate commit + this wiki
commit.
Slice 1 — G_det outlier triage (offline, no re-crawl)¶
Cropped the flagged low-sim sections from the on-disk live/ours shots and
eyeballed paired crops. Result was mixed, not one thing:
- WCP commercial-painting FAQ (25%) — GENUINE. Ours renders the FAQ on a navy background where live is white (a real wrong-tone defect, same class as WCP's logged tone gaps). G_det doing its job.
- garvanbay hero (33%) + WCP content #1 (37.8%) — ALIGNMENT ARTIFACTS, not the
crop (control PAYROLL scored 93). Traced to
structural-diff.js#alignPage.
Determination: G_det penalises real divergence but is more sensitive to alignPage
mis-pairings than S is (S compares quantized tokens that can coincidentally agree;
G compares pixels that won't), and the artifacts land on high-weight roles. Written
up in near-match-scorecard-contract.md "Follow-ups". Reusable triage script:
scratchpad gdet-triage.js.
Slice 2 — the alignment fix + validate (where to look)¶
- Code:
lib/structural-diff.js#canonicalise— two changes: (1) abothEmptyDupcollapse form (adjacent, same tone/style, identical normalisedtextHead, both headings empty) — Wix doubles image-heroes/brand-ribbons with empty headings, which the heading-keyed detector missed, letting a leftover twin get NW-force-matched to an unrelated ours section (WCP hero-dup ↔ logo-strip); (2) anchor/visual-rect decoupling — a collapsed unit keeps its heading anchor (heading-bearing member, for S's NW cost) but itsrectfrom the earlier member (for G's crop), sorole=herocrops the hero band, not the welcome band (garvanbay). The aligner's GAP/subCost model was deliberately not touched — the pre-pass collapse is what removes the force-match.isJunk/roleOfexported for the validate. - New:
lib/structural-diff.validate.mjs— 42 checks lockingcanonicalise(all three dup forms + rect decoupling + non-mutation),align,scoreMatch,isJunk,roleOf. First validate for this file (theme-fidelity still lacks one). - known-patterns: new entry — a section-alignment collapse serves TWO axes with different needs (anchor for S, visual rect for G); Wix's both-empty dup form is easy to miss.
- known-issues + contract + ADR-0009 Slice 4 row: triage marked DONE + FIXED; G_det now gate-ready on artifact grounds.
Verified¶
node lib/structural-diff.validate.mjs— 42/42;scorecard-gate.validate.mjs— 19/19 (regression: export change didn't disturb it).- Re-scored both anchors offline (no re-crawl): garvanbay hero G 33.4→63.6, S
unchanged 96, composite 93.2→94.7, still SHIP; WCP spurious match gone
(logo-strip now a clean
insertOurs), twins single-penalised, S 59.9→60.9, composite 72.7→73.7, still MANUAL-POLISH; WCP FAQ stays 24.9 (genuine, preserved). - Regression check (shared S+G surface): S moves only where intended (garvanbay inert, WCP improved); G artifacts gone, genuine outliers kept; verdicts stable.
Next priority — Slice 4 (GenericSection + matcher-gap into S)¶
Unchanged from pt5, now with a cleaner alignment layer under it: measured
GenericSection fallback + genericFallbackRate/matcherGap folded into S,
making the scorecard the gate. The G_det prerequisite is cleared. Then Slice 6
(calibrate calibration.json on a 30–50-site batch — the seed thresholds are still
hand-set; verdicts rank/queue but don't trust τ_ship for unsupervised shipping yet).
Carried / open (see known-issues)¶
New residual from this session: the hero/welcome collapse still hides a genuine
intra-pair drop from BOTH S and G (garvanbay renders no welcome intro+images band; S
counts it 1↔1 matched) — a distinct S improvement, not chased here. theme-fidelity.js
still lacks a .validate.mjs. Plus all prior carried items: seed thresholds
uncalibrated (Slice 6); scorecard Steps 4–5 pending; T re-measures emission not the
deployed DOM; imageSide over-fires on media heroes; deployed-site fidelity gaps the
scorecard surfaced (garvanbay muted bands, WCP columns/align/FAQ-tone) unfixed;
per-site static lane consumes no capture; cross-account sharding; brand-detection
nondeterminism; noindex launch blocker.