Repository navigation
[CI] perf(ci): compile release JavaScript once for all packaging hosts - #25828
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe release pipeline now builds, packages, and validates JavaScript artifacts separately from host builds. Release workflows use the artifact when the source supports it and retain the full-build path otherwise. New scripts and workflows compare output parity and measure build timings across four host configurations. The changes also update renderer minification options, tar executable selection, packaging exclusions, and selected types, tests, and checkout rules. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The reviewed edits do not identify a concrete release failure. The PR reports cross-host output parity and passing checks; no additional merge-blocking risk is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
ELI5
Release packaging currently compiles the same JavaScript separately on every platform. Compile it once, then let each platform build its native components and package the shared output.
What Changed
A read-only job builds and archives the CLI, desktop, web and mobile web output alongside release checks. Windows, Linux x64, Linux arm64 and the separate macOS workflow restore that artifact. The manifest checks the exact source commit, version, release configuration, archive and every file before replacement. Older source commits keep their original full build.
Source text uses consistent line endings across hosts. The web projection retains already-minified Vite chunk bindings while continuing to minify vendor files. Windows archive operations use the existing system-tar selection so drive-letter paths work. Build staging is excluded from app.asar so transfer archives and manifests never ship inside the desktop app. Two current-main thinking-state test fixtures now pass the current
{ items }input shape, repairing CLI compilation. The session host uses its existing exported delivery type to meet its existing line cap.Why
This removes duplicate compilation while retaining host-specific relay staging, native builds, runtime checks and signing gates. An artifact from the same release run avoids persistent-cache invalidation and cannot reuse output from another release configuration.
Linked Issue
N/A — internal CI improvement.
Visual Proof
N/A — no UI or interaction changes.
Testing
Measured CI run:
The producer, all eight platform builds and the CI comparison job pass. All four output comparisons have zero differences. The producer takes 82.0 seconds, including setup, compilation, archiving and upload. After charging that job, the four hosts save 102.1 runner-seconds net. This is aggregate execution time, not a claim about total release wall-clock time.
Review
Native packaging and execution checks stay on their original hosts. The producer uses GitHub-hosted infrastructure and read-only repository permissions. macOS downloads only from the parent release run. Missing or mismatched output fails; only older source commits use the legacy build.
Comparison checks normalize text line endings, generated asset references, manifest source paths/key order, and narrowly bounded native CSS color rounding; source maps are excluded from cross-host comparison. Production restoration always verifies exact producer bytes, with no normalization.
Agent skill upstream boundary
Notes
Measurements cover one paired sample on each host, including download and restore time. Consumer dependency setup, packaging and signing are excluded. The macOS benchmark uses GitHub-hosted ARM64; the release workflow retains its existing custom runner. Full release wall-clock savings have not been measured; producer work overlaps release gates but can delay packaging if it finishes later.
SSH relay staging and compatibility checks stay host-owned. Native dependency installation still follows the target OS and CPU policy.
All validation checks pass on the final commit: typechecking/static analysis, all five unit shards, platform comparisons, Windows/Linux packaging, mobile, native compatibility, relay, Git and mixed-version compatibility. Final verification passes. The advisory unit-selection evidence report also passes; all 47 validation checks are green. A unit runner was shut down; its retry then hit an unchanged SQLite file-byte assertion, which passed on the next CI run and five repeated focused local runs. Local tracked-source Node, CLI and renderer typechecks, release/packaging tests and changed-code quality pass. The local Node check excludes two unrelated untracked Windows files that are absent from CI. No signing or release publication was triggered.
Checklist