Skip to content

Keep the nightly tests off the shift watch, and give their hand-written claim a turn - #1451

Merged
max-sixty merged 2 commits into
mainfrom
fix-ci-nightly-shifts
Sep 30, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fix-ci-nightly-shifts

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

Main's nightly job fails on 776 of its 2,107 tests. Two main commits caused it, and neither PR ran the nightly-marked tests.

On macOS, a full nightly run (pytest tests --run-nightly -m nightly) on main before this change had 56 failures and 807 errors. After it, the run had 3 failures and 1 error. Two of those failures pass when re-run serially, which points to load (the load average was 39). The third was the claim test fixed here. It and the margin test both pass now. The everyday selection passes (1,451 tests).

The nightly pages' shifts are still defects under the Stability rule. Bringing the nightly tests back under the watch means fixing them, starting with the widgets that grow as they upgrade.

This was written by Claude Code on behalf of max-sixty

🤖 Generated with Claude Code

…en claim a turn

Main's nightly job fails on 776 of its 2,107 tests. Two main commits caused it, and
neither PR ran the nightly-marked tests.

#1432 made every browser test fail on a layout shift without input, or on typing
that carries its field. `EXPECTED` in `tests/shift_watch.js` lists the shifts
that the broad selection's pages make. The nightly-marked tests' pages make many
more: 809 distinct moved elements, reported as teardown errors on 766 tests.
Examples are INLINE_PAGE's `lf-options` growing its 44px write-in row as it
upgrades under authored HTML that already painted, which pushes every paragraph
below it down, and ASK_PAGE's Ask pushing its sections down 63px. Listing them
region by region would turn `EXPECTED` into an allowlist of most of the corpus.
The nightly-marked tests now skip the watch (`conftest.py`, `_watches_shifts`).
The broad selection, whose shifts the list covers, still fails on any shift it
does not name.

#1433 made `turn` a required claim field, and `claim_update_sources` drops a
claim that lacks it. The claim that
`test_an_exact_workflow_reports_stale_work_beside_a_live_page_claim` writes by
hand had no `turn`, so the page never saw it and the thread read Sent instead of
Working. The claim now names no turn, as another session's claim does.

On macOS, a full nightly run on main before this change had 56 failures and 807
errors. After it, the run had 3 failures and 1 error. Two of those failures pass
when re-run serially, which points to load (the load average was 39). The
third was the claim test fixed here, which now passes.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@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 exact-workflow fixture needs the turn identity of the claim it tests; the inline suggestion explains the false premise. #1449 already proposes that same fixture correction, so these PRs overlap on the same line.

Comment thread tests/test_render_startup.py Resolved
… status at any stage

The review pointed out that `record_claim` gives session "s" the turn `turn-1`, and
`set_status` records that turn on a claim its own session writes. A null turn
therefore can't stand for work declared in the turn being closed. The claim now
names `turn-1`.

`test_the_margin_groups_meanings_at_one_destination_without_moving_the_page`
failed in nightly run 36633195934 because the pickup grace ran out partway
through the journey, turning "Sent" to "Waiting for pickup". The test is about
the status being visible and not opening the thread, so it now finds the
status by role at any stage (#1450). Issue #1450 also found that the Ask
fixture's startup shift would still fail this test at teardown. With the
nightly tests off the shift watch, that no longer happens.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit c059a6e into main Sep 30, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix-ci-nightly-shifts branch September 30, 2026 01:01
max-sixty added a commit that referenced this pull request Sep 30, 2026
…inter (#1448)

After #1424 an element holding threads draws nothing at rest. The
pointer anywhere inside it still raised a 2px accent contour, though,
because `markAt` counts every point under the element. So a reader whose
mouse rested inside a section with a section-level thread saw a box
around the whole section. In effect, that was the resting box #1424
removed.

On the page, the pointer now lights only these:
- the thread's words;
- its row in Threads;
- the hand cursor, which says a press opens the thread.

The element's contour comes only from a moment that names the thread:
- a draft;
- an action;
- the pointer on its row in Threads;
- the thread the user stands in.

**Standing across a press.** The page hover had been covering a gap. A
press moves focus to the page at mousedown, and only the click of a
press on the thread's own mark lands the user back in the thread.
Everything that read standing from focus therefore went blank for the
length of the press. That covered the element's contour, which the hover
had been standing in for, and the margin entry's selection, which
nothing covered.

Standing is now one reading: `standingThreadId` in `thread/focus.js`. It
returns the held thread. During a press, it returns the thread held at
pointerdown until the frame after the press ends, whether by release,
cancel, a native menu, or the window losing focus. The page's marks and
the margin entry both read it. Commands still act on `heldThreadId`, so
the hold changes only what is drawn. A press that leaves the thread,
such as a drag that selects other words, keeps the thread painted until
it is released.

**Tests.**
- The tests that hovered an element to see its projected contour now
open its thread with a press, or point at its row in Threads. They use a
window wide enough that the panel covers none of the target.
- The pixel test for a complete contour also asserts that the pointer
inside the element draws none.
- The press test samples every frame from mouse-down until after the
click, for both the contour and the margin entry. It fails when the
margin entry reads focus alone.

**Checks.** `npm run test:runtime` passes. The full local suite with
`--run-nightly` passed apart from one test that also failed on main, and
#1451 has since fixed it. CI passes on the branch merged with main.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Sep 30, 2026
A nightly run on Linux CI (36659812215) found 58 tests the local survey had not, most
of them a margin cluster placed after presentation. So the nightly-marked tests stay
off the watch, as #1451 had them, now decided beside the lists
(`known_shifts.watches_shifts`); the lists hold what the surveys and that run saw, for
whoever takes up each defect, and the reports #1446 and #1444 fixed are out of them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Sep 30, 2026
The shift watch from #1432 now knows the shifts pages make today by test
and region. Before, `EXPECTED` in `tests/shift_watch.js` held one set of
region patterns for every page. Chrome names only the five nodes a frame
moved most, which differ between runs and between macOS and Linux, so
each run turned up names the patterns missed. The only patterns broad
enough to catch them would have masked the runtime's own pieces, such as
margin entries and the comment box, on every page.

- **`tests/known_shifts.py`** names each test whose page still shifts
without input, by file and function, with a pattern for the region its
known shift moves. `clean_browser` keeps a report from that test only
when the node it names is in that region. Any other shift fails, as does
typing that carries its field. Four watched tests are listed today.
Fixing a defect deletes its entry.
- **The upgrade before presentation is known by when it happens.**
Widgets upgrade after the authored HTML has painted, and the frame that
presents the page carries every box their upgrade reshaped. This defect
is every page's, so `shift_watch.js` doesn't report a shift before a
page with the runtime is presented, or in the frame that presents it.
The rule is deleted when the upgrade is fixed, however that is done.
- **The nightly-marked tests stay off the watch**, as #1451 left them.
That decision now sits with the list (`known_shifts.watches_shifts`).
Their pages make hundreds of shifts, mostly that same upgrade: 781
reports across 321 test runs locally, and a nightly run on Linux CI
([36659812215](https://github.com/max-sixty/leaf/actions/runs/36659812215))
found 58 tests the local run had not. They watch again, with the entries
a fresh survey finds, once the upgrade is fixed.

The sensor also changed in three places:
- **Presses:** every recent press is kept, and a trusted press in a
same-origin page holding a frame counts as input to it. A later key had
un-credited an earlier one's frame, and #1446 has already carried this
fix to main.
- **Resize:** a keystroke's rendering ends at a window resize. A test
that resized right after typing had read as a carry.
- **Self-test:** `test_render_shift_watch.py` gains a press in the page
holding a frame, which fails without the change.

The everyday selection passes locally.

> _This was written by Claude Code on behalf of max-sixty_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty pushed a commit that referenced this pull request Sep 30, 2026
The options group painted its authored rows before upgrade added the Add
form and Done control. Those two cells increased the first Ask's height
and moved the sections below it without input. The group now reserves
their rows until upgrade; the reservation matches the row and card forms
and leaves no unused Add row inside a thread. The nightly margin test
also selects its status by role, so its click behavior is checked after
either the Sent or Waiting for pickup wording appears.

The margin regression failed at browser-health teardown before the CSS
change and passes after it. The margin, card, and thread cases pass
together; the two changed browser cases each passed 18 concurrent
copies. Both changed cases passed in PR CI.

The PR's test job is red on 34 browser-health errors elsewhere in the
changed nightly files. I reproduced the narrow card case and two options
Markdown cases on `main`; #1451 covers the broader nightly shift-watch
gate. This PR remains unmerged until GitHub's required checks pass.

Closes #1450 — automated triage

---------

Co-authored-by: leaf-agent <[email protected]>
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