Skip to content

Cut three of the slowest browser tests' cost, and the write watch's on long lists - #3294

Merged
max-sixty merged 2 commits into
mainfrom
agent-a0211e28440114d97
Oct 20, 2026
Merged

max-sixty merged 2 commits into
mainfrom
agent-a0211e28440114d97

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Three of the push run's slowest browser tests spent their time on setup rather than on what they check. CPU below is user+sys for one local run of the single test, Chromium included, at a load near 11 on 18 cores.

  • test_a_script_scroll_as_content_grows_above_ends_the_hold (59-67 s on CI) opened the feature gallery to read one section. It now reads a synthetic #read section, the page test_a_page_that_never_settles_lets_the_held_place_go_after_a_while already built, which the two now share. 31.3 to 4.9 CPU-s. Coverage is unchanged: turning the ambiguous move into layout's forever (movedAway's last line) fails both tests, and leaving the settling window open until its one-second limit (watchHolds's settled check) fails this one alone.
  • test_unchanged_margin_passes_over_the_corpus_do_bounded_work_and_write_nothing (85-93 s on CI) opened corpus.html for readings that take about 8 s. The three readings now open test_the_layer_holds_its_whole_page_rules_on_the_corpus, the nightly test that opens the corpus already, at the same 1440px. The push run saves 36.6 CPU-s, and the nightly, which ran both, 34. Behavior coverage moves from each push to main to the daily run: a margin pass whose work grows with the corpus's rows, or that restates a margin name, is now caught within a day rather than on the push. Each reading runs as a subtest, so one that fails leaves the corpus's later readings to report. _refreshes_restate_no_margin_name stays in browser/margin/test_entries.py, where the gallery's margin atlas reads it too.
  • test_the_reference_runs_available_commands_and_explains_the_rest (67 s on CI) spent most of each search.fill in write_watch.js: re-rendering the reference's 76-row table took 1.2 s under the watch and 0.02 s without it. The watch read every subtree at every child-list record of a batch, and serialized it whole. It now reads each subtree nothing in the batch wrote into once per batch, and reads a record's later list only when an earlier list of its length is waiting to match. A subtree the batch wrote into at any point still holds a written node, since a node taken out of it was taken out by a write to a node within it, so the result is the same. 13.8 to 7.9 CPU-s, and every test whose page re-renders a long list gains the same way. test_child_list_restatements_are_judged_across_one_delivery fails when the cache ignores written subtrees.

Two corpus readings were red on main, and are repaired here because the moved readings run beside them:

  • Every test_page_fixture_renders case waited out the 120 s notice deadline and failed: since Show the leaf's peek when pointing at the row's leaf or field #3260 the leaf's peek shows while the pointer or the focus rests on the leaf, and other_pages leaves the focus there, so left_alone read the peek as a notice that never retired. left_alone now releases the focus and moves the pointer off before it waits, rather than leaving that to some of its callers, and surface_findings and typed_box_findings no longer release the focus themselves. The resize journey, which also starts with left_alone, now starts with the focus released rather than on the leaf, so it no longer shows the leaf keeping the focus through a resize.
  • pressable_paper_findings waited for a tab named "Command", which Discover corpus examples and use their authored titles #3167 renamed to the example's title; it finds the tab by the panel it controls.

test_the_layer_holds_its_whole_page_rules_on_the_corpus still fails on main and here on its aims reading: eight lf-draft-action buttons stand 26px tall under a finger.

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

max-sixty and others added 2 commits October 20, 2026 01:40
…n long lists

Three of the push run's slowest browser tests spent their time on setup rather than on
what they check. CPU below is user+sys for one local run of the single test, Chromium
included, at a load near 11 on 18 cores.

- `test_a_script_scroll_as_content_grows_above_ends_the_hold` (59-67 s on CI) opened
  the feature gallery to read one section. It now reads a synthetic `#read` section,
  the page `test_a_page_that_never_settles_lets_the_held_place_go_after_a_while`
  already built, which the two now share. 31.3 to 4.9 CPU-s. Coverage is unchanged:
  turning the ambiguous move into layout's forever (`movedAway`'s last line) fails
  both tests, and leaving the settling window open until its one-second limit
  (`watchHolds`'s settled check) fails this one alone.
- `test_unchanged_margin_passes_over_the_corpus_do_bounded_work_and_write_nothing`
  (85-93 s on CI) opened `corpus.html` for readings that take about 8 s. The three
  readings now open `test_the_layer_holds_its_whole_page_rules_on_the_corpus`, the
  nightly test that opens the corpus already, at the same 1440px. The push run saves
  36.6 CPU-s, and the nightly, which ran both, 34. Behavior coverage moves from each push to
  main to the daily run: a margin pass whose work grows with the corpus's rows, or
  that restates a margin name, is now caught within a day rather than on the push.
  Each reading runs as a subtest, so one that fails leaves the corpus's later
  readings to report. `_refreshes_restate_no_margin_name` stays in
  `browser/margin/test_entries.py`, where the gallery's margin atlas reads it too.
- `test_the_reference_runs_available_commands_and_explains_the_rest` (67 s on CI)
  spent most of each `search.fill` in `write_watch.js`: re-rendering the reference's
  76-row table took 1.2 s under the watch and 0.02 s without it. The watch read every
  subtree at every child-list record of a batch, and serialized it whole. It now
  reads each subtree nothing in the batch wrote into once per batch, and reads a
  record's later list only when an earlier list of its length is waiting to match.
  A subtree the batch wrote into at any point still holds a written node, since a
  node taken out of it was taken out by a write to a node within it, so the result is
  the same. 13.8 to 7.9 CPU-s, and every test whose page re-renders a long list
  gains the same way. `test_child_list_restatements_are_judged_across_one_delivery`
  fails when the cache ignores written subtrees.

Two corpus readings were red on main, and are repaired here because the moved
readings run beside them:

- Every `test_page_fixture_renders` case waited out the 120 s notice deadline and
  failed: since #3260 the leaf's peek shows while the pointer or the focus rests on
  the leaf, and `other_pages` leaves the focus there, so `left_alone` read the peek
  as a notice that never retired. `left_alone` now releases the focus and moves the
  pointer off before it waits, rather than leaving that to some of its callers, and
  `surface_findings` and `typed_box_findings` no longer release the focus themselves.
  The resize journey, which also starts with `left_alone`, now starts with the focus
  released rather than on the leaf, so it no longer shows the leaf keeping the focus
  through a resize.
- `pressable_paper_findings` waited for a tab named "Command", which #3167 renamed to
  the example's title; it finds the tab by the panel it controls.

`test_the_layer_holds_its_whole_page_rules_on_the_corpus` still fails on main and
here on its aims reading: eight `lf-draft-action` buttons stand 26px tall under a
finger.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit a28ced2 into main Oct 20, 2026
2 of 3 checks passed
@max-sixty
max-sixty deleted the agent-a0211e28440114d97 branch October 20, 2026 08:52
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