Scope — clean-room rebuild of both reference sites + a ranked gap report¶
Status: WCP EXECUTED 2026-07-13 pt4 (rebuilt from inception, deployed, scored —
worker 51891396). garvanbay NOT rebuilt; the live-asset harvest (§5) NOT run. See the
pt4 handover for results and the ranked gaps. Preconditions all landed pt3/pt4.
Correction (2026-07-13 pt4): the Risks section's claim that "the rebuild MUST re-use [the authoritative basename→R2-URL] map" is FALSE. The map was never needed. The R2 key is
sha256(bytes)-derived, so it is reproducible from the bytes — and a clean-room rebuild re-crawls the bytes.transform-seed-images.mjshashed them, derived the same keys, HEAD-probed R2 and reportedidempotent: 299— i.e. it recomputed 299 existing keys exactly, uploaded only what was genuinely new, and lost no image.Why the original was drawn: known-patterns is right that "the R2 key is a lossy hash you can't recompute" — from a basename. The 2026-07-08 session was resolving a regenerated seed without re-running the migration, so a basename was all it had. That premise does not hold for a rebuild. The map is the safety net (for a ref whose local file the crawl never fetched and whose wixstatic source is dead) and an audit instrument — not the path. It was graduated to a committed per-site helper (
apps/cms/scripts/r2-basename-map.mjs) anyway, since known-patterns asked for it; it did no work in the rebuild.Building it also reproduced this repo's signature failure once more: keyed by domain (
garvanbay.ie/) it returned a confident zero objects, because the R2 prefix is the site (garvanbay/). An empty enumeration reads as success. Corrected: garvanbay 31 objects, WCP 144, 100% carryingx-amz-meta-original-name. Related: ADR-0009 (measured near-match — the fidelity bar this measures against), ADR-0010 (Wix API content/media plane), ADR-0008 (per-site fleet), ADR-0005 (image pipeline).
Why¶
Neither reference site is a clean product of the current pipeline. WCP and garvanbay are each ~20 sessions of hand-patches, surgical D1 stamps, grafts and partial regens layered onto seeds built by older code. Three consequences, all of which bit this session:
- We cannot answer "what does the pipeline produce today?" — so capability gaps get ranked from anecdote ("the video, the icons, the overlays… and many more") rather than from measurement.
- The scorecard measures a hybrid of pipeline output + accumulated hand-fixes, so its verdicts (garvanbay SHIP 92.2, WCP MANUAL-POLISH 79.0) do not describe the pipeline.
- Hand-written values masquerade as ground truth. A
.tmp/*.sqlpatch put a WhatsApp button in WCP's CTA slot and a phantom social rail on the deployed site; the wiki then recorded those as "live (faithful)" and a whole slice was scoped against the inverted premise. See known-patterns "A hand-written D1 patch is a FABRICATION with a production address".
A clean rebuild answers (1), fixes (2), and makes (3) structurally impossible.
The deliverable is the gap report. The rebuilt sites are how we get it.
Decisions taken (Cathal, 2026-07-13)¶
- Rebuild first, instrumented — not "fix the known gaps then rebuild". We stop ranking anecdotes.
- Assets: reconcile + report only — do NOT bulk-migrate the 45 WCP videos. Without segmentation (which video sits in which section) they would not render; that is motion without progress.
Preconditions — DONE (2026-07-13 pt3, commit 555968d)¶
- garvanbay is on the Wix API.
wix_site_id: a8055256-…committed toapps/cms/sites/garvanbay.jsonc, verified against the API (41 files, 0 videos) — not taken on trust. - The media-pool instrument is fixed.
searchFilesreturns 0 for garvanbay (absent from Wix's media search index) — it would have certified the site as having zero asset debt. The pool is nowmediaPool(), the union of search ∪ root ∪ every folder, warning loudly when the two enumerations disagree. This was the instrument the whole report depends on. See ADR-0010's second amendment.
In scope¶
- Safety. Dump both live D1s (
ec_pages+ec_globals) to timestamped files; take Time Travel bookmarks. They hold the only copy of anything operator-authored (WCP's nativeblock), and we are about to clear them. - Baked-seed identity assertion.
emit-seed.mjsperSITE, plus a build-time assertion that.emdash/seed.json#meta.name === SITEwhich refuses to build otherwise. Precondition: we are redeploying both workers, and today the WCP worker carries garvanbay's identity (see known-issues). - Full rebuild from inception, both sites — fresh crawl → capture → theme →
seed-from-build→ image migration. Nothing hand-written survives. - Clear + reseed both live D1s; redeploy both workers. Both sites become pure products of the current pipeline.
- Live-asset harvest (the new instrument). Playwright over the live pages,
harvesting every media id referenced in the rendered DOM (the videos are
JS-mounted, so the static crawl cannot see them — that is the whole bug). Join against
the Wix pool to split
at-source-never-pulledinto: - "used on live, our scrape missed it" → real capture debt (the 45 videos)
- "unused library cruft" → expected (old uploads, alternates)
This is the separation known-issues has been asking for since the 298 number appeared. 6. One ranked gap report per site — sections dropped, assets missed, props withheld, scorecard before/after.
Out of scope (these become the ranked backlog)¶
Fixing anything the report finds: the 45 videos, the fcr.usp-bar icons (icon: ""),
the "Why choose us / VAT Registered" overlays, hero text layout, the floating-CTA
orientation. Also out: the per-site static lane, the Wix API text plane (ADR-0010
slice D), gate calibration (Slice 6).
Done criteria¶
- (a) Both workers serve a seed with zero hand-patches; the
.tmp/*.sqllineage is gone. - (b) WCP's admin says WCP, and the build refuses to bake the wrong site's identity.
- (c) garvanbay's asset reconciliation runs (it now can).
- (d)
at-source-never-pulledis split into two counted buckets, per site. - (e) A ranked gap report per site, with scorecard verdicts before/after.
- (f) Both sites HTTP 200 — and any regression against today's baseline is reported, not hidden.
Risks (named up front)¶
- garvanbay is SHIP (92.2) today and a clean rebuild may regress it. known-patterns is explicit: "Re-seeding a rebuilt CMS seed needs the AUTHORITATIVE basename→R2-URL map from object metadata — a fresh matcher rebuild loses image resolution, and the R2 key is a lossy hash you can't recompute." The rebuild must re-use that map. If garvanbay still comes back worse, that is a finding, not a failure — but the D1 dump is the restore path.
- Brand nondeterminism on re-crawl. A fresh crawl can flip WCP's brand
(
source: logo→surface, confidence high → medium) and silently regress the palette (known-issues). Diff the derived theme, not just_raw, and stop if it moves. originalNameOfreturns a folder name (Misc) for 19 of WCP's 46 videos — a hard precondition of any video migration (which is out of scope here, but the report must not launder the bad names).
Baseline to measure against (as of 2026-07-13 pt3)¶
| garvanbay | WCP | |
|---|---|---|
| scorecard | S 88.9 / T 100 / G_det 90.8 → 92.2 SHIP | S 70.8 / T 100 / G_det 74.3 → 79.0 MANUAL-POLISH |
| Wix pool | 41 files, 0 videos | 393 files, 46 videos (1 migrated) |
| loud-fail placeholders | 0 | 0 |