You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
### 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.
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
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
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.
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.
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