Repository navigation
Preserve ruby2_keywords through Ruby forwarding methods - #405
Conversation
284km
left a comment
There was a problem hiding this comment.
Reviewed head 1ce83da5 (main.mere +1/-1 in bind_params, corpus 958, record).
- A method declared with
...binds its rest as*__fwd, so it has no keyword parameters and no**. The marked-splat check (a final Hash flagged byruby2_keywordsand arriving through a splat becomes keywords again) therefore never ran for it. Extending the condition tostr_list_has ps8 "*__fwd"makes forwarding keep the flag, which matches Ruby: the forwarded call sees keywords. - The check still requires both the
r2k_marksflag andarg_splat_has, so an unflagged positional Hash stays positional. Corpus 958's positional-Hash negative controls cover that, alongside direct super, block super and explicit-spread super. - Evidence: corpus 958 in all 8 configurations with main reproducing the gap;
test_keyword115/2592 complete on all five sides with its C test extensions rebuilt per side; corpus--bothand the VM corpus are clean.
No findings from me. The merge waits for the automated reviewer on this head.
284km
left a comment
There was a problem hiding this comment.
Reviewed exact head 1ce83da5cc6351eabaf9cba6242aad6040f25514, its existing review/discussion, and current main a882a26ecb185d0548fcf0a986769e8371a7dd83. No new actionable findings in this PR's delta.
The condition correctly extends the existing marked-splat handling to *__fwd; it still requires both the persistent ruby2_keywords mark and this call's splat provenance. The regression covers implicit super, super inside a block, explicit splat-super, and positional-Hash controls.
Independent validation:
- Corpus 958 and an additional forwarding probe each match clean Ruby 4.0.10 (a704b7cd95, Prism 1.8.2) in all eight evaluator/VM × Hash-index on/off × normal-GC/GC32 configurations: 16 exact exit/stdout/stderr comparisons. The additional probe covers blocks, leading positional arguments, marked/unmarked Hashes, trailing arguments, explicit keywords and empty Hashes.
- Fresh ordinary O2 current-main build with pinned compiler
9dec2ff6and mgz661a01d8reproduces the regression on both engines; the head matches Ruby. A separate**nilerror-message mismatch is identical on main/head and is not a new finding. - Candidate O2 binary reuse is explicit: all 2,858 tracked files and the pinned mgz Mere sources match the recorded build; fresh C emission and FFI header match byte-for-byte using the clean pinned compiler. Binary SHA-256
dcfde50cf2b54962c482b8409631d8955092b62dcb506dc50e810a0b69c2c3d6; emitted C8a213cfe7c400705223465c7ff34de0f36796f4e47617068574ceceab23184c6. Native candidate code was not recompiled. - GC roots against fresh C, duplicate definitions, method-write guards, name-length guards, instance-variable access, StrBuf region checks on the standalone head, changed-record hygiene and diff whitespace checks pass.
I inspected the published original/supplemental keyword/core and framework records; I did not independently rerun full corpus, complete CRuby files, framework components or platform resource acceptance. The Mailer result remains a qualified integration comparison containing the separate Array fix.
No merge. Linux build job 140987708595 actually fails the StrBuf region gate for read_path_whole/read_path_at. Fresh current main independently produces the same four source/emitted-C findings. These unchanged helpers belong to the already recorded #373 follow-up, so I am not duplicating that finding here. This real failure is not a runner-queue result. Downstream corpus, CRuby, bootstrap, basic and tool jobs remain queued; evaluator-vs-VM is skipped. Current main CI run 46148220545 is pending with no job records yet. The recorded hold_all_merges/new_failure_review_required remains active. COMMENT because the authenticated reviewer owns this PR.
A
ruby2_keywordswrapper callingsuperinto a method declared with...lost the keyword status of the expanded final Hash. Action Mailer then raised an argument-count/missing-keyword error instead of delivering the message. Apply the existing marked-splat handling when binding forwarding parameters, as well as explicit keyword parameters.The change is one condition in
bind_params. Corpus958 adds direct-super, block-super and explicit-spread-super cases, plus positional-Hash negative controls. #245's native frame/storage work is separate; a later forwarding-marker rename there must retain this semantic check.Clean Ruby4.0.10 via
tools/ref_ruby.sh, revisiona704b7cd95, Prism1.8.2, zero extra gems. Runtime04e11f70; compiler9dec2ff6; mgz661a01d8. Publication adds records to that measured code.run_corpus.sh --both:1036/1036, hash index ON/OFF. VM:1036VM/0fallback/0differences.test_keyword:115tests/2592assertions/0failures/0errors, COMPLETE on all five reference/main/candidate engine sides. Its originalrb_call_super_kwanditertest extensions were freshly built for each side. Earlier missing-extension/CLI failures remain in the diagnostic records.test_super:50cases all passing on all five sides.test_proc:120cases COMPLETE; main and candidate preserve the same existing curry-proc error and compaction skip on both engines. No previously passing main case lost.Mailer target,
message_delivery_test.rb: 22MATCH/3RED →25MATCH/0other, both engines, both sides COMPLETE, no bounds. These target measurements use integrations f2ab6b90→e3c16e54 with identical prerequisites, including then-unmerged parser#402, ActiveJob#395 and class reflection#399. The after integration contains this keyword fix and the separate Array-index fix. Corpus/core checks isolate this PR's behavior; target evidence is qualified as an integration comparison. Standalone main+keyword diagnostics remain0MATCH/25MISSING on both sides because the measured main8ed control predates #402 and hits a false Nokogiri warning under Rails strict warnings. No warning is suppressed. Those three prerequisite PRs have since merged; the records still name the exact measured integrations. Full component sweeps are separate.Large-file RSS, standalone main8edcf953→runtime04e11f70:
activesupport/test/json/encoding_test.rb,158MATCH in all12 runs, normal O2/GC, seed12345, jobs2,600s/2GiB per-file family. Each binary has its own fresh native installation. Three alternating pairs:Ranges overlap; no stable memory improvement is claimed.
Evidence:
loop/2026-11-28-codex-rails1-marked-forwarding-keywords.mdandrailstest/framework/records/actionmailer-marked-keyword-forwarding.json, including all case inventories, source/binary/native-install receipts and raw measurement samples.Exact-head automated review and owner merge-hold clearance remain required. No self-merge or current-head hosted CI-pass claim.
Current-main CI follow-up: the shared
read_path_whole/read_path_atStrBuf region findings introduced by #373 are recorded with that stream. They are unchanged by this one-condition keyword delta; no new-head native integration/CI pass is inferred from source comparison.