fix(ci): restore the gc-root-dominance gate — its corpus lost its subject to the statepoint default - #7452
Merged
Merged
Conversation
added 2 commits
August 5, 2026 16:27
…t binds The checker anchors on `@js_shadow_slot_bind` call sites. Statepoints became the default root lowering in #7370 and express roots as `gc.statepoint` relocation bundles instead, so the corpus has carried 1251 statepoints and ZERO binds ever since. The checker's own vacuity floor then fails the job: error: 0 root store(s) in the corpus, need at least 1500. The subject of this check never ran. Selecting the shadow-stack lowering for the corpus restores the subject: 0 -> 3151 root stores, both gated arms exit 0, and the adversarial arm reports 40 planted / 40 caught / 0 missed. This gates the shadow-stack lowering only. The statepoint lowering now has no equivalent static check; that gap is real and is named in the script rather than hidden by lowering the floor.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe corpus build now forces shadow-stack root lowering for ChangesGC dominance corpus
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
proggeramlug
added a commit
that referenced
this pull request
Aug 5, 2026
* fix(ci): the dependency-scale dominance corpus was vacuous too #7452 fixed the curated corpus and missed this one. Same cause: the checker anchors on @js_shadow_slot_bind call sites, statepoints became the default root lowering in #7370 and express roots as gc.statepoint relocation bundles instead, so the corpus carried 81 modules with ZERO of the checker's subject. before: 81 modules, 0 bind call sites after: 81 modules, 7719 bind call sites CI's own floors say what the corpus is supposed to look like -- the step comment reads '81 modules, ~12900 functions, ~7700 root stores' and sets --min-binds 4000. The fixed corpus measures 81 / 12899 / 7719, i.e. the floors were written against the shadow-stack lowering and this restores exactly the state they were set from. Both gated arms exit 0 with 40/40 seeded violations caught. This is the corpus #7280 created BECAUSE the curated one reads zero while twenty lines of stock zod fault, so leaving it measuring nothing defeats the reason it exists. * docs: changelog fragment for #7460 --------- Co-authored-by: Ralph Küpper <ralph@skelpo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gc-root-dominancehas been red onmainsince statepoints became the default root lowering, and it is a required context — so every merge in that window bypassed the gate that protects the GC rooting invariant.What broke
The checker anchors on
@js_shadow_slot_bindcall sites. #7370 made statepoints the default, and they express roots asgc.statepointrelocation bundles instead. The corpus therefore contains:gc.statepointoccurrencesjs_gc_loop_safepointjs_shadow_slot_bindcall sitesjs_shadow_slot_binddeclarelinesPERRY_INLINE_SHADOW_SLOT=0is still set and still correct — it just has nothing to act on, because the bind form is not what codegen emits any more.The checker caught this itself rather than reporting a false green, which is the design working:
That is CI's own log from run 30990401930 on
main, and my local reproduction matches it to within one function (2379 vs 2378).Fix
One env var on the corpus compile:
PERRY_RS4GC=0, selecting the shadow-stack lowering the checker understands.--unrooted-allocas --moving-onlyBoth gated arms run the exact CI invocations, floors included.
The gap this leaves, stated rather than papered over
This gates the shadow-stack lowering, which since #7370 is no longer the default on targets whose frames the runtime can walk. The statepoint lowering currently has no equivalent static check. Teaching the checker to read relocation bundles is a separate and larger change.
The tempting alternative — lowering or deleting
--min-binds— would have produced a green tick over a corpus with no subject in it, which is CLAUDE.md's hazard 4 exactly. The comment in the script says all of this at the call site so the next person meets it before the next default flip.Note on the 7 latent hits
Running
--unrooted-allocaswithout--moving-only(which CI does not do) reports 7 violations in the shadow-stack corpus, allMOVING: no— inclass_expr_dynamic_parent_ctorand threerepsel_gc_stressfunctions, betweenjs_array_numeric_value_to_raw_f64and friends. They are not new regressions: CI has never produced this corpus, so they have simply never been visible. They are outside the gated arm and I have not touched them; worth an issue if the statepoint-side checker ever lands and makes them reachable.Summary by CodeRabbit