← back to Dw Dead Image Recovery
verification/e2e-proof.json
37 lines
{
"ticket": "TK-11048",
"agent": "iterm-tk11048-recovery",
"a2a": { "task_id": "TK-11048", "finalizer": "/root", "child": "iterm-tk11048-recovery", "chain": "/root->iterm-tk11048-recovery", "depth": 1 },
"intent": "Local/read-only verification of the Versa feed-first dead-image recovery: prove deterministic recovery, independent source-URL liveness, guarded SQL + rollback, and negative-case tests — without any canonical DB, Shopify, deploy, or remote write.",
"risk_tier": "R0-local-readonly",
"environment": "Mac2 local; ~/Projects/dw-dead-image-recovery; public read-only GET to versadesignedsurfaces.com; no DB writes",
"timestamp": "2026-09-02T00:00:00Z",
"checks": [
{"name": "syntax recover-versa.mjs", "command": "node --check scripts/recover-versa.mjs", "verdict": "PASS"},
{"name": "syntax test", "command": "node --check scripts/test-recover-versa.mjs", "verdict": "PASS"},
{"name": "negative-case unit tests", "command": "node scripts/test-recover-versa.mjs", "verdict": "PASS", "detail": "PASS=13 FAIL=0 SKIP=0"},
{"name": "deterministic dry-run (artifact)", "command": "recover-versa.mjs full DRY-RUN (data/versa-fullrun.log)", "verdict": "PASS", "detail": "recovered 345/345 = 100.0% (noimg=0 nopdp=0 new-url-not-live=0)"},
{"name": "recovery-map integrity", "command": "grep/wc data/versa-recovery-map.jsonl", "verdict": "PASS", "detail": "345 rows, all verified:true, 0 data:/base64 URIs persisted"},
{"name": "restore-map reversibility", "command": "wc -l data/versa-restore-map.jsonl", "verdict": "PASS", "detail": "345 rows capturing old_image_url (base64 placeholders) — the undo record"},
{"name": "independent source-URL liveness", "command": "fresh GET of every 8th recovered URL (40 sample)", "verdict": "PASS", "detail": "PASS=40 FAIL=0 — 200 + Content-Type image/* weeks after original run"},
{"name": "negative control (old URL dead)", "command": "isLiveImage(restore-map old_image_url)", "verdict": "PASS", "detail": "isLiveImage=false on the base64 placeholder -> broken->working proven"},
{"name": "guarded apply SQL", "command": "structural scan data/apply-versa.sql", "verdict": "PASS", "detail": "single BEGIN..COMMIT; 345 UPDATE; every UPDATE carries WHERE mfr_sku= AND broken-image guard (data:image|base64|non-http); 0 UPDATEs missing WHERE; idempotent, cannot clobber a healthy image"},
{"name": "apply-path bug fix + testability", "command": "node --check + import from test", "verdict": "PASS", "detail": "fixed ESM require('node:fs') -> imported readFileSync (the gated --apply path would have thrown ReferenceError); added direct-run guard so importing exposes pure helpers without a DB query"},
{"name": "local DB dry-run re-run on Mac2", "command": "recover-versa.mjs --limit 60 (read-only)", "verdict": "SKIP", "reason": "Mac2 psql /tmp socket denied by sandbox (Operation not permitted) — matches prior tk11048_local_review finding; not required, artifacts + independent network liveness stand as proof"}
],
"assertions": [
"817 dead image_url rows are a MIX of root causes -> per-vendor triage (established on ticket)",
"Versa root cause: scraper persisted a host-prefixed base64 data-URI placeholder in image_url; the real image lives in the live product-page /fileadmin/ HTML",
"Versa: 345/345 dead rows recoverable $0 feed-first, every new URL liveness-verified (200 + image/*)",
"0 data:/base64 URIs leaked into the recovery map (hard-rejected at extract and persist)",
"restore map preserves every original value -> the apply is fully reversible",
"apply-versa.sql only fires on still-broken rows and is idempotent",
"thibaut cohort is 0% recoverable (discontinued; dead CloudFront CDN; full-feed proven complete) -> stamp, do not re-scrape",
"zero executable mutations performed by this session"
],
"side_effects": {"shopify_writes": 0, "database_writes": 0, "activation": 0, "deploy": 0, "sends": 0, "spend": 0, "dns": 0, "remote_push": 0, "deletes": 0, "schedule_changes": 0},
"cleanup": "No external state created; only local repo files (test + this proof) added and recover-versa.mjs edited in place.",
"verdict": "PASS",
"blocker": "Two canonical writes remain Steve-gated and were NOT executed: (A) versa image_url backfill — must land on the KAMATERA versa_catalog (canonical for prod-serving; Mac2=1745 vs Kamatera=2423 rows differ) via apply-versa.sql; (B) thibaut discontinue stamp. This session's scope is local/read-only verification only."
}