Repository navigation
fix(gates): shape-descriptor census follows the bag-first read and ignores census-only lets - #14758
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
2fae3aa on main repointed probe_get_at's pin at bag_first_get and admitted the instruments-only census lets in perry_probe_get*. The two edges behind that route are still unpinned: bag_own answers only from the bag's own layout record, and every bag decline goes on to array_named_get / array_named_get_past_bag. Pin both; the census sabotage check deletes each pattern and expects a rejection.
7c5b544 to
4d9ef17
Compare
Summary
shape_descriptor_census.py(lint step "Object-header shape-descriptor census") fails onmainfor two reasons. Both are pinned authority edges that no longer match code that kept the same invariant under a new spelling:probe_get_at's nonordinary receiver (no ordinary layout record) tobag_first_getinstead of straight toarray_named_get. The census pinned the old call, so it reportsshape descriptor authority surface missing: nonordinary read routes to the checked array path. The new path still never reads the receiver through a record it does not have.bag_ownanswers only from the bag's own layout record (arraynamed/ closureprops), and declines when there is none or it is not probe-ready. Every decline goes on toarray_named_getorarray_named_get_past_bag. The census now pins those three edges instead of the one.#[cfg(perry_gc_instruments)]census key-naminglettoperry_probe_getandperry_probe_get_binding. The census requires those bodies to be exactlyprobe_get::<…>(dir, obj_biased, key_bits, hash), so it reportsperry_probe_get bypasses the receiver-layout authority. This error was hidden behind (1) on currentmain, and ci: fix main's mechanical and stale reds (fmt, clippy, tokio-ban, tls-budget, Windows dladdr, stale ledgers); list the GC-audit reds for their authors #14604 listed it. The census now drops a brace-freeletunder that cfg before the full match. Such aletdoes not exist in production builds. An instrument-only statement that could return or branch still fails.Seen in main's CI run 43639432681. Part of the lint cleanup tracked alongside #14595.
Changes
scripts/shape_descriptor_census.py:DISPATCH_CHECKS:probe_get_atpinsbag_first_get, plus newbag_own(resolves the bag's own record, declines on null) andbag_first_get(both declines route to the checked array path) entries. The existing sabotage self-check covers each new entry automatically: it deletes each pattern and expects a rejection.without_instrument_lets()is applied to the twoperry_probe_get*bodies before the full match.Related issue
Refs #14595, #14604. Main CI run 43639432681.
Test plan
Proposed; please confirm. (1) records my reading that the bag-first arm keeps the authority. The bag is an ordinary object read through its own descriptor record. (2) treats census-only
lets as outside the production body.BASE_SHA=upstream/main scripts/run_lint_gates.sh(macOS arm64): 21 FAIL lines on the branch vs 22 onmain64257c3; the only difference is the gate this PR fixes ([Object-header shape-descriptor census] python3 scripts/shape_descriptor_census.py); no new FAIL.Scripts only; no crate changes, so no changelog fragment.
Checklist
feat:/fix:/docs:/chore:prefix convention🤖 Generated with Claude Code
https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
Summary by CodeRabbit