Skip to content

test: termlens 0.10.1, and the invariant the PTY suite rests on - #42

Merged
vyncint merged 1 commit into
mainfrom
termlens-0.10.1
Sep 8, 2026
Merged

vyncint merged 1 commit into
mainfrom
termlens-0.10.1

Conversation

@vyncint

@vyncint vyncint commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Upgrades the PTY harness from 0.9 → 0.10.1 (with the serde feature) and adds the checks 0.10 made possible. Last of the four ecosystem repos; oxidelake, launchbound and reconverge are done.

oxmera-cli: 25 passed, 4 ignored (the CLI suite, run by name). fmt and clippy --workspace --all-targets --all-features clean.

tests/emulation.rs — the invariant everything else rests on

Every screen assertion in this crate reads a grid a VT emulator produced from the binary's bytes. A sequence that emulator does not implement makes the grid quietly wrong and every assertion a claim about a plausible-looking fiction. The measured answer is one SGR 59 — ratatui's underline-colour reset, which changes no cell — at both geometries the suite uses (100×45 and 80×30, each a fresh spawn). insert_mode, the bell counts and mouse_modes are pinned beside it.

The rest

  • tests/report.rs and tests/styles.rs assert what the dashboard says in colour alone — the loss and accuracy sparklines are pinned to their own colour per row, so a swap fails on the offending row by name rather than as one changed cell inside a whole-screen diff.
  • tests/termlens_cli.rs drives termlens-cli at the version the lockfile names, so tool and library are one release. #[ignore]d, because oxmera is published and a cargo test that installs a tool behind a contributor's back is a surprise a published crate should not spring; CI runs them explicitly.
  • The vendored agent skill is refreshed to 0.10.1, and check-skill-version.sh fails when that copy and the dependency disagree on major.minor — it had drifted two releases with nothing to notice.
  • CI writes TERMLENS_ARTIFACT_DIR and renders failures into the job summary via termlens's report action (SHA-pinned).

Two notes

The 11 GPU tests that fail locally are pre-existing and unrelated. I verified this rather than assuming it: the same 11 (matmul_matches_cpu_including_batch_broadcast, upload_download_roundtrip, fused_adam_step_… and the rest) fail identically on a clean main worktree at 60a0802, untouched. They are device tests on a box with no GPU.

One thing needs a repository admin, not a commit: the new skill version CI job has to be added to this repo's branch-protection required-checks list, or it can fail without blocking a merge — which would make it decorative. Flagging rather than assuming it is handled.

What the adversarial review changed here

Two verifiers audited this before it became a PR. One real finding: styles.rs ended with an assert_ne! that the loss and accuracy sparklines are different colours — but the two loops directly above it had already pinned each series to a specific colour, so comparing those same cells could not fail. Removed, with the reason recorded: a swap already fails in the loops, by name and on the offending row, which is the better failure anyway.

They also caught two claims I would otherwise have put in this description — that the 80×30 measurement followed a live resize (it does not; emulation.rs spawns fresh at each geometry) and that the upgrade fixed seven breaking changes (termlens 0.10.0 lists six). Neither appears above.

The harness moves from 0.9 across the CLI's PTY tests, and the suite gains
the checks 0.10 made possible.

`crates/oxmera-cli/tests/emulation.rs` pins `Screen::unsupported()` exactly.
Every screen assertion in this crate reads a grid a VT emulator produced from
the binary's bytes, so a sequence that emulator does not implement makes the
grid quietly wrong and every assertion a claim about a plausible-looking
fiction. The measured answer is one `SGR 59` — ratatui's underline-colour
reset, which changes no cell — at both geometries the suite uses, each a
fresh spawn. It pins `insert_mode`, the bell counts and `mouse_modes`
alongside it.

`tests/report.rs` and `tests/styles.rs` assert what the dashboard says in
colour alone: the loss and accuracy sparklines are pinned to their own
colours per row, so a swap fails on the offending row by name rather than as
one changed cell in a whole-screen diff.

`tests/termlens_cli.rs` drives termlens-cli at the version the lockfile
names, so tool and library are one release. Its four tests are `#[ignore]`d
because oxmera is published and a `cargo test` that installs a tool behind a
contributor's back is a surprise a published crate should not spring; CI runs
them by name.

The vendored agent skill is refreshed to 0.10.1, and check-skill-version.sh
fails when that copy and the dependency disagree on major.minor — it had
drifted two releases with nothing to notice. The same script also compares
the `cli-version` literals in the workflows against the manifest, because a
version pinned beside a dependency is a pin that goes stale silently.

CI writes TERMLENS_ARTIFACT_DIR and renders failures into the job summary.

Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
@vyncint
vyncint merged commit 4882818 into main Sep 8, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant