Repository navigation
[CI] test: bound memory used by the runtime Electron audit - #26049
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The reviewed changes combine audit entries and retain importer checks, while preserving the session host’s delivery factory and type usage. No actionable merge-blocking risk is established by the available evidence. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
Adversarial review: compared the same ARM shard on main and the assembled fixes. Main reached 12.3 GiB in esbuild; the candidate exhausted memory and swap. Module start/end logging left only check-runtime-electron-ratchet.test.mjs unfinished. The output-budget regression fails before the fix (2,674,080 bytes) and verifies all 40 entry importers after it; sideEffects:false packages, an otherwise unwired injected import, and the real-tree baseline remain covered.
One generated entry exports a distinct namespace for every source entry, sharing their dependency output instead of excluding entry points. The duplicate delivery imports are consolidated to satisfy the existing 300-line rule; the same factory remains called. No rule is disabled or raised. All 66 audit/host tests, Node typecheck, and changed-code quality pass locally; the assembled 150-file quality gate also passes.
The fixed ARM shard passes 22,312 tests (182 skips), with 55 samples peaking at 4,130 MiB runner memory and zero swap. Windows passes all 19 audit tests. Proof: https://github.com/stablyai/orca/actions/runs/37562706124. Required CI is green on current head a4370dd0decc. Low-risk merge recommended. Merge independently, preferably before the #21489 application series to stabilize its baseline gates.
ELI5
CI can shut down before reporting tests because the Electron dependency audit runs out of memory. Check all the same entry files through one bundle so shared dependencies are emitted once.
What Changed
Each audit entry gets its own exported namespace in a single generated entry. The audit still reads esbuild's dependency metadata and checks the same Electron imports and baseline. A regression measures duplicated output and verifies every entry remains covered, including dependencies marked
sideEffects: false.Also consolidates duplicate imports from the structured-session delivery module. This corrects an unchanged main-base file at 301 lines without raising or suppressing its 300-line limit; the same factory remains responsible for delivery.
Why
The audit previously emitted a complete bundle for every entry although it only needed the dependency graph. During the #21489 review, esbuild reached 12.3 GiB on main and 13.5 GiB on the assembled fixes, exhausting the ARM runner and swap. Module start/end logging identified this audit as the only unfinished test. Sharing the output addresses that duplication instead of increasing runner memory or weakening the audit.
Linked Issue
Discovered while verifying #21489. Independent of its application fixes; merge separately.
Visual Proof
N/A — dependency audit and equivalent delivery-module import consolidation; no rendered behavior changes.
Testing
a4370dd0decc.Review
Every entry is exported under a distinct name so its exports remain reachable. Existing package traversal, native-addon handling, platform path resolution, and baseline comparison are retained. The delivery import consolidation calls the same function and passes the existing host tests. No contributor replacement PR is involved in this separate fix.
Agent skill upstream boundary
Checklist