Skip to content

Fix two Windows CI timing failures: outline landing wait, and unlaid chunks the freeze sweep skipped - #200

Merged
ben-dev-au merged 2 commits into
mainfrom
fix/outline-test-waits-for-arrival
Oct 11, 2026
Merged

ben-dev-au merged 2 commits into
mainfrom
fix/outline-test-waits-for-arrival

Conversation

@ben-dev-au

@ben-dev-au ben-dev-au commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Problem

  • test_a_heading_inside_a_chunk_the_scroll_cannot_reach_keeps_the_cursor failed on Windows CI (29 Sep on two dependabot PRs, 11 Oct on Give every example and test one made-up person, in everyday words #196): the fixture's tail brings Findings to the reading line, assert 1 == 2.
  • The tests' _landed helper skipped the arrival check the outline's own _landed makes (fnd/tui/outline_view.py): a glide can apply its scroll after the navigation commits, so a slow runner read the reading line at the old offset.

Change

  • _landed in tests/test_outline_pane.py also waits until the scroller reaches landing_destination(), as the outline does.

Evidence

  • Delaying scroll_relative by 0.6 s (the mechanism test_a_jump_whose_scroll_starts_late_still_places_only_its_target injects) reproduces the CI failure every time: offset 0 against a destination of 36, assert 1 == 2.
  • With the wait, the same delayed probe passes 3 of 3.
  • All 43 outline tests pass; full gate with both fixes 5,956 passed, all 12 tmux scenarios passed.
  • Other outline tests that have failed on Windows CI go through the same helper; not checked whether this was their cause too.

Second Windows failure: a freeze sweep that met unlaid chunks never came back

  • test_a_requery_serves_the_unmatched_chunks_and_builds_the_matched_one timed out on Windows (10 Oct on a dependabot branch, 11 Oct here): the first query's sweep never captured the far chunk. The diag held mount served=0 built=60 but no backfill froze=: the post-fill freeze sweep froze nothing.
  • Cause: the sweep's await_settled can time out or run out of rounds on a loaded runner. The just-filled chunks then have height 0, freeze rightly refuses each one, and nothing retried. The chunks stayed live (the DOM the freeze exists to drop), and a requery rebuilt them instead of reusing captures.
  • Reproduced by making await_settled a no-op: 47 of 47 refusals at height 0, and the CI timeout.
  • Fix (fnd/tui/preview/presenter.py): a sweep that met chunks not yet laid out comes back for them in the background (FREEZE_UNLAID_RETRIES = 20, FREEZE_UNLAID_RETRY_SECONDS = 0.1), so no navigation waits on it. Each sweep cancels a pending retry and bumps a generation, so the newest window always wins; app exit cancels it.
  • tests/test_a_freeze_sweep_returns_for_unlaid_chunks.py injects the no-op settle: fails without the fix (and with retries set to 0), passes with it. The 22 files touching freeze and captures: 412 passed.
  • Follow-up, not in this PR: a same-file navigation to an already-mounted chunk does not cancel the earlier mount task, so its fill sweep can still freeze the new focus chunk (reviewer probe: 1 to 2 in 10, with or without this change).

The outline tests' landed check skipped the arrival the outline itself
waits for: a glide can apply its scroll after the navigation commits. On a
slow runner a test read the reading line at the old offset (0 against a
destination of 36) and failed "the fixture's tail brings Findings to the
reading line", seen on Windows CI on 29 Sep and 11 Oct. Delaying
scroll_relative by 0.6 s reproduces it every time; with the wait it passes.
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 8c9a463c-d75e-4ccf-9cc4-76f29cb31809

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The post-fill freeze sweep settles first, but that settle can time out on
a loaded runner. The just-filled chunks then have height 0, freeze refuses
each one, and nothing retried: the chunks stayed live and no capture was
kept, so a requery rebuilt them. On Windows CI this timed out
test_a_requery_serves_the_unmatched_chunks_and_builds_the_matched_one
("the first query's sweep never captured the far chunk"); a no-op settle
reproduces it, 47 of 47 refusals at height 0.

A sweep that met unlaid chunks now comes back for them in the background,
up to 20 times 0.1 s apart, so no navigation waits on it. Each sweep
cancels a pending retry and bumps a generation, so the newest window wins.
@ben-dev-au ben-dev-au changed the title Wait for the scroll to reach its landing before an outline test reads it Fix two Windows CI timing failures: outline landing wait, and unlaid chunks the freeze sweep skipped Oct 11, 2026
@ben-dev-au
ben-dev-au merged commit 46b199b into main Oct 11, 2026
22 checks passed
@ben-dev-au
ben-dev-au deleted the fix/outline-test-waits-for-arrival branch October 11, 2026 05:48
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.

1 participant