test: no daemon test drives DECSET 2048 through the real parser/drain_effects/reconcile wiring #213

Closed
opened 2026-09-08 01:05:24 +09:00 by natsukium · 0 comments
Owner

All three new session_task 2048 tests use the set_mode_2048 helper
(crates/felis-daemon/src/session_task.rs, around line 3516), which builds a fresh
felis_vt::Parser and calls parser.advance directly on the locked grid, then calls
task.sync_resize_notify_to_pty() by hand — bypassing SessionTask::drain_effects
entirely, which is the code path that actually sets resize_notify_dirty (around line
1662) when real PTY input is parsed.

No test exercises the true production trigger: a DECSET 2048 written to the real PTY
causing the run loop's own drain_effects -> reconcile sequence to fire.

This mirrors the pre-existing test convention for mode 2031
(mode_2031_reports_effective_scheme_changes_before_the_keystroke, around line 3072,
does the identical direct-parser bypass), so it is not a novel style gap. But it does
mean the acceptance criterion "answers the set with one immediate report" is pinned only
at the unit level and never through the actual I/O wiring a real client exercises.

Correction: add one daemon test that writes the raw escape bytes through the session's
real input path (the same path press_key / resize_to use) so the
drain_effects -> resize_notify_dirty -> reconcile chain is exercised end to end at
least once.

Reason deferred from #189: it mirrors the pre-existing mode 2031 convention, is not a
regression introduced by that change, and the stated acceptance criteria are met at the
unit level. A real coverage gap worth its own ticket rather than a blocker on that PR.

Split from #189.

All three new `session_task` 2048 tests use the `set_mode_2048` helper (`crates/felis-daemon/src/session_task.rs`, around line 3516), which builds a fresh `felis_vt::Parser` and calls `parser.advance` directly on the locked grid, then calls `task.sync_resize_notify_to_pty()` by hand — bypassing `SessionTask::drain_effects` entirely, which is the code path that actually sets `resize_notify_dirty` (around line 1662) when real PTY input is parsed. No test exercises the true production trigger: a DECSET 2048 written to the real PTY causing the run loop's own `drain_effects` -> `reconcile` sequence to fire. This mirrors the pre-existing test convention for mode 2031 (`mode_2031_reports_effective_scheme_changes_before_the_keystroke`, around line 3072, does the identical direct-parser bypass), so it is not a novel style gap. But it does mean the acceptance criterion "answers the set with one immediate report" is pinned only at the unit level and never through the actual I/O wiring a real client exercises. Correction: add one daemon test that writes the raw escape bytes through the session's real input path (the same path `press_key` / `resize_to` use) so the `drain_effects` -> `resize_notify_dirty` -> `reconcile` chain is exercised end to end at least once. Reason deferred from #189: it mirrors the pre-existing mode 2031 convention, is not a regression introduced by that change, and the stated acceptance criteria are met at the unit level. A real coverage gap worth its own ticket rather than a blocker on that PR. Split from #189.
Sign in to join this conversation.
No description provided.