test: termlens 0.10.1, and the invariant the PTY suite rests on - #42
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades the PTY harness from 0.9 → 0.10.1 (with the
serdefeature) 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-featuresclean.tests/emulation.rs— the invariant everything else rests onEvery 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 andmouse_modesare pinned beside it.The rest
tests/report.rsandtests/styles.rsassert 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.rsdrivestermlens-cliat the version the lockfile names, so tool and library are one release.#[ignore]d, because oxmera is published and acargo testthat installs a tool behind a contributor's back is a surprise a published crate should not spring; CI runs them explicitly.check-skill-version.shfails when that copy and the dependency disagree on major.minor — it had drifted two releases with nothing to notice.TERMLENS_ARTIFACT_DIRand renders failures into the job summary via termlens'sreportaction (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 cleanmainworktree at60a0802, untouched. They are device tests on a box with no GPU.One thing needs a repository admin, not a commit: the new
skill versionCI 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.rsended with anassert_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.rsspawns fresh at each geometry) and that the upgrade fixed seven breaking changes (termlens 0.10.0 lists six). Neither appears above.