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
{{ message }}
Repository navigation
test(wsl): measure distro restart to first output for the WSL host and an old-bridge lower bound - #34864
This adds a measurement to the real-WSL test run: after a WSL distro is stopped (the WSL VM itself stays up), how long until a terminal prints the output of a command? It compares a project on the new WSL host with a lower bound for the old way. It changes no shipped code.
What Changed
Phase 3 of wsl-orcad-e2e.yml (wsl-orcad-real-distro-idle-release-lane.test.ts) gains a second test, which runs after the idle-release check. First, one unrecorded warm-up run brings the WSL VM back up. Then it alternates three times between:
(a) WSL host:wsl --terminate, then manager.ensure (holder boots the distro, orcad deploys and starts, bridge pairs), terminal.create, and a printf whose output must appear in terminal.read. It records ensureMs, terminalCreatedMs and firstOutputMs.
(b) Old bridge, lower bound:wsl --terminate, then one non-PTY wsl.exe --exec into the login shell (picked the way Orca's WSL commands do, via buildWslLoginShellCommand, so rc files load), running the same printf. It records firstOutputMs. The real old bridge also starts ConPTY and paints a prompt, so this number undercounts it; treat it as a floor, not its first paint.
Medians go to the phase receipt under distroRestartToFirstOutput as medianHostFirstOutputMs, medianHostEnsureMs and medianBridgeExecLowerBoundMs, per distro family. The phase 3 step timeout rises from 15 to 30 minutes, and the WSL2 job cap from 30 to 40 minutes so it no longer cuts phase 3 short.
Why
The D3 bar "restart → first usable prompt at or below the bridge baseline" had no measured baseline. Running both paths on the same runner, alternated, keeps VM and cache warmth from favouring either one. What it measures is "distro restart with the VM warm → first command output", not a full machine reboot and not first paint.
Flag-off: this is test-only; nothing ships. User-risk: none; test and CI workflow only.
The workflow qualification and change-scope tests pass. The numbers come from this PR's WSL2 lane run. Earlier run (median of 3): ubuntu host ensure 4.8 s / first output 5.9 s / bridge exec floor 0.79 s; debian 4.3 / 5.4 / 0.59 s; fedora 3.4 / 4.3 / 0.43 s.
Automated tests added/updated
Status
Reviewer fixes applied: job cap raised to 40 min; names, receipt keys and this body relabelled. Rebased on main fe3eb45b857.
Checklist
This PR is small and focused
I explained what changed and why
N/A for visuals with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote impact considered
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (pnpm tc, typecheck:ci, touched tests, code-quality and anti-slop gates pass locally; CI runs the rest)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
Walkthrough
The change adds a Windows-only cold-start timing baseline for Orca’s host-managed terminal and the direct WSL login-shell bridge. The test warms the WSL VM, alternates three measurements per path, records timings and medians, and terminates the distro. The Phase 3 workflow step now names the baseline and has a 30-minute timeout. The WSL2 distro job timeout increases to 40 minutes.
Priority: Low
Merge Risk: Moderate · up to d1e9b
The WSL2 run can end before the new baseline finishes and writes its receipt. Increase the job’s time budget before merging.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly identifies the WSL restart-to-first-output measurement and the comparison with the legacy bridge lower bound.
Description check
The description is mostly complete. It explains the change, purpose, test method, reported results, visual-proof status, and testing status. It does not provide an actual linked issue URL or complete …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description is mostly complete. It explains the change, purpose, test method, reported results, visual-proof status, and testing status. It does not provide an actual linked issue URL or complete several optional template sections, but the core information is present.
Full details: Docstring Coverage
Explanation
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 1
📝 Generate docstrings: 💡
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
sed -n '145,365p' .github/workflows/wsl-orcad-e2e.yml
Repository: stablyai/orca
Length of output: 14247
Increase the wsl2 job timeout beyond the Phase 3 timeout.
The job allows 30 minutes total, while Phase 3 alone allows 30 minutes. Earlier steps have configured timeout ceilings of 38 minutes when WSL installation is skipped, or 46 minutes when it runs. The import step overlaps dependency setup, so these are not guaranteed elapsed times, but the job deadline can still cancel Phase 3 before its 30-minute timeout. The new 20-minute baseline can therefore be interrupted before it writes its receipt.
…d bridge
The real-WSL lane's phase 3 now terminates its distro and times, median of 3 each, how long a
WSL-host project takes to a working terminal (holder boot, orcad start, terminal spawn and an
answered command) against one wsl.exe into the login shell, as the old bridge does. Test-only.
…ob cap
The baseline measures distro restart (VM warm) to first command output; the old-bridge figure is a
non-PTY wsl.exe --exec lower bound, not ConPTY first paint. The job cap rises to 40 minutes so it
no longer undercuts phase 3's own 30-minute timeout.
nwparker
changed the title
test(wsl): measure reboot to first prompt for the WSL host and the old bridge
test(wsl): measure distro restart to first output for the WSL host and an old-bridge lower bound
Oct 28, 2026
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.
ELI5
This adds a measurement to the real-WSL test run: after a WSL distro is stopped (the WSL VM itself stays up), how long until a terminal prints the output of a command? It compares a project on the new WSL host with a lower bound for the old way. It changes no shipped code.
What Changed
Phase 3 of
wsl-orcad-e2e.yml(wsl-orcad-real-distro-idle-release-lane.test.ts) gains a second test, which runs after the idle-release check. First, one unrecorded warm-up run brings the WSL VM back up. Then it alternates three times between:wsl --terminate, thenmanager.ensure(holder boots the distro, orcad deploys and starts, bridge pairs),terminal.create, and aprintfwhose output must appear interminal.read. It recordsensureMs,terminalCreatedMsandfirstOutputMs.wsl --terminate, then one non-PTYwsl.exe --execinto the login shell (picked the way Orca's WSL commands do, viabuildWslLoginShellCommand, so rc files load), running the sameprintf. It recordsfirstOutputMs. The real old bridge also starts ConPTY and paints a prompt, so this number undercounts it; treat it as a floor, not its first paint.Medians go to the phase receipt under
distroRestartToFirstOutputasmedianHostFirstOutputMs,medianHostEnsureMsandmedianBridgeExecLowerBoundMs, per distro family. The phase 3 step timeout rises from 15 to 30 minutes, and the WSL2 job cap from 30 to 40 minutes so it no longer cuts phase 3 short.Why
The D3 bar "restart → first usable prompt at or below the bridge baseline" had no measured baseline. Running both paths on the same runner, alternated, keeps VM and cache warmth from favouring either one. What it measures is "distro restart with the VM warm → first command output", not a full machine reboot and not first paint.
Flag-off: this is test-only; nothing ships.
User-risk: none; test and CI workflow only.
Linked Issue
Internal WSL-via-orcad tracker D3 bars / E17 (restart → terminal).
Visual Proof
N/A: this adds a test only.
Testing
The workflow qualification and change-scope tests pass. The numbers come from this PR's WSL2 lane run. Earlier run (median of 3): ubuntu host ensure 4.8 s / first output 5.9 s / bridge exec floor 0.79 s; debian 4.3 / 5.4 / 0.59 s; fedora 3.4 / 4.3 / 0.43 s.
Status
Reviewer fixes applied: job cap raised to 40 min; names, receipt keys and this body relabelled. Rebased on main
fe3eb45b857.Checklist
N/Afor visuals with reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (pnpm tc,typecheck:ci, touched tests, code-quality and anti-slop gates pass locally; CI runs the rest)