Repository navigation
Description
Summary
A full build resolves a cross-file member call such as Service.ping(). Rebuilding only the caller drops that calls edge when the target file is unchanged.
Reproduction
B.ts:
export class Service {
ping(): number { return 1; }
}A.ts:
import { Service } from "./B";
export function run(): number {
const service = new Service();
return service.ping();
}- Full build: the
run() -> ping()callsedge is present. - Edit only
A.ts(keeping the member call) and rebuild incrementally withchanged_paths=[A.ts]. - The
callsedge is gone. It only comes back after a full rebuild.
Why the #2406 fix does not cover this
The shared direct-call resolution context added in #2406 widens the label/file indexes of the shared direct cross-file call pass only. That is enough for a plain shared(), but not for member calls:
- Member calls are resolved by the language-specific resolvers, not the shared pass.
- Those resolvers depend on transient per-file artifacts — notably
ts_type_table(and the equivalent per-language type/receiver tables) — plus the callee file'scontains/methodedges, to know thatserviceis aServiceand thatServiceownsping. - None of those artifacts are stored in
graph.json. An incremental rebuild only has them for the files it just parsed, so the unchanged callee's type information simply does not exist in that run.
Passing persisted nodes into those resolvers therefore cannot fix this the way it fixed the direct-call case — the missing input is the type table, not the node list.
Possible directions
- Persist a safe, minimal subset of resolver metadata (e.g. a per-file receiver/type map) alongside the graph, versioned so a stale or absent map degrades to today's behavior.
- Or reconstruct the needed metadata for just the referenced target files, without reparsing the full corpus.
Constraints any fix must keep
- Stale calls must still disappear. If the member call is removed from the changed caller, the old edge must be evicted — preserving old outgoing edges from changed files is not an acceptable workaround.
- Ambiguity must continue to fail closed. When the receiver's type cannot be determined unambiguously, no edge should be emitted, matching current conservative behavior.
Tracking
tests/test_watch.py::test_incremental_rebuild_drops_member_call_to_unchanged_target is an xfail(strict=True) covering exactly this reproduction. Closing this issue should make it pass and the marker should then be deleted.
Related to #2406 (which fixes the shared direct-call case only, and does not address this one).
Activity
fix(extract,watch): C# assembly-aware partial merge, incremental edge…
safishamsi commentedon Aug 5, 2026
Fixed in v0.9.33 (
graphifyy==0.9.33on PyPI). Incremental re-resolution now sees the unchanged corpus (its nodes andcontains/methodedges), so a member call from a changed file into an unchanged target survives the incremental rebuild. Edges to a genuinely removed target are still evicted. Thanks for the report and the repro.fix(extract,watch): C# assembly-aware partial merge, incremental edge…