test: pin DECSET 2048 through the real run-loop wiring #229

Merged
natsukium merged 1 commit from issue-213 into main 2026-09-08 21:32:52 +09:00
Owner

The mode-2048 daemon tests all reached the mode through a helper that built a throwaway felis_vt::Parser, advanced it on the locked grid, and then called sync_resize_notify_to_pty() by hand. That skips SessionTask::drain_effects, the only place that raises resize_notify_dirty when real PTY input is parsed, so the acceptance criterion "a set is answered with one immediate report" was never pinned against the path a real program actually takes.

This adds one test that runs the true production trigger: the capture child prints \033[?2048h as its own PTY output, and the test drives the real run_session loop, so the parse sink, drain_effects, and the end-of-loop reconcile are all in the chain. Deleting the resize_notify_dirty = true line in drain_effects fails this test and no other, which is the coverage the existing tests lacked.

capture_session gained an emit prologue parameter so the child can write a sequence after stty raw -echo has landed; the existing caller passes "".

just check passes.

Fixes #213

The mode-2048 daemon tests all reached the mode through a helper that built a throwaway `felis_vt::Parser`, advanced it on the locked grid, and then called `sync_resize_notify_to_pty()` by hand. That skips `SessionTask::drain_effects`, the only place that raises `resize_notify_dirty` when real PTY input is parsed, so the acceptance criterion "a set is answered with one immediate report" was never pinned against the path a real program actually takes. This adds one test that runs the true production trigger: the capture child prints `\033[?2048h` as its own PTY output, and the test drives the real `run_session` loop, so the parse sink, `drain_effects`, and the end-of-loop reconcile are all in the chain. Deleting the `resize_notify_dirty = true` line in `drain_effects` fails this test and no other, which is the coverage the existing tests lacked. `capture_session` gained an `emit` prologue parameter so the child can write a sequence after `stty raw -echo` has landed; the existing caller passes `""`. `just check` passes. Fixes #213
test: drive DECSET 2048 through the run loop's own wiring
All checks were successful
bench / Criterion full-suite snapshot (pull_request) Has been skipped
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
bench / Criterion regression gate (pull_request) Successful in 2m34s
darwin / detect relevant changes (pull_request) Successful in 5s
darwin / darwin docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 51s
pr / nix flake check (pull_request) Successful in 38s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 1m36s
pr / wire schema is compatible with the base (pull_request) Successful in 14s
pr / cargo build / clippy / test / deny (pull_request) Successful in 2m37s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 1m8s
pr / publish felis (x86_64-linux) (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 3s
windows / windows docs-only no-op (pull_request) Has been skipped
windows / cargo nextest (Windows) (pull_request) Successful in 5m23s
windows / frontend smoke (Windows) (pull_request) Successful in 2m28s
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been skipped
windows / cargo clippy (Windows cross) (pull_request) Successful in 14s
ed780cec27
Every mode-2048 test built a throwaway parser, advanced it on the locked
grid, and called sync_resize_notify_to_pty by hand. That bypasses
SessionTask::drain_effects, which is the only thing that raises
resize_notify_dirty when real PTY input is parsed, so the promise "a set
is answered with one immediate report" was pinned nowhere against the
path a real program takes.

The capture child now emits the sequence itself and the test runs the
actual run_session loop, so the parse sink, drain_effects and the
end-of-loop reconcile are all in the chain. Dropping the
resize_notify_dirty assignment in drain_effects fails this test and no
other.

Assisted-by: Claude Code
natsukium deleted branch issue-213 2026-09-08 21:32:52 +09:00
Sign in to join this conversation.
No description provided.