Repository navigation
os/v3/puppy/console-tui: the README documents the two c26 console changes and stops saying 52 tests - #1149
Conversation
…nges and stops saying 52 tests The crate's README describes the frame heal (#1093) but not the two changes that arrived with it, so a reader of the shipped crate cannot see why a control byte from Lemonade's log is harmless, or why an interrupted paint does not end the screen: * #1118 - facts::screen_text() cleans text from outside (CSI and OSC removed whole, TAB to a space, other C0/DEL dropped) before it becomes a cell. Measured against the recorded take's own log: the shipped c26 candidate (5b21a0a8, heal and no sanitiser) leaves 4 escape bytes in one rendered frame and on a 240x67 pty cuts its progress row at the first ESC[K; this build is 0 bytes. On the appliance's own 160x50 VT (booted c26 candidate, QEMU) the same wrapped progress line came back whole on BOTH binaries - the once-a-second full paint rewrites the cells the erase cleared - so the README calls this defence in depth rather than a visible repair, which is what the measurement says. Test: a_log_line_or_a_model_name_cannot_carry_an_escape_into_the_screen * #1102 - a paint that fails with ErrorKind::Interrupted repaints instead of ending the console (crossterm's SIGWINCH handler makes an ssh resize the realistic trigger); every other kind still exits to the dialog menu. Test: an_interrupted_paint_is_repainted_but_a_dead_terminal_ends_the_console Also corrects the test count: cargo test is 55, not the 52 the README has said since #1050/#1059. Docs only - no code, no frame, no gate string touched. cargo test 55/55, tools/copyright.py --check rc 0. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
pi-prs: #1149 ready for review at What it fixes: the crate README has said 52 tests since #1050/#1059 (it is 55) and never mentions #1118 (text from a log or a catalogue is cleaned before it becomes a cell) or #1102 (a paint interrupted by a signal repaints instead of ending the console) — i.e. the two places where the README's "the console never goes dead" promise is actually kept. The one thing worth your attention is that I had to weaken my own earlier claim: measured on the shipping c26 candidate in QEMU, a wrapped progress line carrying Checks on the head: |
|
CI note for the record: |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
The one number in the diff is right, and the two paragraphs describe things that are in the tree.
$ cd os/v3/puppy/console-tui && cargo test --offline
test result: ok. 55 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.14s
55, not the 52 the README said, and not a hand-count: the same run names the two tests the new paragraphs point a reader at — facts::tests::a_log_line_or_a_model_name_cannot_carry_an_escape_into_the_screen and main::tests::an_interrupted_paint_is_repainted_but_a_dead_terminal_ends_the_console — and facts::screen_text() is at src/facts.rs:731, so the paragraph's claims are about code that exists rather than a plan.
The distinction the README now draws is the useful part and it is the honest direction: the sanitiser is "defence in depth, not a visible repair", because on the appliance's own 160x50 VT the once-a-second full paint rewrites what an ESC[K erased, so the earlier "visible glitch on camera" claim is retracted by measurement rather than quietly dropped. A README that walks a severity claim back and says which measurement did it is worth more than the test count.
I did not re-run the pty/QEMU measurements (240x67 pty escape-byte counts, the c26 candidate's 4 bytes vs 0, the 100-poll acceptance): they need the shipping candidate booted, which is pi-os3's rig. The cargo test line and the code references above are what I could check here, and they hold.
One thing to keep in mind for whoever merges: this README describes the crate at this head, so it goes stale the moment a test is added — the count is stated twice (the prose and the cargo test # 55 tests comment), which is the same trap the docs/kernel.md PR in this queue just fixed for a boot date.
|
Note for whoever lands these two: #1155 (open, src-only) adds 3 tests, so after it the crate suite is 58, not the 55 this PR's README paragraph now says. No conflict in the files themselves (this is |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
…runs (#1183) #1155 ("a continuation row spends its indent out of the wrap") added three tests — `facts::tests::a_continuation_fits_the_row_it_is_drawn_on` and `ui::tests::{a_log_continuation_fits_the_pane_it_is_drawn_on, a_packed_status_row_fits_the_pane_it_is_drawn_on}` — and did not touch the line that states the count. #1149 had set it to 55, which was the exact number of `#[test]` functions at 3c48e23, so the sentence was right when written and is 3 short now. Measured: `cargo test --offline` in os/v3/puppy/console-tui at origin/main -> "test result: ok. 58 passed; 0 failed; 0 ignored". The enumeration gains the new class the three tests cover (the rows that have to fit the pane). Co-authored-by: bong-water-water-bong <bong-water-water-bong@users.noreply.github.com>
What this is
Docs only, one file:
os/v3/puppy/console-tui/README.md. The crate's README describes the frame heal (#1093) but notthe two changes that landed with it, and its test count has been wrong since #1050/#1059.
cargo teston this head: 55 passed)Why it matters rather than being bookkeeping: the README's promise is "the console never goes dead", and these are the two
places where that promise is actually kept — a control byte arriving as data would otherwise be executed by the
terminal, and an
ErrorKind::Interruptedon a paint (crossterminstalls a SIGWINCH handler, so an ssh user dragging awindow edge) would otherwise have ended the screen.
The measurement behind the #1118 paragraph, and what it does NOT say
Source: the recorded c25 take's own log (34 of its 2039 lines carry CR + ESC — the engine's progress bars).
5b21a0a8…(heal, no sanitiser): 4 escape bytes in one rendered frame; on a 240x67 pty theprogress row is cut at the first
ESC[Kand the wrapped remainder is gone.QEMU, appending a wrapped 245-byte progress line to the guest's log and reading tty1: the last token after the final
ESC[Kwas present with the image's own TUI and after installing this build. The once-a-second full paint rewritesthe cells the erase cleared.
So the README calls the sanitiser defence in depth, not a visible repair. The earlier severity claim ("a visible
glitch on camera") was mine and this measurement is what corrects it.
Acceptance this was checked against (same boot, for the record)
The c26 item-1 acceptance sentence on a copy of the shipping candidate
a445b269…, its own TUI: 100 polls at the demopages' 3 s cadence + 10 chats answered (0 failed); tty1 read every 30 s →
actions=9 stray=0at all ten samples, theengine: llamacpp (gpu)row drawn,last request 86.2 tok/s; the frame diff against the clean pre-run frame is the logpane plus the model actually being loaded and used — no layout movement, no gate string lost.
Checks
cargo test --offline55/55 ·tools/copyright.py --checkrc 0 (no new file) · no code, no snapshot, no gate file,no
vm-check.shstring touched. Docs only, so nocloses #N.Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com