Skip to content

docs(gc): plan status after #7339/#7340/#7342 — the 0→2 spine is done - #7345

Merged
proggeramlug merged 1 commit into
mainfrom
docs/7294-plan-status-after-7339-7342
Aug 4, 2026
Merged

docs(gc): plan status after #7339/#7340/#7342 — the 0→2 spine is done#7345
proggeramlug merged 1 commit into
mainfrom
docs/7294-plan-status-after-7339-7342

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Routine plan-status update against #7294, plus one substantive re-ordering.

Corrections

The one substantive change

Reducing root density moves from a follow-up to a prerequisite for statepoint adoption. Measured on two 2000-function programs:

workload delta __text
root-free +0 B +12 B
root-dense +18.95% +4.20 MB

Statepoints 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

  • Documentation
    • Updated the garbage collection implementation plan to reflect completed statepoint work and current optional runtime handle scopes.
    • Clarified sequencing, prerequisites, platform considerations, and deferred memory-usage evaluation.
    • Documented measured binary-size impact associated with root-density reduction.

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.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

GC roadmap documentation

Layer / File(s) Summary
GC status and sequencing
docs/engine-plan.md
The plan records landed and usable statepoints, an optional runtime handle-scope mechanism with 54 open catches, completed layers 0 and 2, root-density prerequisites, independent layers 1 and 3, platform and LLVM prerequisites, and deferred RSS evaluation.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

Possibly related PRs

  • PerryTS/perry#7292 — Both changes document GC correctness planning, statepoints, runtime handle scopes, and in-process LLVM prerequisites.
  • PerryTS/perry#7314 — This change documents the statepoint and GC work associated with that PR.
  • PerryTS/perry#7339 — This change records statepoint adoption prerequisites related to that PR.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the GC plan-status update and the completed layer 0→2 work.
Description check ✅ Passed The description explains the changes, related issues, measured rationale, sequencing decision, and documentation-only scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/7294-plan-status-after-7339-7342

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug
proggeramlug merged commit 494083f into main Aug 4, 2026
27 of 44 checks passed
@proggeramlug
proggeramlug deleted the docs/7294-plan-status-after-7339-7342 branch August 4, 2026 05:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2db963d8-33bb-4ad6-bc95-64f1ee90ed14

📥 Commits

Reviewing files that changed from the base of the PR and between 0632a77 and 832de5d.

📒 Files selected for processing (1)
  • docs/engine-plan.md

Comment thread docs/engine-plan.md
Comment on lines +31 to +32
| 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) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ 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.

Comment thread docs/engine-plan.md
Comment on lines +345 to +349
**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.**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

proggeramlug added a commit that referenced this pull request Aug 4, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant