docs(gc): plan status after #7339/#7340/#7342 — the 0→2 spine is done - #7345
Conversation
The layer table said layer 3 was 'not started' when RuntimeHandleScope has 675 uses across 169 files; what is missing is the word 'non-optional'. It now says so, and carries #7341's 54-item worklist. Sequencing step 2 ('in-process LLVM -> statepoints') is complete, so the list said 'next' about work that had already landed. Replaced with what actually comes next, and with one ordering change that is a real finding rather than bookkeeping: reducing root density is now a PREREQUISITE for statepoint adoption, not a follow-up. Statepoints cost +18.95% binary size on root-dense code and +0% on root-free code, 97% of it __text. Making them the default today would regress the stated goal of minimal binary size. The plan already named this lever but flagged it 'expected, not measured -- layer 2 must prove it first'; layer 2 has landed, so it is now measurable.
📝 WalkthroughWalkthroughThe GC engine plan updates status for statepoints and runtime handle scopes. It also revises sequencing to identify completed work, root-density prerequisites, independent layers, LLVM and x86-64 prerequisites, and deferred RSS evaluation. ChangesGC roadmap documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/engine-plan.md`:
- Around line 345-349: Update the progress note in the documentation to refer to
“Step 1” instead of “Step 2,” matching the completed item currently marked in
the list; leave the surrounding ordering and completion details unchanged.
- Around line 31-32: Update the layer 3 status and the adoption-gate guidance to
use one consistent `RuntimeHandleScope` policy: either require its integration
before making statepoints the default, or explicitly define the safety boundary
that allows adoption while the 54 catches remain open. Ensure the entries around
the statepoints and `RuntimeHandleScope` rows, including the later
`llvm-inprocess` and x86-64 gates, reflect that policy without contradictory
“non-optional” and “still optional” statuses.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| | 2 | emitted code's liveness | #7280, #7271, #7252, #7243 | statepoints (#7108, #7174) | ✅ **landed opt-in** (#7314), **usable** (#7339, #7340) | | ||
| | 3 | `perry-runtime` hand-written Rust | #7249, #7239, #7226, #7231 | `RuntimeHandleScope`, non-optional | mechanism exists (675 uses), **still optional**; 54 open catches (#7341) | |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Make RuntimeHandleScope a real adoption gate.
Lines 31-32 use conflicting statuses: the mechanism is “non-optional”, but the status says “still optional”. Lines 362-364 then list only llvm-inprocess and x86-64 as adoption gates, although this document states that statepoints do not cover layer 3 and 54 catches remain.
Require RuntimeHandleScope integration before statepoints become the default, or define the safety boundary that permits adoption while those catches remain open.
Also applies to: 362-364
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/engine-plan.md` around lines 31 - 32, Update the layer 3 status and the
adoption-gate guidance to use one consistent `RuntimeHandleScope` policy: either
require its integration before making statepoints the default, or explicitly
define the safety boundary that allows adoption while the 54 catches remain
open. Ensure the entries around the statepoints and `RuntimeHandleScope` rows,
including the later `llvm-inprocess` and x86-64 gates, reflect that policy
without contradictory “non-optional” and “still optional” statuses.
| **Updated 2026-08-04.** Step 2 below is complete: layer 0 landed (#7301), layer 2 | ||
| landed (#7314) and became *reachable* (#7339) and *selectable* (#7340). The spine | ||
| `0 → 2` is done, so the ordering that remains is: | ||
|
|
||
| 1. ~~**Next:** in-process LLVM (#7241) → statepoints (#7108/#7174).~~ **Done.** |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Fix the stale step reference.
Line 345 says “Step 2 below is complete”, but the current list marks item 1 as complete and item 2 as the root-density prerequisite. Change “Step 2” to “Step 1”, or remove the step number.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/engine-plan.md` around lines 345 - 349, Update the progress note in the
documentation to refer to “Step 1” instead of “Step 2,” matching the completed
item currently marked in the list; leave the surrounding ordering and completion
details unchanged.
…fork (#7371) Three corrections, one of which is a number the plan explicitly warns against quoting and was carrying anyway. 1. THE SIZE FIGURE. Only +18.95% appears on main -- a synthetic worst case with three heap values live across an allocation in EVERY one of 2000 functions. The dependency-scale measurement is +1.86% (zod, 81 native modules, 29 MB binary), an order of magnitude lower. The correction was written when the synthetic was retracted but never reached main: #7345 squash-merged as 24 insertions, the first commit only, so the follow-up correction commit was dropped. That is the same failure mode this document records for #7321 -- a wrong explanation outliving its own disproof -- so the real number now leads and the worst case is explicitly marked do-not-quote. 2. SEQUENCING STEP 2 said root density was a PREREQUISITE for adoption, reasoning from that retracted figure. Adoption shipped in #7370 without it. Still worth doing, and still the same lever #7296 proved worth 9.9x, but it gates nothing. 3. THE ADOPTION FORK IS CLOSED. Every gate shut: llvm-inprocess default (#7353), x86-64 (#7349), Windows (#7355), bridge deleted (#7348), and the 479-test suite with no env matching the shadow baseline exactly. The target-aware shape is recorded because it is the part that generalises: native roots where the runtime can walk, shadow stack where it cannot. Also: layer 2 now reads THE DEFAULT rather than landed opt-in, layer 3's count is 41 rather than 54 after #7363, and the 2026-08-03 status header no longer says 'not yet adopted'. Co-authored-by: Ralph Küpper <ralph@skelpo.com>
Routine plan-status update against #7294, plus one substantive re-ordering.
Corrections
RuntimeHandleScopehas 675 uses across 169 files. What is missing is non-optional. Now says so, and carries gc(layer 3): from-space quarantine catches 55 stale dereferences across the gap suite — the instrument is in CI but aimed at one synthetic fixture #7341's 54-item worklist.The one substantive change
Reducing root density moves from a follow-up to a prerequisite for statepoint adoption. Measured on two 2000-function programs:
__textStatepoints have no fixed cost, and 97% of the growth is code, not metadata. So making them the default today regresses the stated goal of minimal binary size. The plan already named this lever but flagged it "expected, not measured. Layer 2 must prove it first" — layer 2 has now landed, so it is measurable. It is also the same lever #7296 proved worth 9.9× on
matmul, so size and speed pull together rather than trading off.Docs only.
Summary by CodeRabbit