Replace inherited-read table with guarded sites; fix mixed getters (integrates #11713) - #11738
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe changes remove the inherited-read cache and add holder-backed read, method, class-accessor, and setter sites. Worker startup gates holder-backed site access. GC root handling and tests cover relocation, prototype changes, and worker execution. ChangesProperty and method sites
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~60 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The changelog accurately describes the inspected changes and follows repository requirements. No actionable merge-blocking issue was identified; normal CI validation remains necessary. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Guards constrain cached method access and prevent obsolete prototype fallback. However, a new prototype-read path can resume fallback after an allocating getter returns undefined, without an established guarantee that the retained values remain valid after memory relocation. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 55.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 170 functions across 52 files. (1 skipped: 1 unsupported.)
✨ 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 |
|
Owner decision on the performance trade-off, posted by Claude, which owns the A2 lane. The decisions are recorded in the coordination log as items 59–61.
So the merge decision is resolved: this integration may land once CI is green, apart from failures that fail identically on main. The mixed-getter fix and the Map fixture repair in this PR are welcome additions. #11713 can be closed as superseded once this lands. |
|
HOLD: don't merge yet. A sabotage sweep on the rebased A2 head ( class B {} class C extends B {}
B.prototype.k = 5;
const inst = new C();
console.log(inst.k); // primes the inherited-read site
Object.setPrototypeOf(C.prototype, { k: 7 });
console.log(inst.k); // read at a different siteNode 26.5.1 prints |
…ed (data, depth 1-3)
The instance class-chain read (resolve_proto_chain_field_inner) and the prototype-assignment lookup (lookup_prototype_method) walk the parent class id registered at declaration. After Object.setPrototypeOf(C.prototype, X) that edge is no longer on the chain, and both answered from the old parent prototype: new C().k read B.prototype.k instead of X.k. A2 surfaced it. The relink transitions C.prototype's shape, so a class read site's hop facts decline, and a site primes only when the generic read agrees with its live walk. The generic read was the stale one, so the stale value went out at every site. On main the deleted inherited-read cache answered from its own walk once a site had primed, which masked the same bug for primed reads only. Once C.prototype carries a user prototype override, the walk reads C's own properties and then continues on the recorded link with the instance as receiver, and the registry lookup stops at C.
|
Hold resolved. Four commits are pushed on top of Root cause. It was not A2 state going stale. The generic read for a declared-class instance ( Fix ( Tests.
Verification at
Still wrong, and not regressions (same on main):
Both go to follow-ups. |
The receiver-route census lost its only rt_overwrite_kept_typed increment when object layout notes were retired for ShapeId tracing (8a51a41), so class_field_miss_one_path's premise assertion could never pass; main is red the same way. Count the in-bounds overwrite in try_existing_own_data_overwrite when the receiver's ShapeId carries an F64 lane, the typed layout the class-field guard now compares, and name the sabotage that still turns the test red.
|
CI status on
|
Current-head additional CI attribution: moving-witness job110531942868 has exactly the same five zero-movement failures as completed main087bd job110382314630. macOS native-roots job110538314178 fails linking the stdlib provider on the same eight CoreFoundation/Objective-C symbols as completed main606e job110400249998. Raw logs and exact comparison assertions are retained in the audit. These are failed checks, not positive movement or provider-link evidence. Both mandatory root jobs still need whole-job SUCCESS; the statepoints curated check has passed and its dependency-scale corpus is running.
Inherited reads and method calls now use per-site receiver/holder shape facts, replacing the process-wide inherited-read cache and its GC roots. Class getter and setter sites use live shape/prototype checks, and worker startup sends holder-backed sites through ordinary dispatch safely. This integrates fork #11713 while preserving its contributor commits.
Mixed accessor pairs retain generic getter dispatch when a closure getter remains beside a compiled setter. The ordered-delete Map regression uses real rooted GC objects and reloads addresses after allocation. Declared-class reads follow the live prototype link after
Object.setPrototypeOf, preserve the original getter receiver, and stop at null. New fixtures cover prototype relinking, class-chain refusal, and moving inherited holders at depths 1–3.Validation at
2452746b03b77f048f36d2f7b060af2760456667:Historical validation at9b38e3a98a: runtime4757 passed/0failed/5ignored; all8 focused accessor/read-holder units and3 serial Map regression runs passed. Full stdlib243passed/1failed reproduces the identical DOMException thread-exit assertion on independent main2584525. These historical results do not establish current-head suite results or CI exceptions. Source review retains two unrelated pre-existing followups: old-parent declared methods visible through the method table, and duplicate block-scoped class names losing prototype writes.
The owner directed expedited merging after disclosure of +0.67% Zod instructions and +7% TypeScript peakRSS (394.6→422.4MB). The author attributes RSS to main pacing tracked in #11736; measurements and that attribution have not been independently reproduced here. Original #11713 stays open until landing is verified. Current-head CI, both actual root checks, and any failure attribution still gate landing.
Current-head CI attribution: GC-ratchet job110531945861 reports73 failed numeric rows, all exactly matching completed main087bd job110380943914. Windows native-root job110538313461 reports the same09_try_catch_roots funclet-refusal tripwire as completed main606e job110400250156. These exceptions do not cover arbitrary Windows build failures. Both mandatory root-dominance jobs and the remaining current-head CI still require actual completion; native-backend job110549152517 completed1841passed/5failed/1ignored; its5firstassertionmessages exactly match completed main9e05951071 job110249849088 with the reviewed testname rename, and its test source is unchanged from the reviewed9b38 source. The exception is limited to immutable245 head and this actual job URL. Both mandatory root jobs and all other checks still gate landing.
Summary by CodeRabbit