Repository navigation
Commit 7f026f5
committed
feat: impact resolves callers, reads staged snapshots, bounds git
Agents grepped for "who calls X" because every diffctx entry point needed
a change to anchor on. `--symbol NAME|PATH:NAME` (CLI, MCP `symbol`)
anchors impact on a name's definitions instead: where it is defined, who
calls it, the tests that reach each caller. The MCP tool defaults to
impact, which its own description promised; a base install's
`diffctx-mcp` names the missing extra instead of dying on `import anyio`,
and answers `--version`.
A caller was a spelling match: a name in a string or a comment,
`re.search` for a changed `search`, `update.message` for `Bot.message`,
the other app's `App.tsx`, `legacy/pricing.py` for `shop/pricing.py`.
In Python and JS/TS a caller is now resolved through the import that
carries it — relative and absolute imports, aliases, re-exports,
`require`, `tsconfig` paths read as data — and a method through its
receiver: `self`/`this` in the class or a subclass, the class itself, a
variable constructed or annotated as it. An unresolved import or receiver
is a possible caller with its reason, never a definite one; other
languages keep the name model and say so. A name defined everywhere, or a
trait method reached through `dyn`, says its callers were not resolved
instead of reading as uncalled, and an empty answer is scoped: no resolved
static caller in the analysed scope. Test links say what static analysis
shows — "reachable from tests", "no static test link found" — never
coverage. The alias edges reach the graph too, so pack and locate see an
aliased call.
`--diff staged` (also `--diff=--cached`, MCP `diff_ref="staged"`)
captures the index once as a tree and answers for it alone: an explicit
range is now read from its own head tree — the file universe, discovery,
the edge builders, the fragments, the stale-reference search — and never
from the disk. An unborn branch diffs against the empty tree of its object
format, an unmerged index is an error, and impact names the index tree.
Impact asks git about the resolved range, so a `24h` window no longer
asks about a revision named `24h`.
A stalled git could hang a run for hours: every git child now gets what is
left of one run deadline, its pipes are read on threads, its whole process
group is killed, a cat-file stream that lost its framing is discarded and
the file re-read, an interrupted read is reported instead of filled from
disk, MCP cancellation stops the native run, and the corpus harness names
a case that outlives its limit.
The plugin hook keys an answer by a content-addressed result identity, so
every spelling of one snapshot shares it and any new byte is answered at
once; it records an answer only when delivered, retries a timeout or a
partial answer at most twice, reminds at a commit only when its target is
exactly what was shown, ignores piped and summary-only views, labels a
`-a` or `add && commit` preview as one and checks the commit that lands,
logs git hidden in a subshell, fits its answer to 600 tokens, answers a
search for an edited name, and reviews --amend against HEAD~1.
Python call edges cleared the naming floor almost never: an import
confirmed only the fragment that held it. Confirmation is per file,
discovery follows the changed files' own imports and no longer pulls in a
whole package. Coverage says partial only when a limit touched what the
answer is about, and names the file; locate's JSON fits its budget;
co-change history is read before the range's head; only a file with a
grammar can be unparsed.
Also: reverse discovery reads func/fun and Java/C# methods, not locals;
the tags fallback no longer links code by syntax words; rescue lets a
signature stand in for a caller's body; deleted files and lines still
naming a deleted or renamed path are reported; publish-extras restores a
pruned tag and a drafted release; the site serves a favicon; Renovate
leaves plugin/constraints.txt to uv.lock; setup-uv 10.2.0, tiktoken-rs
0.12.1, thiserror 2.0.21, ruff 0.16.10, pylint 4.0.10; the packaging
manifests for 1.18.2.
Refs: #300, #306, #313, #317, #319, #321, #330, #332, #333, #334, #335,
#336, #337, #338, #339, #340, #341, #342, #343, #344, #345, #346, #347,
#348, #349, #350, #351, #353, #354, #356, #360; #355, #357, #358, #359,
#361, #362 filed.
Claude-Session: https://claude.ai/code/session_01LC9cvWcY1L9YJ1SJB6pBez1 parent 777f4b4 commit 7f026f5
97 files changed
Lines changed: 8801 additions & 931 deletions
File tree
- .github/workflows
- bucket
- crates/diffctx-native
- src
- config
- edges
- history
- semantic
- parsers
- tests
- docs
- architecture
- product
- packaging/npm
- plugin
- evals
- mocks/diffctx
- review-last-commit
- graders
- mocks/diffctx
- hooks
- skills
- commit
- impact
- schemas
- src/diffctx
- _native
- mcp
- tests
- cases/diff
- selection/recall
- synthetic/balanced/suite-3/one-hop
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | | - | |
| 743 | + | |
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
816 | 843 | | |
817 | 844 | | |
818 | 845 | | |
| |||
935 | 962 | | |
936 | 963 | | |
937 | 964 | | |
938 | | - | |
| 965 | + | |
939 | 966 | | |
940 | 967 | | |
941 | 968 | | |
| |||
1118 | 1145 | | |
1119 | 1146 | | |
1120 | 1147 | | |
1121 | | - | |
| 1148 | + | |
1122 | 1149 | | |
1123 | 1150 | | |
1124 | 1151 | | |
1125 | 1152 | | |
1126 | | - | |
| 1153 | + | |
1127 | 1154 | | |
1128 | 1155 | | |
1129 | 1156 | | |
| |||
1145 | 1172 | | |
1146 | 1173 | | |
1147 | 1174 | | |
1148 | | - | |
| 1175 | + | |
1149 | 1176 | | |
1150 | | - | |
1151 | | - | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
1152 | 1180 | | |
1153 | 1181 | | |
1154 | | - | |
| 1182 | + | |
1155 | 1183 | | |
1156 | 1184 | | |
1157 | 1185 | | |
| |||
1196 | 1224 | | |
1197 | 1225 | | |
1198 | 1226 | | |
1199 | | - | |
| 1227 | + | |
1200 | 1228 | | |
1201 | 1229 | | |
1202 | | - | |
| 1230 | + | |
1203 | 1231 | | |
1204 | 1232 | | |
1205 | 1233 | | |
| |||
1435 | 1463 | | |
1436 | 1464 | | |
1437 | 1465 | | |
1438 | | - | |
| 1466 | + | |
1439 | 1467 | | |
1440 | 1468 | | |
1441 | 1469 | | |
| |||
1451 | 1479 | | |
1452 | 1480 | | |
1453 | 1481 | | |
| 1482 | + | |
1454 | 1483 | | |
1455 | 1484 | | |
1456 | 1485 | | |
1457 | 1486 | | |
1458 | 1487 | | |
| 1488 | + | |
1459 | 1489 | | |
1460 | 1490 | | |
1461 | 1491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
| 465 | + | |
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
| 498 | + | |
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
| 538 | + | |
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
34 | 114 | | |
35 | 115 | | |
| 116 | + | |
36 | 117 | | |
37 | 118 | | |
38 | 119 | | |
39 | 120 | | |
40 | 121 | | |
41 | 122 | | |
42 | | - | |
| 123 | + | |
43 | 124 | | |
44 | 125 | | |
45 | | - | |
| 126 | + | |
46 | 127 | | |
47 | 128 | | |
48 | 129 | | |
49 | 130 | | |
50 | | - | |
| 131 | + | |
51 | 132 | | |
| 133 | + | |
52 | 134 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
57 | 141 | | |
58 | 142 | | |
59 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
0 commit comments