summaryrefslogtreecommitdiff
path: root/src/linux/v9fs.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-28 12:36:58 -0300
committerGabriel Schneider <[email protected]>2026-08-28 12:37:12 -0300
commitb3595e04e67708c3b060a15cbbbf2478d9e6241e (patch)
tree25752214b022ce03e2916eec7aea95d5ddfec5a7 /src/linux/v9fs.zig
parent7df45a1586568476fb7f3fc5ffe8d644bbe13c93 (diff)
downloadpardes-b3595e04e67708c3b060a15cbbbf2478d9e6241e.tar.gz
pardes-b3595e04e67708c3b060a15cbbbf2478d9e6241e.zip
detached: a frontend that has not finished reading is not a screen that differs
`detached session: input from a frontend reaches the core and comes back as a diff` failed about three runs in five, always the same way: cell 122, the core holding `g` and the frontend a space. Cell 122 on a 60-wide grid is row 2 column 2, and row 2 is the pane shell's first line — the `g` is the front of `goblin@pardes ...`, the prompt bash printed into the pty at whatever moment it felt like. Nothing in the transport was wrong. The frame carrying that prompt was sent, arrived, and was sitting unread in the client's socket: instrumenting the mismatch printed `drained 1 more queued messages` and then `same after drain: true`. `pumpUntil` returns the instant it decodes the message it was asked for and abandons the rest of the burst, while every `pump` presents one frame. One `c.wait(5)` that times out — and under a loaded test binary one does — buys a second pump before the first frame is read, and from there the client is one frame behind for the rest of the test. Harmless while the only thing in that frame is nothing; a cell that differs the moment a forked shell writes its prompt. So the assertion was comparing the core's NOW against the frontend's THEN, and the fix is the one this file already made for two frontends: converge. `pumpUntilShowsCore` is `pumpUntilSameScreen` with one client instead of two — pump, wait, drain EVERYTHING, compare — checked before the first pump so a test already in sync spends nothing, and handing its last comparison to `expectSameScreen` so a transport that genuinely drops a cell still fails by naming it rather than by timing out. Both single-frontend screen assertions take it; the two-frontend one already had its own. 8/8 clean gui runs against 3-failures-in-5 before, and the tty suite's 457 unchanged.
Diffstat (limited to 'src/linux/v9fs.zig')
0 files changed, 0 insertions, 0 deletions