Skip to content

Declare the comparison rail's caption archetype - #504

Merged
max-sixty merged 2 commits into
mainfrom
fix/shot-caption-archetype
Sep 9, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fix/shot-caption-archetype

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

test_the_composed_corpus_declares_every_control_row_archetype is red on main: the corpus sweep finds four controls with neighbours and no archetype covering them — the Before and After captions on the two lf-shot comparisons, 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: coverage classifies 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 reserves example for a mechanism no synthetic page can compose, and a comparison is not one: the page composes an lf-shot and the archetype's own serve call lays in the two frames through media=, the same way test_a_shot_shows_one_frame_and_flips_between_them drives the rail. Anchoring it to #bg-shot in 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 d5902aa3 in a worktree, with the same four rows, before writing the fix. With the archetype declared:

uv run pytest tests/test_render_controls.py -q -n0 --run-nightly -k archetype
12 passed, 79 deselected in 362.93s

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 with span.lf-shotcap.lf-ui "before" moved by [0, 0, 70, 0], so the neighbour the case holds is the one the comment names.

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 leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/test_render_controls.py Resolved
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.
@max-sixty
max-sixty merged commit 291c590 into main Sep 9, 2026
7 checks passed
@max-sixty
max-sixty deleted the fix/shot-caption-archetype branch September 9, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants