Repository navigation
fix: get_overview accuracy — database string, devise parens, namespaced policies - #33
Merged
Merged
Conversation
…ed policies
- Fix database field returning raw config object instead of adapter string:
config.database can be {adapter: 'postgresql', pool: 5} from the config
extractor; handler now extracts .adapter to return a plain string
- Fix Devise modules not extracted when declared with parentheses: the
deviseModules pattern required a space after 'devise', missing the
'devise(:module)' parenthesis form; changed to /devise[\s(]/
- Fix namespaced Pundit policy classes not detected: policyClass pattern
failed on 'class Admin::LogsPolicy < ApplicationPolicy'; updated to
support namespace prefixes via (?:[\w]+::)*
- Add regression tests for all three fixes (7 new test cases)
- Eval: get_overview mean composite 0.854 → 0.999 across 6 apps
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.
Summary
Fixes two issues found during
get_test_conventionsevaluation across 6 Rails apps (mean composite: 0.924, target 0.98):1. Remove 20-file sampling limit (P0)
The extractor previously sampled only the first 20 spec files for convention detection. In projects with 50+ spec files, this caused:
Now scans all spec files. Cost is negligible.
2. Add 16 missing spec category directories (P2)
classifySpecFile()only handled 14 directory prefixes. Added 11 RSpec + 5 Minitest directories.Tests