Skip to content

Show a screenshot in the ship review's thread so the media ring is walked - #320

Merged
max-sixty merged 3 commits into
mainfrom
fix/ci-33993671859
Sep 6, 2026
Merged

max-sixty merged 3 commits into
mainfrom
fix/ci-33993671859

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Problem

The nightly ring-coverage floor has been red on main since #309 landed pasted thread images: test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus reports media (.lf-media-open:is(:focus-visible, .lf-focus-visible)) as a ring painted nowhere the corpus can be walked to. .lf-media-open is built by the runtime out of a message's Markdown or a composer's thumbnail, so no authored markup reaches it and no shipped log carried one — the rule stood in the layer with nothing above it as evidence.

Solution

The ship review's vendor question now carries a screenshot of the builds it is waiting on, which puts one .lf-media-open in the panel every ring-walk scope opens. It hangs off that existing message rather than a new one, and that placement is load-bearing: lengthening the resync thread pushes the margin card past what test_the_shipped_long_thread_opens_beside_its_source_in_the_right_margin measures, and answering the vendor thread empties the panel's "Waiting on you" narrowing that test_a_narrowing_hides_a_thread_without_taking_its_question_off_the_page presses.

serve could not lay that image in. It harvested media names from the parsed markup, where an attribute holds them; a message names its image in Markdown, which that reading cannot see, so the fixture served the page with a broken image and a 404 in the console. It now reads the seed's references too, matched on the content-addressed name so a /media/ standing in prose is not one, and lays them in whether or not the call seeds the log — seed_log=False is how a caller appends those events itself. The other publishers copy examples/media/ whole and already covered it; examples/CLAUDE.md records the second way an example names its media.

Testing

uv run pytest tests --run-nightly on this change: 2036 passed, 1 failed, 6 skipped. The one failure is test_render_widgets.py::test_an_ask_arrival_starts_with_the_context_that_frames_it (ReferenceError: decision is not defined), which is unrelated to this change, arrived with 3bbacba, and is #315's subject.

Before and after on the failing test

Reproduced on main at 3bbacba before the change:

FAILED tests/test_render_controls.py::test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus
AssertionError: 1 of the layer's 43 rings are painted nowhere the corpus can be walked to, so nothing above is evidence about them:
    media (.lf-media-open:is(:focus-visible, .lf-focus-visible))

With the change, on this branch rebased onto 210a556:

tests/test_render_controls.py::test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus
1 passed in 173.65s

The everyday gate is green too: 882 passed, 6 skipped.


Automated fix for failed run

…lked

The `media` here-ring landed with pasted thread images, and no page in the ring
walk's corpus could paint it: `.lf-media-open` is built by the runtime out of a
message's Markdown or a composer's thumbnail, so no authored markup reaches it
and the coverage floor read the rule as evidence about nothing.

The ship review's vendor question now carries a screenshot of the builds it is
waiting on, which puts one `.lf-media-open` in the panel every ring-walk scope
opens. It hangs off that existing message rather than a new one: the resync
thread's length is what a margin fixture measures its card against, and the
vendor thread waiting on the reader is what the panel's "Waiting on you"
narrowing is read through.

`serve` could not lay that image in. It harvested media names from the parsed
markup, where an attribute holds them; a message names its image in Markdown,
which that reading cannot see, so the fixture served the page with a broken
image and a 404 in the console. It now reads the seed's references too, matched
on the content-addressed name so a `/media/` standing in prose is not one, and
lays them in whether or not the call seeds the log — `seed_log=False` is how a
caller appends those events itself.

@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.

Two things beside the change, neither on its claimed path — ci is green here and the ring-walk evidence is in the description.

tests/CLAUDE.md still describes the old serve. Under "The browser fixture serve is the normal owner of a specimen" it says the fixture "copies the example media that document names", and the sentence after it lists what an example's path adds as the external data and event log — not media. That paragraph is what a next author reads before seeding a screenshot, so on its own it still says a markup reference is the only way one arrives; examples/CLAUDE.md carrying the new reading does not reach them. The "Handed an example's path" sentence is the place for it.

A /media/ reference in a message's text passes the append door unchecked. media_errors is called only from check_markup (over the fragment's harvested attributes) and from the version door, and cmd_comment/cmd_reply call check_markup only if markup — so leaf comment --text "![shot](/media/deadbeefdeadbeef.png)" is accepted and frozen. That is the harm test_the_reply_door_refuses_a_picture_the_page_directory_has_not_got was written against, in its own words: the log is append-only, so it is a broken image for as long as the page exists and no later check mentions it. This PR is where the corpus first names media that way, and the shape the docstring anticipates — an agent sending a screenshot in a reply — is now the shape that has no gate; check_markup's "Text needs no gate at all" answers whether text can claim a widget, not whether it can name a file the directory hasn't got. The fixture side is what this change owed, so the door belongs in its own change rather than here.

The `serve` paragraph still said the fixture copies the media the document
names, and the sentence about an example's path listed only external data and
the event log. That is what a next author reads before seeding a screenshot, so
on its own it still said a markup reference is the only way one arrives.
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Both taken.

tests/CLAUDE.md now says what the fixture does, in a52e50d1: the "Handed an example's path" sentence carries the log's own media, why the parsed reading cannot see a reference a message writes in Markdown, and that they arrive whether or not the call seeds the log. ci is green on that head.

The text door is #324, off main as the review asked, and green. read_text_arg is where every agent-authored body arrives, so the reading sits there rather than in check_markup, and leaf comment --text "![shot](/media/deadbeefdeadbeef.png)" is now refused with the sentence the markup door uses. It reads the layer's content-addressed name rather than scanning for /media/, which is what keeps a path standing in prose out of it — the lesson inline_assets records after a text scan crashed an export. The browser door is unchanged, since a pasted image is stored before its reference enters a draft.

@leaf-agent

Copy link
Copy Markdown
Collaborator Author

The ring floor this fixes reddened main again on run 33997332457 (8c7661c, two commits after the run in the description), with the same media (.lf-media-open:is(:focus-visible, .lf-focus-visible)) line — so this is still the live failure on main rather than a one-off at 3bbacba.

I reproduced it independently at 8c7661c and arrived at the same two pieces this PR already has — a .lf-media-open in ship-review.jsonl and serve reading the seed's media references — so there is nothing to add here beyond the recurrence. That run's other failure is #315's.

Keeps the screenshot this branch adds to the vendor-build comment and main's
session/turn fields on the pickup event that precedes it in examples/ship-review.jsonl.
@max-sixty
max-sixty merged commit 67962f7 into main Sep 6, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/ci-33993671859 branch September 6, 2026 05:14
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