Skip to content

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

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

test: termlens 0.10.1, and the invariant the PTY suite rests on#19
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. The break itself was small: drag takes four column-first arguments now instead of two coordinate pairs, so a transposed find result cannot be handed to it by mistake.

134 tests pass. fmt, clippy --workspace --all-targets --all-features, and the full suite are clean locally.

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

Every screen assertion in this repository reads a grid a VT emulator produced from the binary's bytes. If the binary emits a sequence that emulator does not implement, the grid is quietly wrong and every assertion becomes a claim about a plausible-looking fiction. 0.10 made it checkable, and the measured answer is one SGR 59 — underline colour, which changes no cell. Pinned exactly, so anything joining that list has to be read before the suite is trusted again.

The four blink/strikethrough entries that termlens#320 reports as unsupported despite being implemented are named in the test as the known false positives they are, rather than pinned as if real.

A coverage gap this found

crates/oxidelake-runtime/tests/oxide_tui_pty.rs is new. oxidelake-tui is tested through oxidelake-tui-demo, a binary that exists for the tests — but what people install is oxide, and oxide tui renders the same model behind clap, #[tokio::main] and a tracing_subscriber writing to stderr. tests/cli.rs drives the other subcommands with assert_cmd, which captures pipes and therefore cannot see that in a terminal stdout and stderr are one stream: a log line lands on the dashboard, and a program that never restores the terminal leaves the user's shell in the alternate screen. Only a PTY test can see either.

The rest

  • crates/oxidelake-tui/tests/termlens_cli.rs drives termlens-cli at the version the lockfile names, so the tool and the library are one release.
  • 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. skill-version is registered in ci-policy.py's always-run set, with tests.
  • CI writes TERMLENS_ARTIFACT_DIR and renders failures into the job summary via termlens's report action (SHA-pinned).
  • __pycache__ is gitignored — the Python scripts under .github/scripts have always produced it and nothing excluded it.

The harness moves from 0.9. The upgrade itself is small — `drag` takes four
column-first arguments instead of two coordinate pairs, so a transposed
`find` result cannot be handed to it by mistake — but 0.10 brings the
accessor this suite was missing.

`crates/oxidelake-tui/tests/emulation.rs` pins `Screen::unsupported()`
exactly. Every screen assertion in this repository 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` — underline
colour, which changes no cell. The four blink/strikethrough entries that
termlens#320 reports as unsupported despite being implemented are noted in
the test rather than pinned as if they were real.

`crates/oxidelake-runtime/tests/oxide_tui_pty.rs` is the coverage gap this
found. `oxidelake-tui` is tested through `oxidelake-tui-demo`, a binary that
exists for the tests; what people install is `oxide`, and `oxide tui` renders
the same model behind clap, tokio and a tracing subscriber writing to stderr.
`tests/cli.rs` drives the other subcommands with assert_cmd, which captures
pipes and cannot see that in a terminal stdout and stderr are one stream — so
a log line lands on the dashboard and nothing was watching.

`crates/oxidelake-tui/tests/termlens_cli.rs` drives termlens-cli at the
version the lockfile names, so the tool and the library are one release.

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. `skill-version` is registered in
ci-policy.py's always-run set, with tests. CI writes TERMLENS_ARTIFACT_DIR and
renders failures into the job summary.

Also gitignores __pycache__, which the Python scripts under .github/scripts
have always produced and nothing excluded.

Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
@vyncint

vyncint commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

Updated after adversarial verification. Two independent verifiers re-ran every gate and audited the diff; both returned problems, and two were real:

  1. crates/oxidelake-runtime/tests/oxide_tui_pty.rs would have shipped broken. cargo package -p oxidelake-runtime --list included the test but not the snapshot it reads — that file lives in the sibling oxidelake-tui crate, which is deliberate (two independent snapshots of the same frame would drift together silently) but does not exist once this crate is unpacked on its own. Anyone running cargo test on the vendored source would have hit a missing file, and neither test was #[ignore]d. Fixed by excluding the file from the published archive: it still runs in the workspace (2 passed), and cargo package --list no longer carries it.

  2. ADR-0011 and CHANGELOG.md disagreed about the starting version — the ADR said "0.6 → 0.10", the changelog "from 0.9". Both were defensible readings (the ADR's own body still recorded 0.6.1 from when the decision was taken) and a reader could not tell which was right. The ADR now says what happened: the manifest was at 0.9, and the ADR's record had gone stale.

Also gitignores __pycache__, which the Python scripts under .github/scripts have always produced and nothing excluded — it turned up as an untracked directory while staging.

Gates re-run after the fixes: fmt, clippy --workspace --all-targets --all-features, 134 tests, and check-skill-version.sh all clean.

@vyncint
vyncint merged commit 5179c21 into main Sep 8, 2026
17 checks passed
@vyncint
vyncint deleted the termlens-0.10.1 branch September 8, 2026 21:17
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