Skip to content

Terminal I/O contract with PTY/ConPTY e2e coverage#52

Merged
RtlZeroMemory merged 9 commits into
mainfrom
epic-01-terminal-io-contract-pty-gate
Feb 13, 2026
Merged

Terminal I/O contract with PTY/ConPTY e2e coverage#52
RtlZeroMemory merged 9 commits into
mainfrom
epic-01-terminal-io-contract-pty-gate

Conversation

@RtlZeroMemory

@RtlZeroMemory RtlZeroMemory commented Feb 13, 2026

Copy link
Copy Markdown
Owner

What

  • adds a terminal input contract document that defines expected behavior from terminal bytes to parsed events
  • adds deterministic PTY integration tests for keyboard, paste, focus, mouse, resize, and split-read behavior
  • adds Windows ConPTY-guarded coverage while keeping Linux CI coverage meaningful
  • parses every emitted batch with parseEventBatchV1 in assertions
  • adds e2e test dependencies in @rezi-ui/node (node-pty, @xterm/headless)

Why

  • makes terminal input behavior explicit, stable, and test-backed at the product boundary
  • prevents regressions in byte decoding and event normalization across platforms

@RtlZeroMemory RtlZeroMemory changed the title EPIC-01: Terminal I/O contract with PTY/ConPTY e2e coverage Terminal I/O contract with PTY/ConPTY e2e coverage Feb 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0094eab5a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

await delay(50);
continue;
}
t.skip(`terminal-io-contract harness unavailable: ${detail}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fail when harness creation errors occur

This helper marks the test as skipped for any ContractHarness.create error, including real regressions (for example target fatal/startup failures), so the suite can pass without ever validating the terminal I/O contract. In CI this turns genuine breakages into skipped tests instead of failures, which defeats the purpose of this coverage.

Useful? React with 👍 / 👎.

Comment on lines +748 to +750
const oversizedEvents = await collectEvents(harness, 60, (xs) => {
return findIndex(xs, (ev) => ev.kind === "paste") >= 0;
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prevent blocking wait in no-event oversized paste check

This assertion path calls collectEvents, which repeatedly awaits pollOnce; pollOnce blocks until an event batch exists, so when oversized paste is correctly dropped (as the comment expects) there may be no batch at all and the test can hang until the global timeout. Negative checks here need a bounded timeout or a non-blocking poll strategy instead of waiting for an event that may never arrive.

Useful? React with 👍 / 👎.

@RtlZeroMemory
RtlZeroMemory merged commit ec357af into main Feb 13, 2026
10 of 16 checks passed
@RtlZeroMemory
RtlZeroMemory deleted the epic-01-terminal-io-contract-pty-gate branch February 13, 2026 14:37
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