fix(lint): use the approved GcHeader accessor in the inline-slot-floor probe - #7976
Merged
Conversation
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.
lintis red onmain—scripts/addr_class_inventory.pyexits 1 on one violation introduced by #7928:Verified by running the checker in a clean worktree at
origin/main(my own working tree is on another branch, which is why a local run initially passed and nearly had me dismiss the report).Fix: use
addr_class::try_read_gc_header, the accessor the checker's own error message names. It takes the object address and does the- GC_HEADER_SIZEarithmetic itself, behind its plausibility and small-slab checks — so the probe also stops assuming a header is present rather than asserting it.No allowlist entry added. The ratchet exists so a fix deletes the violation; exempting it would be the thing the file's own README says not to do.
Why this matters beyond one line
A required context that is red means every merge bypasses it, and a genuinely new violation lands invisibly behind the stale one. That is CLAUDE.md's documented failure mode, and it was live: ~20 PRs merged into the collector today with admin bypass.
Validation
python3 scripts/addr_class_inventory.py— passes (1056 files scanned, 284 allowlisted, 546 ratcheted sites); fails onorigin/main.cargo check -p perry-runtime --lib --tests— 0 errors.cargo fmt --all -- --check— clean.Found by the #7955/#7956 agent while validating #7974.