Skip to content

Remove redundant receipt lifecycle nightly case - #1003

Merged
max-sixty merged 1 commit into
mainfrom
codex/fix-leaf-ci-seat
Sep 23, 2026
Merged

max-sixty merged 1 commit into
mainfrom
codex/fix-leaf-ci-seat

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

The nightly case test_a_widget_move_keeps_one_target_seat_across_revisions_until_honored fails on current main because it expects a receipt immediately after ticking an option in a multiple-choice Ask. Since #966, that Ask is answered by Done; the tick alone hands the agent no receipt.

test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosure already covers the jobs receipt and work-seat lifecycle using a single-choice Ask: Sent, pickup, Working, DOM identity through those states, and completion. Remove the redundant stale case. Preserve its separate assertion that a local work-seat control survives an unrelated page revision in test_a_widget_without_a_thread_says_what_the_agent_is_doing, using a board card that owns such a seat.

Verification: reproduced the failure on main at 591e06af; the full test_render_options.py nightly file passes 62/62 after the change. The updated board-card case and pre-commit pass on the final diff.

This was written by Codex on behalf of max-sixty

Option groups no longer own local work seats, so the old test asserts a margin entry and CLI claim that the current contract rejects. Keep the DOM identity check in the board-card case, which still owns a local work seat.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The deletion itself is right, but the reason the description gives for it is wrong, and this squashes into main's commit message — so it becomes the record of why 91 lines went away.

"The group no longer has a local work seat" is not what fails. Right after the pick the removed case makes, a status … working "checking the mounts" --on jobs claim exits 0: work.py admits it through the unsettled-action-receipt branch, with no x-work declaration. tests/test_render_margin.py::test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosure asserts that same exit 0 on --on jobs, so that branch is load-bearing and still tested. test_a_widget_without_a_thread_says_what_the_agent_is_doing rejects the claim on jobs because no pick is outstanding there — the opposite state, not the same one.

What fails is the first assertion, data-lf-kinds="sent". Since #966 made multiple-choice Asks finish with Done, a tick inside a multiple group is not an answer and hands the agent no receipt, so no margin entry is projected for it. The margin case above says exactly this in its docstring, and is written on a single-choice variant of ASK_PAGE for that reason.

So the case is stale in its arrangement, not obsolete in its subject — pressing Done after the pick makes it pass otherwise unchanged. Deleting it is still the right call, because that margin case already holds its assertions on the same [data-lf-margin-for="jobs"] marker: the identity probe across Sent → Waiting for pickup → Picked up → Working, and the completes=("jobs",) stamp that removes the cluster and leaves #job-mounts[chosen] standing. The one assertion it does not hold — the target standing through an unrelated revision — is the one this PR moves onto card-migration, so the coverage does land where the body says it does.

Worth rewriting those two sentences to say redundant-with-test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosure, and to name the Done cutover as the cause. As written, the next reader goes looking for a work-seat branch that was removed, and it is still there and still covered.

What I ran

On the merge base (591e06af), with the case restored, the failure is the first assertion — no [data-lf-margin-for="jobs"] cluster exists at all after the pick. Dumping every margin cluster at that point returns three, keyed jobs-decision, bracket-decision and tools-decision, each carrying only an ask marker. Pressing #jobs .lf-done and reading again returns a cluster keyed jobs with data-lf-kinds="sent", labelled Sent · options · answer · …. In the same state, before Done, status … working --on jobs exits 0 while --on jobs-decision exits 1 with no local work seat.

This makes the case pass on the merge base:

     with sending(page, "the mounts choice"):
         page.locator("#job-mounts").click()
+    # A multiple-choice Ask is answered by Done, not by the pick under it.
+    page.locator("#jobs .lf-done").click()
+    round_trip(page)
     action = next(
         event
         for event in reversed(sent_events(d))
-        if event.get("widget") == "jobs" and event.get("action") == "choose"
+        if event.get("widget") == "jobs" and event.get("action") == "answer"
     )

On this PR's head: tests/test_render_options.py passes 62/62, and the edited case plus test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosure pass together under -n0.

@max-sixty max-sixty changed the title Remove obsolete option-group work-seat nightly case Remove redundant receipt lifecycle nightly case Sep 23, 2026
@max-sixty
max-sixty merged commit 3aa1888 into main Sep 23, 2026
7 of 8 checks passed
@max-sixty
max-sixty deleted the codex/fix-leaf-ci-seat branch September 23, 2026 12:34
max-sixty added a commit that referenced this pull request Sep 23, 2026
The scheduled [nightly
run](https://github.com/max-sixty/leaf/actions/runs/35851210059) on
`895a629c` failed nine browser cases. Five are covered by merged #1002
and #1003. The other four reproduce on current main at `3aa1888` and are
repaired here.

These are stale test arrangements after two intentional changes:

- A multiple-choice options tick no longer answers its Ask before Done
(#966). The margin-label paint test now uses a single-choice Ask, so the
pick produces the receipt whose label it measures.
- Only an answered Ask creates an agent workflow (#983). The export test
marks its draft `needed`, making its edit a real Ask answer before
checking that export strips the live pickup status. The two-unit arrival
test classifies two cards in a swipe-deck Ask, then checks their
distinct pickup and work pulses in the margin and Page Map. Ordinary
board moves no longer serve that role.
- The shipped triage-board rail test now creates and resolves an
anchored thread. It verifies that a real margin entry appears and
disappears without moving the readable column.

Verification: all four repaired cases and the neighboring receipt
lifecycle case pass together under `--run-nightly -n0` (5/5). Pre-commit
passes on the changed files.

> _This was written by Codex on behalf of max-sixty_
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