2.4 KiB
2.4 KiB
The r3 seam pass: what only it could see
2026-09-24. Contract docs/contracts/r3_compare.contract.md (design-dev);
althing thread 01M3952NCDRRJX5XDFSPMSP5HJ.
design-dev's heid contract panel read r3 cold. Our seam pass read it against
the real app.py, items.py, base.html and view.html, plus small probes
on a scratch booth. It found 12 mismatches, all folded before a line of code.
The build then went through heid code-review and bug-hunt, and our own gate,
with nothing structural left. design-dev: "S4 and S8 would each have cost a
round."
The ones worth remembering, because they recur
data-regionids must be unique on a page. The in-place client'sswap()inbase.htmlkeeps only the FIRST fresh node for each id, then replaces EVERY live node that has that id with a copy of it. Two per-side regions sharing an id would make B's flag button a copy of A's after any save, so pressing B flags A, with nothing to show it happened. Also: do not key a region by rel (a pair witha == bduplicates it) and do not prefix ititem-(swap reads a missingitem-*as a stale tile, not a reload). This is a mechanical rule that belongs in CLAUDE.md; it is not there yet.- Moving code breaks mutation anchors. 21 of r2c's 24
view.htmlrows were anchored inside the inline script that r3 moved to_stage_js.html, andmutation_check.pyfails a row whose anchor is gone. A contract that moves code must list the re-pointed rows in its "Assertions that change" table, and gate on the table still falsifying, not only on the suite staying green. - "404 the way view does" was two rules, and neither was view's. A
missing
fis a 422 from FastAPI (requiredstr), not a 404; declare= ""and 404 by hand.booth_itemsfollows symlinks, so a link pointing outside the booth is INreview_chain, while view 404s it through resolve plus containment. Compare needed the conjunction. - Route order.
/b/{name}/{filepath:path}is a catch-all; a new/b/{name}/<word>route must register before it. A booth file literally named<word>becomes unreachable (accepted, as for view/marks/asks/embed.json). - A resolve done twice is a race. After the merge, the review route checked
fand then resolved the whole ring again, socring.index(f)could raise (a 500) when a file vanished in between. design-dev'sd54bb04judges each rel once per request.