Terminal I/O contract with PTY/ConPTY e2e coverage#52
Conversation
There was a problem hiding this comment.
💡 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}`); |
There was a problem hiding this comment.
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 👍 / 👎.
| const oversizedEvents = await collectEvents(harness, 60, (xs) => { | ||
| return findIndex(xs, (ev) => ev.kind === "paste") >= 0; | ||
| }); |
There was a problem hiding this comment.
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 👍 / 👎.
What
parseEventBatchV1in assertions@rezi-ui/node(node-pty,@xterm/headless)Why