feat(steal): framework-aware code indexing#41
Open
justi wants to merge 1 commit into
Open
Conversation
Steal previously walked every tracked file in every repo, so a Rails app's `db/migrate/2024_billing.rb` ranked alongside `app/models/billing.rb` on a "billing" query — match-quality became a noise problem rather than a ranking problem. `code_block_service` now consults a per-repo profile detected from the manifest (Gemfile, pyproject, package.json). The profile decides which directories feed the 40-line window machinery: app/ + lib/ for Rails, src/ for src-layout Python, etc. Excludes (`migrations/`, `db/migrate/`) match anywhere in the path so they catch nested Django apps too. Repos with no recognisable manifest fall back to `unknown` and keep the previous "everything tracked" behaviour, so markdown- or shell-heavy projects index normally. Side benefits wired in alongside: - `steal_no_results` table tracks zero-hit queries so over-pruning surfaces in days, not months - diagnostic `armillary scan --report-profiles` aggregates the breakdown - code_index SCHEMA_VERSION bump → drop-and-rebuild on first scan after upgrade - per-repo (profile, files_indexed, files_skipped) recorded to metadata_json, observable when a custom layout indexes nothing Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Summary
git ls-filesthrough include/exclude rules before windowing. Repos with no recognisable manifest fall back to the previous "everything tracked" behaviour.migrations/catchessrc/<pkg>/migrations/for src-layout Django apps, not just root-level ones.steal_no_resultstable for over-prune detection, diagnosticarmillary scan --report-profilesflag, per-repo(profile, files_indexed, files_skipped)recorded to metadata so a custom layout indexing nothing is observable.code_indexschema_version bumps → drop-and-rebuild on first scan after upgrade.Test plan
pytest -q— 491 passedruff check .andruff format --check .— cleanarmillary scan --report-profileson the local portfolio shows the expected breakdown across rails / ruby_gem / python_lib / js_frontend / node / unknown rowsunknowninstead of whitelistingsrc/and indexing zero files🤖 Generated with Claude Code