pmacs/tests
Levi Neuwirth 899aaf2249
fix(frontend): honor full_grid — the flag existed and nothing read it
Zooming a terminal with Ctrl +/- left the TUI showing the previous
frame through the new one. Q#FG1 = A, as approved.

THE RULE WAS ALREADY WRITTEN DOWN, ON A PRIVATE FIELD.
src/instance_render.rs:36 says remote frontends "must blank their local
buffer before applying the deltas" — the binding contract, in the one
place a consumer author will never look. The protocol type said only
that full_grid marks "the initial sync ... versus an incremental
frame": a label, from which no obligation follows. So FG-INV now lives
on InstanceMessage::CellDelta, where whoever writes the next frontend
reads it. A resync is a picture of the screen's INK, not of the screen.

The producer diffs against a blank grid, so a cell that should be blank
produces no span. src/frontend.rs then took `CellDelta { spans, .. }`
and discarded the flag. That was correct for exactly one frame — the
fresh-attach frame, which follows Frontend::new's Clear — and wrong for
every resize after, which follows nothing. A font-size change is the
worst case because the terminal reflows in place rather than dropping
content, so the maximum number of stale glyphs survive.

emit_cell_delta joins emit_span and emit_status_overlay as a pure
helper over a writer; apply_message routes through it. No struct
change, no generic parameter, no new pattern.

WHY SEVEN TESTS MISSED IT. Every one asserts the producer SETS the
flag; none asserted a consumer ACTS on it, and no runtime reader
existed workspace-wide. "Add a test for the flag" had already been
done and did not help. Handoff §5's enforcement-vs-documentation drift,
in a second register.

Three unit witnesses, each bitten independently. The empty-spans case
earns its own test rather than folding into the others: under the
plausible `spans.is_empty()` early return the ordering test still
PASSES and only that one fails — and an empty resync is exactly the
frame whose entire content is the blanking.

The PTY acceptance drives a real SIGWINCH, and its mark is anchored to
CONTENT rather than time. A time-based settle was written first and is
unusable: a settled pmacs screen emits per-frame bytes forever, so
"output stopped growing" never becomes true. Anchoring just past the
first painted byte excludes both startup clears by construction —
Frontend::new clears before any frame exists, and the first frame is
itself a resync whose clear precedes its own spans. Bitten against the
original defect: 34,831 bytes after the first painted frame, no CSI 2 J
anywhere in them.

What it does not prove, stated here rather than found in review: the
suites assert on raw bytes, with no screen model and no vt100/termwiz/
vte dependency. This shows pmacs emitted a blank at the right moment,
not that the screen ended correct.

Verified: fmt, clippy, diff-check, --lib 1900/0, crdt 2085/0, m4 150/0,
gpu 221/0, and the grid-driving suites — full_grid_resync 1/1, vterm
1/2/3 9+9+5, m5_5 15, m5_8 5, bottom_panel_stage1 47.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 15:05:59 +02:00
..
common test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
fixtures V0.2-prerequisite pull-forward + M10.11 clean audit round 2026-05-18 10:31:31 -04:00
support docs: record the pipe-masking gate trap in the handoff 2026-07-29 12:25:29 -04:00
acceptance.rs Collapse if-let nests into let-chains (MSRV-1.95 collapsible_if sweep) 2026-05-18 14:29:36 -04:00
ambient_isolation_acceptance.rs fix(isolation): the isolation suite must not itself be ambient 2026-07-31 19:46:18 -04:00
auto_indent_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
auto_indent_crdt_acceptance.rs fix(lint): make the crdt targets pass clippy for the first time 2026-08-01 09:38:36 -04:00
auto_pair_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
auto_pair_crdt_acceptance.rs feat(edit): auto-pairing (Arc 2) 2026-07-11 17:11:56 +01:00
autosave_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
bottom_panel_stage1_acceptance.rs test(panel): pin that the OMITTED default degrades on a pre-panel frontend 2026-08-03 11:16:08 -04:00
bottom_panel_stage2a_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
bottom_panel_stage2b_daemon_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
bottom_panel_stage2b_gpu_acceptance.rs fix(lint): make the crdt targets pass clippy for the first time 2026-08-01 09:38:36 -04:00
bottom_panel_stage2b_protocol_acceptance.rs feat(bottom-panel): split the GPU document bottom into three boundaries 2026-07-29 18:30:57 -04:00
comment_toggle_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
compile_mode_acceptance.rs feat(panel): flip the adopter default — Arc 7's last step 2026-08-03 11:10:14 -04:00
compile_mode_crdt_acceptance.rs review round 1: the crdt suite Stage 3 missed, and two stale explanations 2026-08-04 12:08:28 +02:00
completion_popup_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
config_registry_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
cua_region_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
desktop_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
dired_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
discovery_acceptance.rs fix(help): forwarders must work programmatically, not only from M-x 2026-07-31 20:31:00 -04:00
editops_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
find_file_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
folding_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
folding_stage2_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
full_grid_resync_acceptance.rs fix(frontend): honor full_grid — the flag existed and nothing read it 2026-08-06 15:05:59 +02:00
gpu_font_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
gpu_initial_target_acceptance.rs Implement session-scoped GPU initial targets 2026-07-23 19:03:25 -04:00
gpu_invocation_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
injection_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
journey_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
kill_ring_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
lean4_server_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
lean4_stage1_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
lean_input_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
listview_acceptance.rs fix(listview): ids must also be unique and not NaN 2026-08-05 23:06:25 +02:00
lsp_dispatch_seams_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
lsp_multi_root_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
lsp_spawn_guidance_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m3_acceptance.rs Initial commit: v0.1.0 2026-05-03 19:51:06 -04:00
m4_acceptance.rs test(listview): byte-identity for the flat consumers, and two findings 2026-08-05 16:31:31 +02:00
m5_5_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m5_6_acceptance.rs Initial commit: v0.1.0 2026-05-03 19:51:06 -04:00
m5_7_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m5_8_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m5_perf_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m6_4_repl_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m6_5_repl_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m6_7_scrollback_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m6_8_multi_repl_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m6_perf_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m7_3_acceptance.rs Fix CI and Documentation issues 2026-05-04 10:19:19 -04:00
m7_5_acceptance.rs fix(packages): basename-collision reject, SHA-256 cache key, timeout thread join, commit→revision, dead-code (F-005/F-009–F-012) 2026-07-03 18:47:23 -04:00
m7_6_acceptance.rs fix(packages): basename-collision reject, SHA-256 cache key, timeout thread join, commit→revision, dead-code (F-005/F-009–F-012) 2026-07-03 18:47:23 -04:00
m7_7_acceptance.rs M7 tail: package system, audit lint, lockfile, resolver 2026-05-07 16:50:37 -04:00
m7_8_acceptance.rs M7 tail: package system, audit lint, lockfile, resolver 2026-05-07 16:50:37 -04:00
m7_9_acceptance.rs M7 tail: package system, audit lint, lockfile, resolver 2026-05-07 16:50:37 -04:00
m7_10_acceptance.rs fix(packages): basename-collision reject, SHA-256 cache key, timeout thread join, commit→revision, dead-code (F-005/F-009–F-012) 2026-07-03 18:47:23 -04:00
m7_11_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m7_review_acceptance.rs M7 tail: package system, audit lint, lockfile, resolver 2026-05-07 16:50:37 -04:00
m8_1_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m8_1c_acceptance.rs M7 tail: package system, audit lint, lockfile, resolver 2026-05-07 16:50:37 -04:00
m8_1d_acceptance.rs M7 tail: package system, audit lint, lockfile, resolver 2026-05-07 16:50:37 -04:00
m8_2_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m8_3_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m8_5_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m8_6_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m8_7_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m8_9_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m8_10_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m9_1_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m9_2_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m9_3_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m9_4_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m9_5_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m9_6_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m9_7_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m9_8_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
m10_2_perf.rs M10.10 ship gate 2026-05-13 16:28:46 -04:00
m10_10_perf.rs M10.10 ship gate 2026-05-13 16:28:46 -04:00
m10_10_postcard_unknown_variant.rs M10.10 ship gate 2026-05-13 16:28:46 -04:00
m10_11_acceptance.rs M11.1: semantic-frontend protocol scaffolding (wire + capability) 2026-05-18 19:39:07 -04:00
m10_11_perf.rs M10.11: adversarial two-laptop acceptance + jitter; the M10 arc verified 2026-05-15 20:51:00 -04:00
m11_5_semantic_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
mode_system_wiring_acceptance.rs Keep the v21 panel wire dark for v20 clients 2026-07-28 14:08:17 -04:00
overlay_reattach_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
persistence_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
query_replace_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
resource_reconciliation_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
save_clobber_guard_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
statusline_segments_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
tab_width_acceptance.rs feat(fold): Stage 2 — grid (daemon-rendered) collapse 2026-07-23 19:24:07 -04:00
terminal_config_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
terminal_copy_mode_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
theme_faces_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
typed_edit_chain_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
vterm_stage1_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00
vterm_stage2_acceptance.rs fix(test): retire R2 and R4 — two readiness predicates weaker than their assertions 2026-08-05 13:41:05 +02:00
vterm_stage3_acceptance.rs fix(test): the GPU terminal suites measure geometry the flip changed 2026-08-04 18:00:58 +02:00
worker_shutdown_acceptance.rs test(isolation): migrate the corpus off the ambient roots 2026-07-31 18:48:45 -04:00