daemon: settle the ownership keystroke before asserting a quiet report #185

Merged
natsukium merged 1 commit from daemon/mirror-report-flake into main 2026-10-19 09:54:32 +09:00
Owner

Problem

serve::session_task::tests::a_mirrors_report_is_stored_but_the_owner_still_answers failed intermittently under load (locally during full runs, and on CI for #174) with "presentation reports are query-answering state: nothing is pushed to any window".

The test takes input ownership by writing k to the shell, and the tty echoes it back. Every handle_input ends in grid_cycle_for, so when the echo reached the grid before one of the later ColorScheme reports, that report's cycle shipped it. The stray events were exactly a RowDelta for row 0 (k) and a CursorState at column 1; the reports themselves push nothing.

Change

Wait for the echo, ship it with after_drive, and drain both receivers before the reports, the same settle step a_resize_answers_an_idle_mirrors_armed_pull_exactly_once uses. Test-only.

Verification

Running the test binary with --exact in 24 parallel loops: 9 of 360 runs failed before the fix, 0 of 720 after. session_task tests (111), clippy and prose-check are clean.

## Problem `serve::session_task::tests::a_mirrors_report_is_stored_but_the_owner_still_answers` failed intermittently under load (locally during full runs, and on CI for #174) with "presentation reports are query-answering state: nothing is pushed to any window". The test takes input ownership by writing `k` to the shell, and the tty echoes it back. Every `handle_input` ends in `grid_cycle_for`, so when the echo reached the grid before one of the later `ColorScheme` reports, that report's cycle shipped it. The stray events were exactly a `RowDelta` for row 0 (`k`) and a `CursorState` at column 1; the reports themselves push nothing. ## Change Wait for the echo, ship it with `after_drive`, and drain both receivers before the reports, the same settle step `a_resize_answers_an_idle_mirrors_armed_pull_exactly_once` uses. Test-only. ## Verification Running the test binary with `--exact` in 24 parallel loops: 9 of 360 runs failed before the fix, 0 of 720 after. `session_task` tests (111), clippy and prose-check are clean.
daemon: settle the ownership keystroke before asserting a quiet report
All checks were successful
darwin / detect relevant changes (pull_request) Successful in 9s
darwin / darwin docs-only no-op (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 11s
windows / windows docs-only no-op (pull_request) Has been skipped
bench / instruction-count regression gate (pull_request) Successful in 49s
darwin / build felis (aarch64-darwin) (pull_request) Successful in 1m11s
pr / nix flake check (pull_request) Successful in 41s
windows / cargo nextest (Windows) (pull_request) Successful in 3m4s
pr / cargo build / clippy / test / deny (pull_request) Successful in 1m51s
pr / wire schema is compatible with the base (pull_request) Successful in 2s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 29s
windows / frontend smoke (Windows) (pull_request) Successful in 41s
windows / cargo clippy (Windows cross) (pull_request) Successful in 14s
4e341b577b
a_mirrors_report_is_stored_but_the_owner_still_answers took input
ownership with a KeyBytes write, so the shell's line discipline echoed
it back. Every input ends in a grid cycle, so when the echo reached the
grid before a later ColorScheme report, that report's cycle shipped it
and the "nothing is pushed" assertion failed (9 of 360 runs under
parallel load). Wait for the echo and ship it before the reports, as
a_resize_answers_an_idle_mirrors_armed_pull_exactly_once already does;
720 of 720 runs pass under the same load.
natsukium deleted branch daemon/mirror-report-flake 2026-10-19 09:54:32 +09:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
felis-terminal/felis!185
No description provided.