Serve the examples by path so their shipped data comes with them - #116
Conversation
leaf-agent
left a comment
There was a problem hiding this comment.
Verified the fix from the merged tree: with the three test files reverted to fdaa3ea, test_a_reload_mid_flight_never_wedges_round_trip and test_the_gutter_runs_beside_the_exhibit_and_no_further[gallery]/[ship-review] fail on exactly the activate_source assertion the description quotes; with the PR's versions, those plus both ring readings pass (8 passed, --run-nightly). seed_log=False holds the prior behaviour where it matters — ship-review.jsonl is the only seed among the four examples touched, and the string call sites never laid it in either — so the only change to what is served is the data, which is the point.
One thing the PR doesn't reach, and it's the durable half of this bug. tests/CLAUDE.md still tells the next author to spring the same trap:
Handed an example's path rather than its markup it also lays in the log that example ships … Pass the markup where the log would be noise for the subject, and say which in a comment.
(tests/CLAUDE.md, the serve paragraph — search for "Pass the markup where the log would be noise".) Two things are now wrong there. The paragraph names only the log and the media as what a path lays in, where the fixture's own docstring names three — "the media it names, external data, and the event log". And the instruction that follows is the idiom this PR is removing from the suite: a test whose subject isn't the conversation is told to pass markup, which drops the data silently rather than the log deliberately. The description's closing claim — "after this no test hands serve an example's markup as a string" — is true of the suite (I checked; COMMAND_HUB_PAGE and the _publish call sites are v2 markup, not serve arguments), but it isn't true of the guidance, so the corpus regrows the call site the moment someone follows it.
The silent case is the one worth guarding: this run failed loudly only because gallery and ship-review select a $captures snapshot, so activate_source refused. An example shipping only replaceable set values in its .data.json would have served without them and gone green over a page the reader never gets.
The fix is the sentence, not the tests: name external data alongside the log, and point at serve(example, seed_log=False) as the way to leave the conversation off — which is what this PR, and test_render_pages.py before it, actually do. It is a one-sentence change and it belongs with these tests rather than in a PR of its own.
leaf-agent
left a comment
There was a problem hiding this comment.
The guidance fix landed and it is the right one. Checked the PR's version of the paragraph with git show HEAD:tests/CLAUDE.md (the PR run restores base copies of CLAUDE.md paths into the worktree, so the checkout reads stale here): it now names the external data alongside the log as what a path lays in, and points at serve(example, seed_log=False) instead of telling the next author to pass markup.
The seed_log=False claim holds in the fixture — in render_harness.py's go, the data_operations(example) loop is guarded by if example: alone, while the seed append and the cursor.json write are the only things seed_log gates. So the sentence's promise that "the external data still belongs to the example" is what the code does, and the silent-drop path the earlier review worried about no longer has an instruction pointing at it.
Nothing further from me. Self-authored, so no approval from this account.
|
The two extra failures from the run this PR was opened for — No new PR opened, since this one already covers the failures. |
|
This PR also covers the whole remainder of run 33275975630 ( New, and not covered here: two gate cases went red at Both are deterministic and bisect to that commit, with no working-tree changes: |
|
The run's four failures and where each is answered
Read both ways from this checkout: at |
Pass example paths to
serveat the four call sites that previously passed copied markup, and setseed_log=Falsewhere the shipped conversation is outside the test. The fixture now installs the external data selected by each example without changing the page state those tests exercise.Update the test guidance to preserve the same distinction: an example path carries its external data and event log, while
seed_log=Falseomits only the conversation.Testing: the affected gate, gutter, and ring cases pass together (8 passed), and pre-commit passes on all four changed files.