Repository navigation
Fix computed dependency argument ordering - #3337
Open
sergioperezcheco wants to merge 1 commit into
Open
sergioperezcheco wants to merge 1 commit into
sergioperezcheco wants to merge 1 commit into
Conversation
Bind computed arguments in declared dependency order and preserve false and nil slots without changing evaluation order. Add regression coverage for shared dependencies, forward references, and false/nil values. Assisted-by: OpenAI gpt-6.1-sol via Hermes Agent Signed-off-by: sergioperezcheco <checo520@outlook.com>
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.
Motivation / Background
PositionalGeneratordocuments computed block arguments as the declareddeps, but currently collects them in evaluation order and dropsfalseandnil. Two computations sharing the same dependencies in opposite orders therefore receive the same argument order; collect each dependency's value in its declared slot instead, without changing graph evaluation or random-number calls.Additional information
The four regression tests cover shared dependencies with different orders, forward references, and false/nil slots; two fail on the original code and all four pass with the fix. On Ruby 3.4.11/macOS, the complete
bundle exec rakepasses (2,185 tests and RuboCop), a separateFaker::Base.generatereproduction passes in eager/lazy loading, and 600 seeded built-in outputs remain byte-identical; other Ruby/OS CI combinations have not been run locally. Alternating local measurements showed an NRIC median fixed/baseline ratio of about 1.036, so this is not a claim of zero performance cost.AI agents performed the investigation, implementation, independent review, and testing; no human review is claimed. This fixes the existing helper contract introduced in #2710, not a new generator or feature, and does not claim a currently broken built-in generator or close #2710.
Checklist
[Fix #issue-number]