Repository navigation
Add direct FIRE cases for libvt - #195
Merged
Merged
Conversation
why: An orchestrator needs to tell working state, published state, and reply bytes apart when terminal input arrives in fragments. what: - Replay whole actions and single bytes against the same expectations. - Prove the cursor and publication checks catch one wrong result each. - Rebuild a replica from foreign and stale tokens, then apply a delta.
why: Give contributors the command and protocol rules for rerunning the cursor, publication, and recovery checks. what: - Show the cursor vector as a tested example. - Describe which comparisons the two faults trip.
why: Draining the primary first can hide a reply queue shared by two terminals. what: - Check the peer's working view and reply queue before draining the primary reply.
why: A stale replica must visibly change during a rebuild. Keep feed bytes and observations available after pytest exits. what: - Restore the primary rows over a replica holding alternate rows. - Save named results and concrete feeds from each test attempt. - Show how to find and replay the saved cases.
why: Pytest creates the base directory without creating its parent. A clean checkout has no .pytest_cache. what: - Use a standalone evidence directory in both commands. - Explain that pytest clears a base directory when it already exists.
why: Cover parser, screen, reply, and replica behavior with enough independently specified vectors to catch failures across those boundaries. what: - Add 144 authored behavior vectors through Terminal's public API. - Check named snapshots, cell fields, replies, and applied replica rows. - Keep exact feed calls and expected and observed values per attempt.
why: Make the scope and the recorded evidence discoverable. what: - Count behavior vectors separately from delivery schedules and controls. - Cite the protocol editions and identify each demonstrated fault.
This branch was successfully deployed
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.
Closes #194
What changed, and why
An orchestrator can read a new working row while libvt still exposes the previous committed row. The direct FIRE suite exercises 210 distinct behaviors spanning parsing and Unicode, cursor and margins, grid edits, rendition, replies, buffers, synchronized output, replicas, application input encoding, and resize.
Each byte-driven vector reads the same checkpoints after whole-action or one-byte feeds. Nine input-only vectors encode a semantic event once. A short cursor move trips only
cursor_after_move. Dropping the synchronized release trips onlycommitted_after_release. The replica starts with alternate-screen rows and must replace them with primary rows before it applies another incremental update.Each attempt writes
fire.jsonwith its exact feeds, profile, and named expected and observed values. The testing guide cites the rules behind the expectations and gives commands to find a report and replay its test. A committed consumer must see a green repaint even when the word stays the same. A resize invalidates a token acquired at the old geometry. Case families, sources and replay instructionsChecks run
The direct selection ran 415 items. Of 210 subject vectors, 201 ran under two feed schedules and nine ran once. Two deliberately damaged-witness controls ran under both schedules. All 415 passed in a fresh CPython 3.14.6 environment with subprocess creation blocked. The full project run passed 782 with one optional skip.
Ruff lint and format checks, ty, the full pytest suite, and
just build-docspassed on Linux with CPython 3.14.6. The direct cases also passed on CPython 3.12.3 with no tmux, no libtmux, and an audit hook blocking child launches. A simulated shared reply queue failed peer isolation. Skipping the stale-epoch rebuild left the replica onALTand failed recovery. Both faults failed under both delivery schedules. Separate mutations also caught returned stale tokens, a same-word repaint omitted from the replica, an attached hyperlink after close, dropped keyboard flag bits and an old geometry token accepted after resize. The two schedules recorded identical concatenated inputs and observations, and a recorded pytest node replayed successfully.Tool use
Codex wrote the tests and guide from protocol references and libvt's public contracts. It ran the fault controls and checked the saved records against the inputs and expected values.