feat: blast radius, thread cap, edit benchmarks#30
Merged
Conversation
When an edit touches a function signature region (start_line..=start_line+3), tilth_edit now appends a blast radius section showing external callers that may break. Struct/enum/interface edits trigger the heuristic but currently only detect call-site references (text-based reference search planned next). Uses existing find_callers_batch with bloom + memchr pre-filter for fast parallel file walking. Self-references filtered via path canonicalization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only functions have meaningful blast radius via find_callers_batch (call-site detection). Struct/enum/interface edits triggered the heuristic but always returned empty — dead code path. Removed to keep the trigger honest. Type reference search (tree-sitter type_identifier matching) can be added later if struct blast radius proves valuable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove redundant "use tilth tools" preamble (already in SERVER_INSTRUCTIONS). Add blast radius mention. Scope to tilth_edit only. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Default to min(cores/2, 6) threads for both rayon and ignore walker. Override with TILTH_THREADS env var. On M4 Max this reduces peak CPU from ~1100% to ~600% during searches. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace string-matching correctness checks with actual repo test suites. Each task introduces a deliberate bug, the agent fixes it, and the repo's own tests verify the fix. Tasks cover ripgrep (Rust), FastAPI (Python), Gin (Go), and Express (JS). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CLAUDE.md: add blast.rs entry in search/ directory listing - AGENTS.md: add tilth_edit section matching EDIT_MODE_EXTRA from mcp.rs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <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
find_callers_batchon touched definitions)min(cores/2, 6)for both rayon and ignore walker, override withTILTH_THREADSenv var. Fixes High CPU usage #27Test plan
cargo clippy -- -D warningspassescargo test— 58 tests passtilth_editon a function signature shows blast radius callerspython benchmark/run.py --models sonnet --tasks rg_edit_line_count,express_edit_json_type --modes tilth🤖 Generated with Claude Code