Skip to content

fix(test): install the Rust PTY host before the test suites in a fresh checkout - #4848

Merged
devswha merged 3 commits into
mainfrom
fix/fresh-checkout-pty
Nov 27, 2026
Merged

devswha merged 3 commits into
mainfrom
fix/fresh-checkout-pty

Conversation

@devswha

@devswha devswha commented Nov 26, 2026

Copy link
Copy Markdown
Owner

What

Since the Node PTY sidecar was removed (#4826), a fresh clone or git worktree of main has no PTY host. bun run check fast there failed 29 unit tests (server/usage-login-outcome.test.ts, server/usage-account-list.test.ts, server/usage-login-private.test.ts, tui/testing/entry-pty.test.ts) and hung in usage-login-private.test.ts until the run was killed. CI is green only because setup-ci prepares the host (pty-host: 'true').

scripts/ci-tests.ts (test:unit, test:integration) now checks the host first, off Windows. When none runs, it runs the existing scripts/pty-sidecar.ts install: the release's binary for an unchanged crate tree, SHA-256 checked, else the tree's prerelease. If there is still no host, it stops with the server's own fix text (RUST_HOST_FIX) instead of failing those tests one by one. When OVIS_PTY_SIDECAR_BIN names the host, it installs nothing and only says the override does not run. The server's path and its error text are unchanged. CONTRIBUTING.md and docs/development.md say so.

CI is unaffected: every job that runs bun run check already has a host, so the probe passes and nothing is downloaded.

Validation

  • Reproduced on a fresh worktree of origin/main (e15e378): bun run check fast gave 29 failures and the hang (killed at 850 s).
  • Second fresh worktree at the first commit, with no bin/: the runner logged installed the Rust PTY host of release v0.5.11 ... bin/ovis-pty-sidecar. bun run check fast passed: unit 28844 pass, 0 fail.
  • After the review fix, bun run check fast in the worktree passed: unit 28844 pass, 0 fail. The branch was then rebased onto origin/main with no conflicts; check fast was not rerun after the rebase.
  • OVIS_PTY_SIDECAR_BIN=/nonexistent/host bun scripts/ci-tests.ts unit with an edited crate stops with the fix text, and bin/ovis-pty-sidecar keeps its SHA-256.
  • Reviews: omo gate and Codex (gpt-6.2-sol-fast, xhigh). In the first commit Codex found a MEDIUM: a broken OVIS_PTY_SIDECAR_BIN could make the runner remove the verified bin/ host. Both reviewers also flagged a wrong doc line. The second commit fixes both.
  • Not run: integration and browser suites (unchanged paths; CI covers them).

…h checkout

Since the Node PTY sidecar was removed (#4826), a fresh clone or worktree has no PTY host, so test:unit failed about 26 PTY tests and hung in server/usage-login-private.test.ts until check's deadline. The test runner now installs the release's host for an unchanged crate when none runs (scripts/pty-sidecar.ts install, the path install.sh and updates take), and stops with how to build one when there is none, instead of failing those tests one by one.
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Unit and integration test commands now check for the required PTY host and install it when needed. If it remains unavailable, they provide troubleshooting instructions.
  • Documentation
    • Updated setup and development guidance to describe PTY host handling for both test suites.

On non-Windows platforms, test:unit and test:integration now check for the Rust PTY host. The runner attempts installation when the host is unavailable and OVIS_PTY_SIDECAR_BIN is unset. If the host remains unavailable, it reports the probe reason and build instructions. Setup documentation now describes this behavior.

Changes: PTY Host Test Setup

Layer / File(s) Summary
PTY host preflight and setup documentation
scripts/ci-tests.ts, CONTRIBUTING.md, docs/development.md
The runner checks for the PTY host before both test suites. If the host is unavailable, it installs the host unless OVIS_PTY_SIDECAR_BIN is set, then probes again and reports the probe reason and fix instructions if still unavailable. The documentation describes the host setup behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • devswha/ovis#4826: Changes missing-host handling and the install guidance used by this runner.
  • devswha/ovis#1859: Adds the installer and release artifacts that this runner uses.
Merge Risk: Minimal · previous review 84d04

The test runner now installs the PTY host automatically in a fresh checkout and stops with build instructions when none is available. No concrete merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the test suites now install the Rust PTY host before running in a fresh checkout. It matches the scripts/ci-tests.ts change, the docs updates, and the PR objectives. I…
Description check Passed The description follows the template. It has a Change section that explains the problem (the removed Node PTY sidecar leaves fresh checkouts without a host), the resulting behavior (the probe, install…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the test suites now install the Rust PTY host before running in a fresh checkout. It matches the scripts/ci-tests.ts change, the docs updates, and the PR objectives. It is specific and descriptive, and it does not use vague terms.

Full details: Description check

Explanation

The description follows the template. It has a Change section that explains the problem (the removed Node PTY sidecar leaves fresh checkouts without a host), the resulting behavior (the probe, install, and fix-text stop in scripts/ci-tests.ts), and the affected docs. It has a Validation section that lists the commands run, their results, and the suites not run. It does not mention CONTRIBUTING.md's changelog.d entry or whether a changelog fragment was added, and it does not state a linked issue. These gaps are minor, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 1b0066f and 84d043f.

Files selected for processing: 3

  • CONTRIBUTING.md
  • docs/development.md
  • scripts/ci-tests.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Deploying ovis with  Cloudflare Pages  Cloudflare Pages

Latest commit: c121458
Status: ✅  Deploy successful!
Preview URL: https://9f2dcff9.ovis.pages.dev
Branch Preview URL: https://fix-fresh-checkout-pty.ovis.pages.dev

View logs

@devswha
devswha merged commit e26581f into main Nov 27, 2026
16 checks passed
@devswha

devswha commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head c12145890. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit reviewed this head.

main had moved since the checks of 84d043fe4: pr-merge --update merged it in (c4291c965), and every required check was green at this head.

It waited in the merge queue behind #4853, whose change overlaps it, before it was updated.

Reviews: CodeRabbit reviewed 84d043f (no threads); omo gate reviewer and Codex gpt-6.2-sol-fast xhigh on the first commit, their MEDIUM (a broken OVIS_PTY_SIDECAR_BIN could remove the verified bin/ host) and a wrong doc line fixed in the second commit, one fix round per the lane brief from the lead (lane fresh-checkout-pty).

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