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): record the restart phase baseline for staged readiness - #35530
We are about to make the WSL host say "ready" earlier. To know whether that works, the speed test has to show where the restart time goes, both inside the host process and after it is ready. This adds that breakdown to the test's receipt.
What Changed
This PR is stacked on #35526 (one held socket). Review only the second commit.
Before: the lane receipt had restart to first output, the host's ensure phases, and one raw orcad startup line per run, with no medians.
After:
Each restart also records sendToFirstOutputMs, the time from typing the probe to seeing it.
Each distro also reports these medians:
medianHostTerminalCreatedMs
medianHostSendToFirstOutputMs
medianOrcadStartup, made of:
bootMs: process start to the first timed phase, which is Node boot plus the module graph loaded eagerly
each phase's end and duration
readyMs
A small reader, src/main/orcad/orcad-startup-timing-summary.ts, now parses orcad's startup timing line. It replaces the lane's untyped JSON.parse of that line, and it has unit tests. It lives outside orcad's own bundle, so orcad's start-up does not change.
Why
Staged readiness moves the moment orcad publishes readiness to before daemon, orchestration and terminal reconcile are finished. The baseline must show how much of the restart those phases cover, and how much falls before them (boot) and after readiness (terminal create, shell output). Without that split, any lane number after the change could not say where the time went. Median phase ends make the readiness move readable directly from one receipt.
Flag-off: no product change; test and lane receipt only.
User-risk: none; the new module is imported only by the lane test and its unit test.
Linked Issue
N/A (internal performance work).
Visual Proof
N/A: test-only change with no UI.
Testing
pnpm test src/main/orcad/orcad-startup-timing-summary.test.ts passes (5 tests). orcad-startup-timing.test.ts still passes.
pnpm tc, pnpm run typecheck:ci, the changed-code quality gate, anti-slop oxlint and oxlint all pass.
The lane itself runs on the CI WSL2 lane.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Test-only; no security, SSH, mobile or compatibility impact.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
The change adds parsing and median aggregation for ORCAD startup-timing reports. The WSL idle-release lane uses one shared control connection for host restart requests, measures terminal creation and send-to-first-output times, and includes median timing results in the baseline receipt.
Priority: Low
Merge Risk: Low · previous review 3b7f4
Retained installation slots can make the new startup baseline inaccurate. Correct the report selection before relying on that baseline.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 42.86% 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 describes the main change: adding a restart phase baseline for staged readiness in the WSL test lane.
Description check
The description covers the required explanation, changes, rationale, testing, visual proof, scope, and checklist. It identifies the work as internal performance work and reports the relevant automated…
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 covers the required explanation, changes, rationale, testing, visual proof, scope, and checklist. It identifies the work as internal performance work and reports the relevant automated checks and CI coverage.
Full details: Docstring Coverage
Explanation
Docstring coverage is 42.86% 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 7 functions across 3 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 2
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
⚔️ Resolve merge conflicts: 💡
Resolve merge conflict in branch nwparker/wsl-lane-startup-phase-baseline
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.
Each restart appends stderr to orcad.log. The reader then searches every retained orcad-* slot and applies tail -n 1 to the combined output. tail follows glob order, not report time. If an older retained slot sorts after the active slot, the receipt can use that previous daemon’s timings for the restart median.
Pass the active remoteInstallDir to readOrcadStartupTiming and read only that slot’s log. The current report is appended after readiness, so the older lines in the active slot do not need separate truncation.
Split first output into ensure, terminal create, and send-to-output, and
report orcad's internal startup medians (boot before the first timed phase,
each phase's end and duration, readiness) so moving the readiness publish
earlier can be judged per phase.
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
We are about to make the WSL host say "ready" earlier. To know whether that works, the speed test has to show where the restart time goes, both inside the host process and after it is ready. This adds that breakdown to the test's receipt.
What Changed
This PR is stacked on #35526 (one held socket). Review only the second commit.
sendToFirstOutputMs, the time from typing the probe to seeing it.medianHostTerminalCreatedMsmedianHostSendToFirstOutputMsmedianOrcadStartup, made of:bootMs: process start to the first timed phase, which is Node boot plus the module graph loaded eagerlyreadyMssrc/main/orcad/orcad-startup-timing-summary.ts, now parses orcad's startup timing line. It replaces the lane's untypedJSON.parseof that line, and it has unit tests. It lives outside orcad's own bundle, so orcad's start-up does not change.Why
Staged readiness moves the moment orcad publishes readiness to before daemon, orchestration and terminal reconcile are finished. The baseline must show how much of the restart those phases cover, and how much falls before them (boot) and after readiness (terminal create, shell output). Without that split, any lane number after the change could not say where the time went. Median phase ends make the readiness move readable directly from one receipt.
Flag-off: no product change; test and lane receipt only.
User-risk: none; the new module is imported only by the lane test and its unit test.
Linked Issue
N/A (internal performance work).
Visual Proof
N/A: test-only change with no UI.
Testing
pnpm test src/main/orcad/orcad-startup-timing-summary.test.tspasses (5 tests).orcad-startup-timing.test.tsstill passes.pnpm tc,pnpm run typecheck:ci, the changed-code quality gate, anti-slop oxlint and oxlint all pass.The lane itself runs on the CI WSL2 lane.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
Test-only; no security, SSH, mobile or compatibility impact.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)