Repository navigation
Respect class overrides of reflection method lists - #399
Conversation
…ils1-class-reflection-method-lists
…ils1-class-reflection-method-lists
284km
left a comment
There was a problem hiding this comment.
Reviewed head bc72e453 against its base c524447b (#396). The interpreter change is main.mere +14/-3; the rest is corpus 959 and the record.
- The
is_vis_list_namearm now steps aside when the receiver class has its own Ruby class method of that name, so the ordinary user-method path runs it (visibility and aliases included). That is the right priority: Ruby dispatchesAMQ::Protocol::Method.methodsto the class's own definition beforeModule#methods. superfrom such an override setsrefl_super, which the arm consumes once to answer with the builtin.super_missingnow covers everyis_vis_list_namemethod and clears the flag on an exception too (try_or_msg). Before this, a raise inside the builtin would have left the flag set for the next unrelated call.- Cost: only calls of the reflection list names pay the extra
cls_meth_ownlookup, so hot paths are untouched. - Evidence in the body: corpus 959 in all 8 configurations; AMQP 2.8.0 loads all 64 protocol classes on both engines;
exceptions_testgoes from 33 MISSING to 33 MATCH with no lost case; related CRuby files are compared with the parent.
No blocking findings from me. One question, non-blocking: refl_super is a single global flag. If an override calls super from inside a block that runs another class's overridden methods first, the inner arm could consume the outer flag. A corpus line with two overriding classes, where one's override calls the other's before super, would settle it.
Merge order: #395 → #396 (base to main) → this PR (base to main). Each also waits for the automated reviewer on its head.
284km
left a comment
There was a problem hiding this comment.
Reviewed exact head bc72e45 against current parent base c524447, including the existing review, discussion, surrounding dispatch/alias/visibility code and checked-in case inventories. No new actionable code findings.
The override guard correctly routes Ruby definitions through the existing user-method path, and the exception cleanup bounds the reflection bypass. I also checked the earlier review's nested-call question: another class's override called directly or through a block before the outer super matches Ruby on both engines. The bypass is set only when super_missing redispatches; it is not held throughout the outer Ruby method.
Independent focused validation: 30 exact exit/stdout/stderr comparisons against Ruby 4.0.10 passed. Corpus 959 and additional inheritance/prepend/visibility/retained-Method/exception-cleanup probes passed all eight evaluator/VM × Hash-index on/off × normal-GC/GC32 configurations; three related reflection corpus files passed both engines and Hash modes; the nested/block control passed both engines. Current-base O2 controls reproduce the corpus959 override mismatch on both engines. Nine source audits passed, including GC roots against the completed fresh emission. The checked-in Module/Object/Method inventories preserve all observed parent passing identities; the incomplete baseline Method VM runs and existing failures/timeouts remain limitations, not passing full-file evidence.
Binary reuse disclosed: verified 747 tracked source/build inputs for each side, independently fetched and matched pinned mgz 661a01d8, checked O2 and binary SHA-256, and freshly emitted C plus the FFI header with pinned compiler 9dec2ff6; both outputs are byte-identical to the recorded candidate build. Candidate binary SHA-256: f8cad0e3d36392a5ca1c38582911b5a88a1072f2ee8cdfba991f56073e5900f2. I did not recompile native code or rerun full framework/core/resource acceptance.
No merge: #395 and draft #396 remain unmerged prerequisites, and hold_all_merges/new_failure_review_required remains active. Current-main CI run 46101446305 at 0f0413c is pending and exposes no jobs yet; this does not clear prior failures. Candidate Linux build is still running and macOS/reference jobs are queued, so the remaining coverage is not merely verified unassigned runner queues. Focused review success does not waive those gates.
|
The nested-call question is covered by the exact-head automated review: it independently ran another class's override both directly and through a block before the outer super, matching Ruby on evaluator and VM. The bypass is set only during super_missing redispatch, after the outer override reaches super; it is not held while the outer Ruby body calls the inner class. No source push is needed for that question. Independent validation and scope are recorded in #399 (review) . Parent #396 is now Ready again after the clock-value fix; #395's CI investigation/global hold still prevents merging. |
|
Full Rails-1 component measurement for #395 / #396 / #399. This measures the frozen runtime6183e249 (binary SHA256f8cad0e3d36392a5ca1c38582911b5a88a1072f2ee8cdfba991f56073e5900f2). The publication head of399 adds reviewed parent tooling and records; it does not change those runtime inputs. These are exact-source observations, not a claim about an arbitrary later main. One fresh native installation was made by that exact binary and then shared across this frozen measurement epoch. No installation from an older/different binary was reused. The native install records its own original installer revision; later policy-only tooling verifies unchanged locks, C API/lib and installer/run/bootstrap function ASTs before reusing it. AS/AM/AV use tool7dd171fe with the unchanged opaque policy; AJ/Mailer use the reviewed calendar-validation toola9b46e4b. Per-cohort tool/native provenance remains explicit. All runs used normal GC, fixed seed12345, jobs2,600s/2GiB per-file-family bounds, shared machine-wide cap2 and one full framework component at a time. Reference selector tools/ref_ruby.sh: clean4.0.10/a704b7cd95, Prism1.8.2, zero extra gems. Rails8.1.4.1/3f290b759c8e2ffe7c257951b1255740751355e4, compiler9dec2ff6, mgz661a01d8. Complete file states do not imply passing cases: every remaining RED/BOTH and strict_all_pass result is preserved. External residuals are linked to their own issues. The TestAdapter supplement is a separate coverage cohort and is never added to the mixed-adapter component total. Portable JSON record SHA256: The following includes all per-file states and start/end times. Logs, complete case inventories and JSON are retained locally. Results are reported in PR comments to avoid a record-only follow-up push/another CI fan-out. activesupport integration measurementAll 162 selected files measured against clean Ruby 4.0.10 through
Per-side file states:
Remaining REDs by file:
Bounded files requiring isolated reruns: 0.
Qualifications:
Prior-MATCH guard evaluator: no lost prior passing identity. Guard SHA256 Prior-MATCH guard vm: no lost prior passing identity. Guard SHA256 |
|
Full Rails-1 component measurement for #395 / #396 / #399. This measures the frozen runtime6183e249 (binary SHA256f8cad0e3d36392a5ca1c38582911b5a88a1072f2ee8cdfba991f56073e5900f2). The publication head of399 adds reviewed parent tooling and records; it does not change those runtime inputs. These are exact-source observations, not a claim about an arbitrary later main. One fresh native installation was made by that exact binary and then shared across this frozen measurement epoch. No installation from an older/different binary was reused. The native install records its own original installer revision; later policy-only tooling verifies unchanged locks, C API/lib and installer/run/bootstrap function ASTs before reusing it. AS/AM/AV use tool7dd171fe with the unchanged opaque policy; AJ/Mailer use the reviewed calendar-validation toola9b46e4b. Per-cohort tool/native provenance remains explicit. All runs used normal GC, fixed seed12345, jobs2,600s/2GiB per-file-family bounds, shared machine-wide cap2 and one full framework component at a time. Reference selector tools/ref_ruby.sh: clean4.0.10/a704b7cd95, Prism1.8.2, zero extra gems. Rails8.1.4.1/3f290b759c8e2ffe7c257951b1255740751355e4, compiler9dec2ff6, mgz661a01d8. Complete file states do not imply passing cases: every remaining RED/BOTH and strict_all_pass result is preserved. External residuals are linked to their own issues. The TestAdapter supplement is a separate coverage cohort and is never added to the mixed-adapter component total. Portable JSON record SHA256: The following includes all per-file states and start/end times. Logs, complete case inventories and JSON are retained locally. Results are reported in PR comments to avoid a record-only follow-up push/another CI fan-out. activemodel integration measurementAll 58 selected files measured against clean Ruby 4.0.10 through
Per-side file states:
Remaining REDs by file: Bounded files requiring isolated reruns: 0.
Qualifications:
Prior-MATCH guard evaluator: no lost prior passing identity. Guard SHA256 Prior-MATCH guard vm: no lost prior passing identity. Guard SHA256 |
|
Full Rails-1 component measurement for #395 / #396 / #399. This measures the frozen runtime6183e249 (binary SHA256f8cad0e3d36392a5ca1c38582911b5a88a1072f2ee8cdfba991f56073e5900f2). The publication head of399 adds reviewed parent tooling and records; it does not change those runtime inputs. These are exact-source observations, not a claim about an arbitrary later main. One fresh native installation was made by that exact binary and then shared across this frozen measurement epoch. No installation from an older/different binary was reused. The native install records its own original installer revision; later policy-only tooling verifies unchanged locks, C API/lib and installer/run/bootstrap function ASTs before reusing it. AS/AM/AV use tool7dd171fe with the unchanged opaque policy; AJ/Mailer use the reviewed calendar-validation toola9b46e4b. Per-cohort tool/native provenance remains explicit. All runs used normal GC, fixed seed12345, jobs2,600s/2GiB per-file-family bounds, shared machine-wide cap2 and one full framework component at a time. Reference selector tools/ref_ruby.sh: clean4.0.10/a704b7cd95, Prism1.8.2, zero extra gems. Rails8.1.4.1/3f290b759c8e2ffe7c257951b1255740751355e4, compiler9dec2ff6, mgz661a01d8. Complete file states do not imply passing cases: every remaining RED/BOTH and strict_all_pass result is preserved. External residuals are linked to their own issues. The TestAdapter supplement is a separate coverage cohort and is never added to the mixed-adapter component total. Portable JSON record SHA256: The following includes all per-file states and start/end times. Logs, complete case inventories and JSON are retained locally. Results are reported in PR comments to avoid a record-only follow-up push/another CI fan-out. actionview integration measurementAll 64 selected files measured against clean Ruby 4.0.10 through
Per-side file states:
Remaining REDs by file:
Bounded files requiring isolated reruns: 0.
Qualifications:
Prior-MATCH guard evaluator: no lost prior passing identity. Guard SHA256 Prior-MATCH guard vm: no lost prior passing identity. Guard SHA256 |
|
Full Rails-1 component measurement for #395 / #396 / #399. This measures the frozen runtime6183e249 (binary SHA256f8cad0e3d36392a5ca1c38582911b5a88a1072f2ee8cdfba991f56073e5900f2). The publication head of399 adds reviewed parent tooling and records; it does not change those runtime inputs. These are exact-source observations, not a claim about an arbitrary later main. One fresh native installation was made by that exact binary and then shared across this frozen measurement epoch. No installation from an older/different binary was reused. The native install records its own original installer revision; later policy-only tooling verifies unchanged locks, C API/lib and installer/run/bootstrap function ASTs before reusing it. AS/AM/AV use tool7dd171fe with the unchanged opaque policy; AJ/Mailer use the reviewed calendar-validation toola9b46e4b. Per-cohort tool/native provenance remains explicit. All runs used normal GC, fixed seed12345, jobs2,600s/2GiB per-file-family bounds, shared machine-wide cap2 and one full framework component at a time. Reference selector tools/ref_ruby.sh: clean4.0.10/a704b7cd95, Prism1.8.2, zero extra gems. Rails8.1.4.1/3f290b759c8e2ffe7c257951b1255740751355e4, compiler9dec2ff6, mgz661a01d8. Complete file states do not imply passing cases: every remaining RED/BOTH and strict_all_pass result is preserved. External residuals are linked to their own issues. The TestAdapter supplement is a separate coverage cohort and is never added to the mixed-adapter component total. Portable JSON record SHA256: The following includes all per-file states and start/end times. Logs, complete case inventories and JSON are retained locally. Results are reported in PR comments to avoid a record-only follow-up push/another CI fan-out. activejob integration measurementAll 22 selected files measured against clean Ruby 4.0.10 through
Per-side file states:
Remaining REDs by file: Bounded files requiring isolated reruns: 0.
Qualifications:
|
|
Full Rails-1 component measurement for #395 / #396 / #399. This measures the frozen runtime6183e249 (binary SHA256f8cad0e3d36392a5ca1c38582911b5a88a1072f2ee8cdfba991f56073e5900f2). The publication head of399 adds reviewed parent tooling and records; it does not change those runtime inputs. These are exact-source observations, not a claim about an arbitrary later main. One fresh native installation was made by that exact binary and then shared across this frozen measurement epoch. No installation from an older/different binary was reused. The native install records its own original installer revision; later policy-only tooling verifies unchanged locks, C API/lib and installer/run/bootstrap function ASTs before reusing it. AS/AM/AV use tool7dd171fe with the unchanged opaque policy; AJ/Mailer use the reviewed calendar-validation toola9b46e4b. Per-cohort tool/native provenance remains explicit. All runs used normal GC, fixed seed12345, jobs2,600s/2GiB per-file-family bounds, shared machine-wide cap2 and one full framework component at a time. Reference selector tools/ref_ruby.sh: clean4.0.10/a704b7cd95, Prism1.8.2, zero extra gems. Rails8.1.4.1/3f290b759c8e2ffe7c257951b1255740751355e4, compiler9dec2ff6, mgz661a01d8. Complete file states do not imply passing cases: every remaining RED/BOTH and strict_all_pass result is preserved. External residuals are linked to their own issues. The TestAdapter supplement is a separate coverage cohort and is never added to the mixed-adapter component total. Portable JSON record SHA256: The following includes all per-file states and start/end times. Logs, complete case inventories and JSON are retained locally. Results are reported in PR comments to avoid a record-only follow-up push/another CI fan-out. activejob integration measurementAll 21 selected files measured against clean Ruby 4.0.10 through
Per-side file states:
Remaining REDs by file: Bounded files requiring isolated reruns: 0.
Qualifications:
|
|
Current-head CI follow-up: the completed corpus job140874758010 fails in reference Ruby4.0.10 This is the same inherited corpus1009 Unicode fixture failure already fixed in parent #395 head55f519ed. That parent preserves every Unicode-name/encoding/fallback assertion and has independent1031-file ISeq acceptance; #399 still contains the older parent fixture. I am keeping this failed CI observation explicit and will integrate/retarget after the parent chain merges, then validate the resulting exact head. No record-only or speculative child push, no CI-pass or merge-hold clearance claim. |
AMQP defines
AMQ::Protocol::Method.methodsas its collection of protocol method classes. Mere returned the native Symbol list first, so ActiveJobexceptions_teststopped during loading and left 33 cases missing. Give Ruby class reflection overrides their normal dispatch priority, preserving visibility, inherited/extended methods, blocks,super, retained builtin Methods and aliases.Stacked on #396, which is stacked on #395. This diff contains only the interpreter fix, expanded corpus959 and its evidence. The framework tooling/dependency changes remain in #396. No C API or VM implementation changes.
Measured runtime
6183e2493d10a687a9dfabc3625de71698d5463cagainst the #395 runtime42e57da3679bdb3d5699c1d27ffdbc9ebb2e9a2b; framework tooling7dd171fe68f6dfc9dceb49941b817b84daf57758. The publication tree has identical runtime inputs and adds the already reviewed parent tooling/records.Reference: clean Ruby 4.0.10 via
tools/ref_ruby.sh, revisiona704b7cd95a42cc0cf5f307137bf3aac0285b915, Prism 1.8.2, zero extra gems. Compiler 9dec2ff6 / mgz 661a01d8; ordinary O2.test_helper_test.rblogging_test.rbinstrumentation_test.rbstructured_event_subscriber_test.rbexceptions_test.rbRelated CRuby files, each compared with the frozen parent on both engines: Module195 (evaluator clean; same VM
test_complemented_method_entry_memory_leakTimeout), Object67 (same2 shape/ObjectSpace failures), Method99 (same pre-existing non-interned-name failure and compaction skip on complete runs). The initial baseline Method VM run hit MEMORY_LIMIT. Its serial single-file replay again hit MEMORY_LIMIT (2,162,656 KiB); the candidate completed 99 (1 existing failure/1 skip,1,625,792 KiB). The relevant 19-case selection is COMPLETE on both engines before/after, with the same existing non-interned-name failure. These results are retained separately, without claiming a stable memory improvement. Complete inventories and any bounded states are in the loop/JSON; no observed parent passing case regressed.Fresh 96-gem candidate native install with the exact measured binary. The control reuses the installation freshly made by the identical parent binary in the earlier #395 measurement: runtime42e57da3, binary SHA25655f31f7f983b26120184e294b9ff6603ada3fadda257981eff5f1e263d5c1660. Both install/source/tool/binary guards pass. Reference Gem.default_dir is unchanged.
Large-file RSS: AS
json/encoding_test.rb,158MATCH on every run, normal GC, seed12345, jobs2,600s/2GiB family bounds; three alternating pairs per engine. Order differences remain recorded; a fixed seed does not imply identical case order.Sample ranges overlap; these measurements do not establish a stable memory improvement.
Instruction counts include startup, 5000 queries per process, medians of 3 alternating pairs, Ruby checksums matched. The normal class path adds the existing method lookup to distinguish a Ruby override from the inherited native query. No per-operation or zero-cost claim.
Record:
loop/2026-11-28-codex-rails1-class-reflection-overrides.mdandrailstest/framework/records/class-reflection-overrides.json. Final component-wide measurements run separately on this frozen runtime; they are not claimed here.Ready for exact-head bot review. The owner controls merging and the existing global hold; no self-merge.