Skip to content

Explain Rails preset passes with no cross-file imports - #113

Merged
TristanKruse merged 1 commit into
mainfrom
feature/rails-imports-advisory-109
Nov 27, 2026
Merged

TristanKruse merged 1 commit into
mainfrom
feature/rails-imports-advisory-109

Conversation

@TristanKruse

Copy link
Copy Markdown
Collaborator

Closes #109. A passing imports-only Rails preset now emits a non-failing CLI advisory when every configured layer is populated and no explicit import connects two distinct selected files. The hint recommends --dependency-analysis imports_and_constants without indexing or guessing at missed constants. Text and JSON identify only the affected rules; library checks, baseline fingerprints and exit codes stay unchanged. Includes regression tests for the customer reproduction, overridden folders, self/external/out-of-scope imports, require_dependency, baselines, and parse errors. Extends the installed-gem acceptance check. Local validation: 952 examples, 0 failures (11 Windows symlink skips), clean lint, and 204 validated documentation pages. Independent of #111 and #112.

@TristanKruse

Copy link
Copy Markdown
Collaborator Author

Cost check against main (65a1543), Windows / Ruby 4.0, five paired runs alternating the order on one synthetic 540-file project (three populated Rails layers, no explicit imports). Median wall time per cold graph check: ordinary file rule 396 ms on main vs 390 ms here; Rails preset 403 ms vs 393 ms. Median allocations: 142,790 vs 142,792 and 148,836 vs 148,856 respectively. Timing differences are noise, not a speedup claim. Each sample checked the exit status, violation count and whether the hint was expected. Regression specs additionally assert imports-only never instantiates the constant index. Git merge-tree found no conflicts against the current heads of #111 and #112 individually.

@TristanKruse
TristanKruse merged commit db58085 into main Nov 27, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn about imports-only blind spots in autoloaded Rails preset checks

1 participant