Repository navigation
fix: release completed runtime RPC queue payloads - #21131
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (16)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe runtime RPC queue now clears consumed foreground and background entries by assigning
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The queue cleanup change and its audit tooling have no remaining actionable merge risk. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description clearly explains the problem, implementation, compatibility constraints, and validation results, but it does not follow the required template. It omits the required ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Review, Notes, and Checklist sections. It also does not provide the required issue link or explicit visual-proof and platform-testing statements. Resolution Restructure the description using the repository template. Add an ELI5 summary, separate What Changed and Why sections, provide a valid Linked Issue entry such as Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 7 files. (9 skipped: 9 unsupported.)
✨ 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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Released consumed queue slots —
takeForeground/takeBackgroundinsrc/shared/runtime-rpc-call-queue.tsnow assignundefinedto the consumed lane slot before advancing the head, so a settled call'srunclosure (and the request params it captures) is no longer reachable through the array while another call keeps the selector active. Lane element types widen to(QueuedRuntimeCall<unknown> | undefined)[]; compaction comment reworded. - Retention regression tests — new
src/shared/runtime-rpc-call-queue-retention.test.ts(6 cases) covers completed-call release on both lanes, active+cancelled release, rolling cross-lane traffic, and lane order/FIFO/cancellation under compaction. - Audit bundle —
docs/audits/runtime-rpc-consumed-queue/**documents production reachability, a SHA-pinned baseline reconstruction fromfix.patch, and Node 26 vs Electron 43.7 results.
I verified the product change preserves the queue invariants: queuedCount = length - head and isEmpty never see the cleared holes (all sub-head slots undefined, all at/after-head slots defined), and cancelQueuedCall's indexOf(call, head) starts past the holes. pump already treats a falsy take as an empty lane. All 14 queue tests pass locally, and running the committed baseline.config.mjs ablation reproduces exactly the three claimed failures (both releases completed … inputs cases and releases old foreground inputs …), so the regression tests genuinely fail without the fix. Product file sha256sum matches the committed fixedSha256, and oxlint is clean on both source files.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Co-authored-by: m4air <m4air@Mac.localdomain>

Problem and change
Completed RPC calls remain reachable through consumed lane slots while another call keeps the selector active. Their closures retain request parameters until that lane compacts or the selector becomes idle. Clear each slot when taking its entry; the active call remains owned by its completion closure.
The change preserves lane order, foreground priority, cancellation, admission and byte accounting. Production callers use this pool for remote/paired operations; their
retainedBytesvalues currently default to zero. This does not identify a cause for the local-only report in #19831.Validation
The portable proof and source hashes include bounded before/after cases and runtime-specific results. Record count is bounded by existing compaction/admission behavior; this is unnecessary retention, not proof of unlimited growth or an incident's magnitude.