Registry Mirror
Skip to content

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Summary

Follow up on #1134: the suspension test isolated its runtime directory but still used the shared default daemon port. During local review, an existing older daemon caused the test to fail before the suspension behavior could be verified.

  • Reserve a free loopback port and explicitly share it between the PTY app and session CLI.
  • Capture CLI stderr, reject nonzero exits, and bound CLI execution to 10 seconds.
  • Confirm registration before suspending the window.
  • Add an empty maintenance Changeset; no production behavior changes.

Verification

Tested on Linux:

  • bun run test:integration — 250 passed, 1 macOS-only test skipped; includes the real 62-second suspension test without an external port override.
  • bun run typecheck — passed.
  • bunx oxlint test/pty/lifecycle.test.ts --deny-warnings — passed.
  • git diff --check — passed.

Not tested on macOS or Windows. The test remains Unix-only. Full unit and TTY smoke suites were not rerun for this test-only follow-up.

This PR description was generated by Pi using GPT-6.1 Sol

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
hunk-web Ignored Ignored Preview Oct 13, 2026 2:42am UTC

Request Review

@benvinegar
benvinegar enabled auto-merge (squash) October 13, 2026 02:32
@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Low impact] Test isolation for suspension test daemon port.

This test-only PR appears safe to merge, with a non-blocking fix recommended for the early registration check.

Findings

  1. P2 Slow startup fails the test ▶
Fix with agent prompt
### Issue 1
test/pty/lifecycle.test.ts:381-383
If daemon startup takes longer than the 2-second sleep, this new one-shot check can fail before suspension is tested. The page does not await `hostClient.start()`, and startup allows 3 seconds plus retries. Meanwhile, `session list` returns an empty list if the daemon or window is not ready.

Poll for the expected session with a bounded deadline before suspending. Keep the later checks immediate so they still catch a lost session.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This test-only change gives the suspension test its own loopback port and shares it between the page and CLI.

  • The suspension test checks its own daemon before and after the job stops.

Reviews (1) · Last reviewed commit: "test(pty): isolate suspension test daemo..." · Reviewed by Greptile

Comment thread test/pty/lifecycle.test.ts Resolved
@benvinegar
benvinegar force-pushed the fix/suspension-test-isolation branch from bdb0304 to 9aa5fcf Compare October 13, 2026 02:42
@benvinegar

Copy link
Copy Markdown
Member Author

Rebased onto latest main and pushed with force-with-lease. The Linux packaging failure was the README copy mismatch inherited from main; latest main already synchronizes it, so no additional README change was needed. bun run build:npm and bun run check:pack now pass locally, along with typecheck, lint, and all 7 Linux lifecycle tests (1 macOS-only skip). Greptile’s startup-race finding is fixed in 9aa5fcf.

This comment was generated by Pi using gpt-6.1-sol

@benvinegar
benvinegar merged commit 9f09f33 into main Oct 13, 2026
15 checks passed
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