Repository navigation
Let the pick reach the log before the stamp reads it - #71
leaf-agent wants to merge 3 commits into
Conversation
|
Same failure on the next push to main — run 33039281326 at I reproduced it on |
leaf-agent
left a comment
There was a problem hiding this comment.
One wording point on the new comment — the fix itself reads right. I traced the gate: action_rests_on returns [widget, *detail ids inside it], so {"options": []} collapses to #transport alone and action_subjects falls back to subjects or [widget], which is exactly why the cleared pick puts the whole group's words under a standing decision. round_trip is the wait tests/CLAUDE.md names for this ("Read the event log only after round_trip"), and it is the right one here rather than told, since the subject is what the page sent, not what it was later given.
I also re-ran the sibling-site survey independently — every stamp_page / stamp_version_file call in tests/ whose preceding gesture had no intervening settle turned out to be a comment send, a local draft edit, or a panel press, none of which puts a standing action on a leaf the stamp rewords. So this really is the one site.
ci / test is still in flight at the time of writing; I have not seen it terminal.
|
Third red run on main, same refusal at the group: run 33039958729 at |
d9cbae5 to
f7f70e8
Compare
|
Rebased onto Verified on the rebased head: Reproduction on
|
leaf-agent
left a comment
There was a problem hiding this comment.
This branch is now superseded — the identical fix landed on main while it was in review, and the conflict is exactly the collision.
#63 (merged as fb28c76) rewrote this same block and added round_trip(page) at the same site, one line after the press, with its own comment:
page.locator("#opt-bearer .lf-pick").focus()
page.keyboard.press(" ")
expect(page.locator("#opt-bearer[chosen]")).to_have_count(1)
# The browser paints its queued choice immediately. Wait until the authoritative
# log holds it before authoring the revision that honors it.
round_trip(page)So mergeStateStatus is DIRTY and git merge-tree origin/main pr71 conflicts on tests/test_render_options.py alone: both sides insert a round_trip call between the expect(...) and the d = serve.page_dir block. The diagnosis in the description is right and the wait is the right one — it just arrived twice. Worth noting for whoever resolves the conflict: #63 also changed the press from Enter to " " because the pick mark's role moved from button to checkbox, so taking this branch's hunk wholesale would quietly revert that.
The one thing this branch has that main doesn't is the comment. Its five lines name both losing orders — the pick on opt-strict, and the cleared pick that rests on the group rather than on any option — where main's two lines name the mechanism but not either refusal. That reasoning came out of three reproductions on this thread and nothing else on main records it, so if this closes it's worth porting the comment over the shorter one rather than dropping it.
My read is: close this, and if the longer comment is wanted, land it as its own one-hunk change on top of main. I haven't verified ci is green on fb28c76 — the run was still in progress when I looked, so I can't yet say the red this branch was opened against is actually cleared, only that main now carries the same wait.
How I checked
$ git merge-base origin/main pr71
8db38276948f83e57a440c33342a627cfa01b45b
$ git merge-tree --write-tree origin/main pr71
CONFLICT (content): Merge conflict in tests/test_render_options.py
$ git diff 8db3827..fb28c76 -- tests/test_render_options.py
+ # The browser paints its queued choice immediately. Wait until the authoritative
+ # log holds it before authoring the revision that honors it.
+ round_trip(page)
The merge base is 8db3827 (Honor the active choice in revision fixture), which is what the last rebase targeted; fb28c76 landed on main after it.
|
Superseded — the fix is on main. So this branch now has nothing left to land: rebased onto One mechanism worth recording, since it will recur on any bot PR that falls behind main. The force-push to Run evidenceFour red
The last one is the useful one:
|
Problem
cion main is red attests/test_render_options.py::test_a_pick_offered_can_be_pointed_at_too, and it reproduces on the first try at-n0— a real ordering fault, not contention or a re-run's bad luck.The test presses four picks in the group, ending on
opt-bearer, then stamps a revision that carries that pick and rewordsopt-strict.lf-optionspaints the pick straight from the outbox and sends it after (this.#pick(next)precedessendActionin lf-options.js), soexpect(#opt-bearer[chosen])is satisfied while thechooseis still in flight. The stamp is a file-side read of that same log, and it reads a press or two behind — the pick onopt-strict, or the cleared pick before it. Against either of those the revision's markup stands somewhere the reader never chose, and the gate refuses it, correctly, for a version the test never meant to write.Nothing here was racy before
fe4e8ea— the test wrotev2.htmland appended a note, which read no log at all. That commit routed the same fixtures through the realversion stampboundary, which turned every one of these sites into an event-log reader.Solution
round_trip(page)between the last press and the stamp.tests/CLAUDE.mdalready states the rule this site is missing — "Read the event log only afterround_trip" — andround_tripis the fact-based wait for it: every attempt the page sent has a definitive outcome, rather than a sleep or a poll on the file.I checked the other 40
stamp_page/stamp_version_filesites for the same shape. The ones that gesture first either send no event (a panel press, a local draft edit), send a comment the stamp's verdict does not turn on, or already establish the ordering by another fact —test_a_moved_card_wears_its_pending_markopens a second tab that reads the move back out of replay before it stamps. Adding a trip to those would be a wait in front of a reading whose subject never moves, whichtests/CLAUDE.mdwarns against, so this is the one site that gets one.Testing
Rebased onto
8db3827(Honor the active choice in revision fixture), which changed the same site — the fixture now carries the reader's live pick, and the failure survived it, because the gate's disagreement is with the log's read position rather than with what the fixture claims.Bug-back on that base: with the
round_tripline removed the test fails in ~4s at-n0, every time, with the message above; with it, it passes.tests/test_render_options.py --run-nightlyis green (51 passed).Automated fix for failed run