test: keep the TTY publication test off real host terminal devices
Summary
Changing one TTY enqueues only that panel's empty lifecycle publication hung shard 3/7 (and earlier 2/7, 7/7) of main app-host unit tests since 2026-09-26: it hits the 300 s test limit, then the 1200 s xcodebuild idle timeout.
The xcresult spindump from main run 36685498203 shows why. The main thread is in PortScanner.registerTTY โ default ttySessionIdentityProvider โ TerminalTTYSessionIdentity(ttyName:) โ open("/dev/ttys00N"), blocked in the kernel spec_open on a turnstile owned by a zsh started by login 18 hours earlier. That zsh is itself stuck in open of its own tty. The test's fixture names ttys001โฆttys003 are real devices on a shared CI Mac, so the test depended on the health of unrelated login sessions on the runner.
The test covers publication buffering, not device identity. It now injects a session-identity provider, the same way PortScannerTTYFreshnessTests already do, so the TTY name change alone drives the new lifecycle revision.
Residual product note (not changed here): registerTTY still does the open(2) identity probe on the main actor. For cmux's own PTYs this has not been seen to block, but a wedged PTY would hang the UI the same way.
Testing
Swift syntax check passed locally. App-host tests don't run on this Mac; the full ci.yml suite on this branch is the evidence (run linked in a comment).
Changelog
none
๐ค Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Fixes the panel-scoped TTY publication test hanging on CI by injecting a session-identity provider, so the fixture names ttys001โฆttys003 no longer trigger real /dev/ opens that could block on wedged login sessions. The test now depends only on the name change, matching the sibling freshness tests.
Summary by CodeRabbit
- Tests
- Updated a test to avoid opening fixture TTY device paths while preserving its panel-scoped publication checks.