Repository navigation
test: read the re-shown link mark after a rendering update in WebKit - #6415
Merged
Merged
Conversation
…ce in WebKit test_o_gives_marked_words_their_own_colours_back screenshotted the link right after the lf-mark highlight was registered again. WebKit on macOS 15 can take that screenshot before it paints the re-registered mark, so about 1 run in 6 read the link in its own colours; its colours arrive within two frames. The test's own reading was early, so it now waits for rendered(page) first. Refs #6303
leaf-agent
approved these changes
Nov 18, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 18, 2026
`leaf-dev suite flake --load N` runs N busy loops in the copies' band for as long as the copies run, each spinning only while the command is its parent. A copy's demand for CPU comes and goes, so copies alone starve a test less steadily: on CI's macOS runner, the WebKit marks failure (tests/browser/navigation/test_comment_marks.py, before #6415) showed in 1 of 18 copies run six at a time, where serial runs beside four busy loops showed it in 17 of 20.
max-sixty
added a commit
that referenced
this pull request
Nov 18, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 18, 2026
…n more copies On CI's macOS runner, the WebKit marks test at #6415's parent failed in 18 of 20 copies run one at a time beside four --load loops, against 1 of 18 copies run six at a time with no loops.
This was referenced Nov 18, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 19, 2026
…date (#6436) #6415 made `test_o_gives_marked_words_their_own_colours_back` read the re-shown link mark after a rendering update, since WebKit can screenshot words before it paints a highlight just registered. The test's first reading has the same race. It reads the unmarked string's syntax colour right after `lf-token-syn-string` is registered, and on a starved macOS runner WebKit hadn't painted it yet, so the string read grey `(74, 78, 83)`; the hidden-annotations check then compared the marked string's correct blue `(29, 79, 107)` against that grey and failed. The test now waits for `rendered` after each scheme change, before that reading. It's a test fix: WebKit does paint the colour. Evidence, from CI's macOS runner running only this test as 20 copies one at a time beside four busy loops (`flake="--workers 1 --load 4 …"`, the dispatch input #6434 adds): main failed it at this reading in 17 of 20 ([run 44407433212](https://github.com/max-sixty/leaf/actions/runs/44407433212)) and, after today's later merges, in 15 of 20 ([run 44410667696](https://github.com/max-sixty/leaf/actions/runs/44410667696)), and this change passed 20 of 20 ([run 44410662485](https://github.com/max-sixty/leaf/actions/runs/44410662485)). The nightly hasn't shown this reading fail; the load here is harsher than the nightly's. Refs #6303. Found while checking that the new dispatch input reproduces the failure #6415 fixed. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 19, 2026
The CI runner now runs `leaf-dev suite flake`'s copies and loops at normal priority, as the nightly does; the background band, and Races' `taskpolicy -b` advice, hold on a shared Mac. The `--workers 1 --load 4` example stays: at #6415's parent, at normal priority, it failed the nightly's assertion in 3 of 20 copies (run 44501699295), and six copies at once with no loops failed none of 18 (run 44501703758). > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 19, 2026
…mes its tests (#6434) A dispatch of `ci` now takes `flake`, the arguments for `leaf-dev suite flake`. Given it, the dispatch skips the Linux `test` job, and `test-macos` runs `leaf-dev suite flake` with those arguments in place of the suite. The step's log ends with each test's count per outcome and every failure's message, and the artifact holds each copy's log and the pictures of its failing pages. With no `flake`, a dispatch runs what it ran before. `leaf-dev suite flake` gains the repeat count and the load as options: `--copies` and `--workers` (how many copies, how many at once), which were the constants 18 and 6, and `--load N`, busy loops beside the copies that end with the command. On a CI runner the copies and loops run at normal priority, as the nightly does; on a shared Mac they keep the background band. ```sh gh workflow run ci --ref BRANCH -f flake="--workers 1 --load 4 'tests/x.py::test_y[firefox_browser]'" ``` So a session reproduces a failure only the nightly macOS job shows without pushing a commit that edits this workflow, and without the maintainer's Mac. running-tend said such a failure waits on the maintainer "since no runner you can reach has macOS"; it now sends triage to the dispatch, and proves a macOS-only fix by the same dispatch failing on the base and passing on the fix, keeping the next scheduled run as the evidence only where no dispatch reproduces the failure. tests/AGENTS.md, Races, owns how to dispatch, and its sentence that Tend repairs `test-macos` now holds. Races sends a session on a Mac to the dispatch only for a failure its own `leaf-dev suite flake` doesn't reproduce: there, the live line reply failure reproduced in 1 of 18 copies in 4 minutes, where a try on the runner took 12 to 23. **What to weigh** - **Load is busy loops beside the copies, not more copies.** At #6415's parent, the WebKit marks test failed the nightly's assertion in 3 of 20 copies run one at a time beside four `--load` loops ([run](https://github.com/max-sixty/leaf/actions/runs/44501699295)), and in none of 18 run six at a time with no loops ([run](https://github.com/max-sixty/leaf/actions/runs/44501703758)); the hand-written probe this replaces failed it in 3 of 20. Races' example uses `--workers 1 --load 4`, and `--load` replaces Races' advice to start busy loops by hand. - **On CI the copies run at normal priority.** `leaf-dev suite flake` runs its copies and loops in macOS's background band so that a run on a shared Mac yields to that machine's other users. A CI runner has none (`CI` set), so there they run at normal priority, as the nightly does. In the band, a fresh runner's own startup work starved the first round of copies: the same eight copies, dispatched together, took 108 to 216 s per test and 22 minutes in all in the band ([run](https://github.com/max-sixty/leaf/actions/runs/44487043988)), against 9 to 38 s and 5 minutes at normal priority ([run](https://github.com/max-sixty/leaf/actions/runs/44487039963)). That first round produced failures the nightly never shows: a 120 s click whose page had taken it, and `Page.goto` and `Page.reload` timeouts. In the band the WebKit test also failed an earlier reading in 14 of 20 copies, which the nightly never failed; at normal priority each failure was the nightly's own. - **Dispatch a base on a branch, never on `main`.** A red `ci` run on `main` of any event files a CI failure report through `tend-ci-failures`, which starts triage, so Races and running-tend say to push the base to a branch of its own. - **Tend can dispatch it.** Its sessions reach GitHub as the bot account through Tend's credential proxy, which limits only issue and pull request creation, with `TEND_BOT_TOKEN` (write access); the `tend-*` workflows' `actions: read` applies only to their own `GITHUB_TOKEN`. That account dispatched `ci` 15 times between Oct 28 and Nov 4, mostly on its `fix/issue-*` branches. `tend check` requires a reviewer for a `workflow_dispatch` with inputs only where it reaches a credential environment, and `ci` reaches none. - **Instructions, unscored.** The running-tend change removes the macOS exception rather than adding a case. Two of its sentences are new rules for Tend that an agent could read more than one way: how many copies a fix must pass ("enough that the base's failure rate would have failed three of them"), and when "no dispatch reproduces the failure" applies, which is the agent's call. Max asked for this; a fresh-context review read it, and its findings are folded in. `dev/tests/process/test_flake.py` passes, and fails if the loops aren't ended; pre-commit, actionlint included, passes. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The macOS nightly's WebKit failure of
test_o_gives_marked_words_their_own_colours_backis the test reading too early. Afteroshows the marks again,lf-markis registered at once, but WebKit on macOS 15 can screenshot the link before it paints the re-registered mark, so the test reads the link in its own colours. The test now waits for the runtime's rendering update (rendered) before that last reading.Evidence, from the macOS 15 runner running only this test 20 times beside four busy loops: on current main 17 of 20 passed (run 44359666959), and the three failures read the link in its own colours; they read the mark's colours correctly after two frames, 500 ms and 2 s. With this change 20 of 20 passed (run 44385439622). The same loop at #6245's merge and its parent also failed 1 in 10 each, so #6245 isn't the cause. WebKit does repaint, so Safari users see the mark; no runtime change is needed.
Refs #6303