Repository navigation
Detect explicit Rails association dependencies without booting Rails - #111
Open
TristanKruse wants to merge 1 commit into
Open
TristanKruse wants to merge 1 commit into
TristanKruse wants to merge 1 commit into
Conversation
TristanKruse
marked this pull request as ready for review
November 25, 2026 08:43
This branch has not been deployed
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.
Closes #102.
What changed
CheckOptions.new(rails_associations: true)/--rails-associationsdetects explicit literalclass_nameon the four supported Active Record-style class-body macros. Existing imports,constant mode and
--rails-importsremain unchanged by default.Rails model namespace lookup
rather than Ruby lexical lookup. Root qualification, namespace conflicts and repeated evidence
are tested. Merge one file edge while preserving its original import, constant and association evidence.
New mode has a distinct cache and baseline scope; disabled fingerprints are unchanged.
polymorphic/through lookup, custom macro chains, or implied full Rails coverage.
Verification
missing/excluded/ambiguous definitions, unrelated receivers, mixed evidence, cache identity,
baseline isolation and CLI parse errors. Package smoke verifies JSON/text and keeps existing Rails
helper behavior intact without booting target code.
allocated objects, ~0.50 MiB more retained Ruby heap when enabled. Detects all 1,000 intended
new edges and warm snapshot reuse in both modes. Raw evidence in the study directory.