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
Speed up daemon smoke checks and keep compiler slots busy - #28106
The static analysis job repeats a CLI build and leaves a compiler slot idle when one project finishes before its partner. This change removes that repeated build and lets the free slot take the next project.
What Changed
The Orcad terminal smoke uses the CLI and pinned Node already shipped in its daemon package. It no longer runs a separate TypeScript CLI build and rejects a missing packaged CLI rather than falling back to stale output.
Bun fills free compiler slots immediately, with the same memory admission, two-process limit, two threads per process, four projects and compiler-version guard. Failed projects still report in project order and do not prevent the remaining checks.
The synchronous-launch ratchet still parses every file and rejects malformed syntax. Files without relevant spellings skip parent links and traversal; escaped spellings and inherited module paths keep the full analysis.
A type-only extraction of the HTML preview props fixes an existing main-branch line-limit failure. The component emits identical JavaScript.
A separate benchmark workflow compares each change in four counterbalanced pairs on ARM CI runners and retains timings and result checks.
Why
Recent production runs show that foreground checks now expose typechecking near the end of the job. Removing repeated work and idle slots addresses that delay while keeping the existing checks and compiler limits.
N/A — CI scripts and a type-only renderer extraction that emits identical JavaScript.
Testing
172 targeted tests pass, including compiler admission, continued checking after failures, freed slots, escaped imports, malformed syntax and packaged CLI selection.
Native pnpm tc passes.
The full packaged-daemon smoke passes locally on macOS: pairing, worktree creation, terminal output and execution-host CLI round trips.
Changed-code quality passes.
Full lint, the native typecheck and all normal PR checks pass, including Windows packaging, five unit shards, Electron checks and cross-platform persistence/native compatibility checks.
Daemon build and terminal smoke: 21.47s → 15.95s. Both versions pass all pairing, worktree and terminal assertions in every run.
Typechecking: 52.62s → 48.14s. Same four projects, compiler, process limit and threads; all eight suites pass.
Sync-launch scan: 3.64s → 3.11s. Identical counts and symbols across all 8,055 production files; both reject malformed syntax.
Four full preflight replays use frozen source ea44810149e9c68e2718163aeffe83eff96efa6e, baseline 845b723258c0502365ef8ea29392a3badc8cbeae, and fresh ARM runners in before/after/after/before order. All four pass every desktop check and produce identical unit-selection artifacts.
Full-job measurements exclude queueing. Before: 166s, 190s; after: 170s, 164s. Medians are 178s → 167s including setup, or 142s → 133s after setup. Only two fresh runners per arm and noticeable runner variance: these are directional results, not a promised fixed percentage.
The baseline replay exposes its existing CLI resolver solely so the shared new test's static import remains valid; that export does not alter the old client behavior. Both arms prepare their implementations after the same immutable dependency installation. Both arms run the same complete desktop check set and select the same 11,982 test files in five shards.
Review
The packaged CLI uses the existing artifact paths and bundled Node resolver on macOS, Linux and Windows. Local native typechecking keeps its existing scheduler. The daemon smoke continues to exercise the public paired-server API.
Agent skill upstream boundary
Not applicable; no upstream skill sources copied.
Checklist
Focused on the static analysis job.
Before/after behavior, mechanism and alternatives explained.
No UI change requiring screenshots.
Cross-platform paths, remote pairing and memory bounds considered.
Targeted local validation passed; full PR validation runs in CI.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
📝 Walkthrough
Walkthrough
The pull request adds a CI workflow and script for comparing preflight critical-path runs. It changes sync-spawn analysis to gate TypeScript analysis by source markers. It changes Bun typecheck scheduling to use a shared worker pool and adds queue tests. It updates terminal smoke CLI selection and cleanup by runtime target, adds resolution tests, and removes a CLI build step from the OrcaD smoke command. It also adds a shared props type for the HTML document preview component.
Priority: ⬇️ Low
Merge Risk:⚪ Minimal · up to ea448
No actionable issue remains identified; the change is mergeable after normal checks.
Pre-merge checks · 4 · 1
Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 9 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks (4 passed)
Check name
Status
Explanation
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.
Title check
The title is concise and accurately summarizes the main performance changes: faster daemon smoke checks and improved compiler-slot utilization.
Description check
The description is detailed, relevant, and covers the required change summary, rationale, testing, visual proof, review notes, and checklist. It references issue #27727, but the template requires an a…
Fix all pre-merge checks with AI
✨ 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.
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
The static analysis job repeats a CLI build and leaves a compiler slot idle when one project finishes before its partner. This change removes that repeated build and lets the free slot take the next project.
What Changed
Why
Recent production runs show that foreground checks now expose typechecking near the end of the job. Removing repeated work and idle slots addresses that delay while keeping the existing checks and compiler limits.
Linked Issue
Follow-up to #27727.
Visual Proof
N/A — CI scripts and a type-only renderer extraction that emits identical JavaScript.
Testing
pnpm tcpasses.ea44810149e9c68e2718163aeffe83eff96efa6e, baseline845b723258c0502365ef8ea29392a3badc8cbeae, and fresh ARM runners in before/after/after/before order. All four pass every desktop check and produce identical unit-selection artifacts.Full-job measurements exclude queueing. Before: 166s, 190s; after: 170s, 164s. Medians are 178s → 167s including setup, or 142s → 133s after setup. Only two fresh runners per arm and noticeable runner variance: these are directional results, not a promised fixed percentage.
The baseline replay exposes its existing CLI resolver solely so the shared new test's static import remains valid; that export does not alter the old client behavior. Both arms prepare their implementations after the same immutable dependency installation. Both arms run the same complete desktop check set and select the same 11,982 test files in five shards.
Review
The packaged CLI uses the existing artifact paths and bundled Node resolver on macOS, Linux and Windows. Local native typechecking keeps its existing scheduler. The daemon smoke continues to exercise the public paired-server API.
Agent skill upstream boundary
Checklist