fix(udg): one fit mapping, emitted — and a review artifact that self-checks #153
No reviewers
Labels
No labels
build-dist
priority
P1
priority
P2
priority
P3
priority
P4
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Toilville/toilville-design!153
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/udg-press-recipe-integrity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three defects in the press tier I shipped in #148 / #149 and had not noticed. All three are the same failure mode: something that looks right and is not.
Scope
1 · The review artifact ignored
fit.scratchpad/build_press_review.pyhardcodedmask-size:100% 100%and never forwarded--pN-size, so every pull rendered asfit: stretchwhatever its token said — in the very artifact ville reviews, which #148 described as "rendered from the real tokens, no mockups". It did not bite only because the one non-frame pull happens to bestretch.Fixed at the root, not the symptom: the
fit→ mask-size/repeat mapping was being re-derived independently by each of three consumers. It now lives inextract.pyand is emitted as--press-*-N-mask-size/-mask-repeat. A consumer can only read it;artifact.py's local_FIT_MASKis gone.The three CSS recipes stay three. The design board, the review page and the doc's copy-paste block serve different audiences (board chrome, review chrome, teaching with full var names) and a shared constant would wreck the third. Consolidating the mapping was the fix; consolidating the CSS was a trap.
2 ·
native.pydropped the slice fields._press_rowsstopped atfit, so a Flutter/SwiftUI consumer receivedfit: 'slice'with none of the slice geometry — an unrenderable pull. Both emitters now carry every key the row holds (Dart formats by type; Swift gains optionals), resolved from the plate inassets.yml, where that geometry is declared: "the corner size belongs to the drawing, not to each press".3 · No test read any recipe. Which is precisely why they drifted.
Testing
just checkgreen · 231 tests · design board probed directly.mask-size, and the second was line-based — so a line carrying both a var-driven and a hardcoded declaration was excluded wholesale, and it passed while the bug was still present. It now examines each declaration.The review artifact now self-checks
A short script walks every rendered pull box and prints its size and mask state into the page, flagging any box that lost its mask or collapsed to zero.
Every press bug in this whole effort was invisible — a dropped mask floods the panel with solid pigment and
just checkstays green through it. This turns that class of failure into text in the committed still.It found a failure on its first run: the substrate-only degradation panel, which has no mask by design. Now marked
data-nomaskand reported as "ok (no mask by design)" rather than flagged — the distinction between lost its mask and never had one is exactly what the check needs to know.Impact Statement
Behaviour-preserving for the shipped presses. The two spelwork presses render identically;
skin.cssgains two vars per pull.dist/churn is spelwork plus the review artifact. Versions bumped inmeta.ymlandsync-manifest.yml.One real behaviour change: a
fit: tile,containorcoverpull now renders correctly in the review artifact instead of being flattened tostretch. Nothing in the repo authors one today, so nothing visibly moves — the fix is for the next press, and for the trust the artifact is supposed to carry.Native consumers gain fields, lose none.
udgPressMapis emitted for no consumer today (spelwork has the press; rituals has the consumers), so no shippeddist/bytes change for Rituals.Reversibility: high. The mapping move is the only structural change and it is one constant plus three read sites.
Not addressed here:
scratchpad/press-review.htmlis committed but not gated byjust check, so it can still drift fromdist/. Worth deciding separately — either gate it or state in the script that it is a point-in-time artifact.