Repository navigation
Declare the comparison rail's caption archetype - #504
Conversation
The Before/After captions became pressable controls sharing one row, and the corpus sweep had no archetype covering them, so the nightly gate went red on main with four undeclared controls.
leaf-agent
left a comment
There was a problem hiding this comment.
The archetype harness states that example is for a mechanism no synthetic page can compose — "An archetype naming an example is one no page can compose, so its proof runs where the mechanism lives." A comparison does not meet that bar: SHOT_PAGE in tests/render_cases_layout.py already composes an lf-shot from LONG_PAGE, and SHOTS/SHOT_SRC generate the two PNGs that serve(..., media=...) lays in — which is how test_a_shot_shows_one_frame_and_flips_between_them drives the same rail. So the new entry's stated reason is wrong, and the stillness proof for a mechanism the synthetic page can hold is instead anchored to #bg-shot in the shipped feature gallery, where an edit to an authored example silently retargets or breaks it.
interaction-playback earns its example — a demo is a scenario the module names. This one does not. Composing the comparison into CONTROL_STABILITY_PAGE and passing media= on the non-example branch of test_each_control_archetype_holds_its_neighbours_still keeps the case where the rest of the vocabulary is proved, and keeps example meaning what the harness says it means.
Verified separately that the declaration itself is sound: tests/test_render_controls.py::test_each_control_archetype_holds_its_neighbours_still[shot-caption] and test_the_composed_corpus_declares_every_control_row_archetype both pass on this branch (2 passed, -n0 --run-nightly), and the new coverage selector overlaps no other archetype's.
The archetype harness reserves `example` for a mechanism no synthetic page can compose. A comparison is not one, so the rail's causal case now runs on CONTROL_STABILITY_PAGE with the shot frames served through `media=`, rather than on `#bg-shot` in the shipped feature gallery.
test_the_composed_corpus_declares_every_control_row_archetypeis red on main: the corpus sweep finds four controls with neighbours and no archetype covering them — the Before and After captions on the twolf-shotcomparisons, in the Notes and Features tabs.#464 made those rail labels pressable. That turned the rail into a control row the sweep visits, and the row had no entry in
CONTROL_ARCHETYPES, which is the declaration the sweep exists to hold open. This adds it:coverageclassifies the rail's captions, and the causal case presses After and holds the caption beside it still — the transition worth proving, because both captions repaint their active state and a rule that spent width on the active word would move the other one under the reader's pointer.That case runs on
CONTROL_STABILITY_PAGE, where the rest of the vocabulary is proved. The harness reservesexamplefor a mechanism no synthetic page can compose, and a comparison is not one: the page composes anlf-shotand the archetype's ownservecall lays in the two frames throughmedia=, the same waytest_a_shot_shows_one_frame_and_flips_between_themdrives the rail. Anchoring it to#bg-shotin the shipped feature gallery instead would have let an edit to an authored example silently retarget or break it.The failure is a day old and not in the last complete-suite run: the 2026-09-08 scheduled run (
7e403108) failed on three other cases with this one green, and #464 landed at 17:21 that day.Verification
Reproduced at
d5902aa3in a worktree, with the same four rows, before writing the fix. With the archetype declared:That selection is the corpus sweep plus every archetype's stillness case, including the new one, run on this branch rebased onto
6df40353.Bug-back on the synthetic page: widening the resting caption on the press (
lf-shot:has(input:checked) .lf-shotcap[data-lf-state="before"] { padding-inline: 40px }) turns the case red withspan.lf-shotcap.lf-ui "before" moved by [0, 0, 70, 0], so the neighbour the case holds is the one the comment names.