test: stop the CLI no-socket regression waiting 90 s for an app it never starts - #14334
Conversation
testLaunchCapableCommandsReachTheirDispatchPathWithoutLiveImplicitSocket took 90 s: restore and fork each waited the full 45 s for an app socket that the test deliberately never starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe CLI now supports a bounded restore socket startup timeout override through ChangesRestore socket startup timeout
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change preserves the default timeout, and the regression test uses the valid one-second override. No actionable current-head risk remains; it is ready to merge subject to normal checks. 🚥 Pre-merge checks | ✅ 24 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (24 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 too large.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 OpenGrep (1.30.0)CLI/cmux.swiftOpenGrep scan timed out 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. Comment |
e20651a ci: accept a bare count or a class in CI_OWNED_POOL_SLOTS (manaflow-ai#14340) b9060a0 ci: route CI helper and ci-macos.yml edits to the lanes that run them (manaflow-ai#14339) d7a119f ci: declare the queue janitor's workflow_run source file (manaflow-ai#14345) b11c6d9 ci: retry a refused owned job once on the fleet before Blacksmith (manaflow-ai#14325) 622e64e ci: keep the owned-pool snapshot fresh when the janitor cron drifts (manaflow-ai#14341) fa353a8 test: let the CLI no-socket test shorten the restore startup wait (manaflow-ai#14334) cb54edf ci: place each PR macOS job on a free owned mini, overflow the rest (manaflow-ai#14318) # Conflicts: # .github/workflows/ci-macos.yml # .github/workflows/ci-queue-janitor.yml # .github/workflows/ci.yml # .github/workflows/cli-pipe-regressions.yml # .github/workflows/remote-daemon.yml
|
Measured effect on CI after merge (01:14Z, 2026-09-25), from ci.yml "app-host unit tests (4/7)" jobs, test times read from the job logs.
Correction to the PR body: this test runs in shard 4's "Run unit tests" step, not in "Run CLI no-socket regressions". That step stayed at 218 to 252 s before and after. Six runs (three on each side, e.g. 36035977168, 36087977915) ran the test in 0.6 to 0.8 s and the suite in 8 to 13 s; they are a different selection and are excluded from both columns. Other merges landed in the same windows, so the step and job medians are not all attributable to this change; the test time is. Before run ids: 36027687674 36032040988 36036314182 36041784298 36043411778 36048715431 36049292327 36051706301 36055048824 36056333476 36056381503 36056804560 36058204322 36059281883 36061664233 36062245739 36065917642 36065922591 36067111220 36069812059 36070257306 36071110988 36074615385 36074752682 36075060865 36077788169 36079476920 36080335136 |
Why
In run 36075060865 (#10366),
testLaunchCapableCommandsReachTheirDispatchPathWithoutLiveImplicitSockettook 90.5 s of app-host shard 4's "CLI no-socket regressions" step (218 s). Itsrestoreandforkcases expectcmux is still opening, which the CLI reports only afterrestoreSocketStartupTimeoutSeconds(45 s) passes with no app socket. The test deliberately starts no app, so it waits 45 s twice.Change
CLI/cmux.swift:CMUX_RESTORE_SOCKET_STARTUP_TIMEOUT_SECONDScan shorten the wait, clamped to 0.05 to 45 s. It cannot lengthen it. This followsCMUX_DIFF_VIEWER_WAIT_TIMEOUT_SECONDSandCMUX_SSH_PTY_BRIDGE_READY_TIMEOUT_SECONDS. The default stays 45 s.still openingerrors and that the CLI never reportsNo live cmux socket found.Proof
CI's changed-suites lane runs
CMUXCLIErrorOutputRegressionTests; the test should drop from about 90 s to about 2 s. I typechecked the getter standalone: default 45, set to 1 gives 1, set to 999 gives 45.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Shortens the CLI no-socket regression test from about 90 seconds to about 2 seconds by letting tests override the restore startup timeout.
restoreSocketStartupTimeoutSecondsnow readsCMUX_RESTORE_SOCKET_STARTUP_TIMEOUT_SECONDS, clamped between 0.05 and 45 seconds; the default stays 45 seconds.Written for commit e00ab8a. Summary will update on new commits.
Summary by CodeRabbit
CMUX_RESTORE_SOCKET_STARTUP_TIMEOUT_SECONDS. Valid numeric values are limited to 0.05–45 seconds; missing, invalid, or non-finite values use the 45-second default.