Skip to content

fix(blast): preserve precise ranges with custom Git diff prefixes - #390

Open
cookerpapa wants to merge 1 commit into
trailhq:mainfrom
cookerpapa:fix/blast-diff-prefixes
Open

cookerpapa wants to merge 1 commit into
trailhq:mainfrom
cookerpapa:fix/blast-diff-prefixes

Conversation

@cookerpapa

Copy link
Copy Markdown

Git prefix settings can prevent patch paths from matching changed files, causing blast to lose line ranges and fall back to whole-file seeds.

Pin a/ and b/ prefixes for the internal patch command. User configuration is preserved. Tests cover working-tree, explicit-base, and last-commit comparisons, plus precise CLI symbol seeds.

Fixes #369.

Validation:

  • 14 new tests; 9 fail before the fix.
  • 55 blast tests pass.
  • Full suite: 1231 passed, 4 skipped.
  • Build and git diff --check pass.

@trailhq-graft

trailhq-graft Bot commented Sep 15, 2026

Copy link
Copy Markdown

🌱 graft blast radius

1 area changed → 2 areas can be affected. 2 dependent symbols, depth 2.
Tests: no test reaches File Diffing.
Tag: @anirudhkumar-nanonets — 3 of 3 areas

flowchart TB
  A0(("Pull Request Review<br/>1 symbol"))
  A1(("Blast CLI<br/>1 symbol"))
  classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
  class A0,A1 reached;
Loading
Can be affected Symbols Nearest hop Reached from
Pull Request Review 1 src/app/review.ts:L45-L99 reviewPullRequest — calls, depth 2 File Diffing
Blast CLI 1 src/blast/blast-cli.ts:L63-L124 runBlastCommand — calls, depth 2 File Diffing
Who knows this code — 1 person across 3 areas
Area Who knows it
File Diffing · changed @anirudhkumar-nanonets — 2 commits, last 25d ago
Pull Request Review · affected @anirudhkumar-nanonets — 3 commits, last 13d ago
Blast CLI · affected @anirudhkumar-nanonets — 7 commits, last 18d ago

Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no @ has no GitHub handle in its commit email — tag them by hand, or add a .mailmap entry. A suggestion from history, not a CODEOWNERS rule.

All 2 dependent symbols, grouped by area

Pull Request Review — 1 symbol in 1 file

  • src/app/review.ts:L45-L99 — reviewPullRequest (calls, depth 2)
    93: // The token is in git's error text on a permissions failure, and this string

Blast CLI — 1 symbol in 1 file

  • src/blast/blast-cli.ts:L63-L124 — runBlastCommand (calls, depth 2)
    77: // git's own message ("unknown revision or path not in the working tree") sends
Test signal per changed area — 1 ✗

Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.

  • File Diffing — 0 of 1 reached · no test file reaches it
    • not reached: diffFiles

graft blast · origin/main...HEAD · depth 2 · 3 changed files

Open the interactive graph → — click an area to see its dependent symbols at file:line.

github-actions Bot added a commit that referenced this pull request Sep 15, 2026
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.

blast: silently falls back to whole-file seeds when git uses diff.mnemonicPrefix (i/ w/ instead of a/ b/)

1 participant