You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Warm incremental extract reads and decodes graph.json three times #5527
An unchanged incremental graphify extract --code-only --no-cluster reads and parses the same graphify-out/graph.json three times. The stale-source check reads it first, the missing-node recovery check reads it again, and resolver setup reads it a third time even when there are no AST inputs.
On a warm graph from our TypeScript monorepo, this means decoding a 65 MiB JSON file three times during a run that finds no source changes. In one instrumented run, those reads and parses took about 0.8 seconds in total, before accounting for resolver setup.
Steps to reproduce
# From a Graphify source checkout after uv sync --all-extras.
scratch=$(mktemp -d)printf'def example():\n return 1\n'>"$scratch/example.py"
uv run --frozen graphify extract "$scratch" --code-only --no-cluster --out "$scratch"
PYTHONHASHSEED=0 uv run --frozen python - "$scratch"<<'PY'import runpyimport sysfrom pathlib import Pathtarget = Path(sys.argv[1]).resolve()saved = target / "graphify-out" / "graph.json"original = Path.opendef trace(path, mode="r", *args, **kwargs): if path == saved and "r" in mode: print("reading graph.json", flush=True) return original(path, mode, *args, **kwargs)Path.open = tracesys.argv = ["graphify", "extract", str(target), "--code-only", "--no-cluster", "--out", str(target)]runpy.run_module("graphify", run_name="__main__")PY
Actual output
The second run prints reading graph.json three times and reports AST extraction on 0 code files before the no-change exit.
Expected behavior
Read the saved graph once for the incremental source checks and skip resolver setup when there are no code changes or sources to reconcile. Keep the saved output intact for the unchanged run.
Environment
Reproduced from a clean checkout of v8 at 0f22ae762e3e3d0b689fc7ad2b8192740628413b (Graphify 0.9.121), macOS arm64, Python 3.14.6, installed from source with uv. The reproduction uses local AST extraction.
Activity
github-actions commentedon Nov 26, 2026
Thanks for opening this issue, @rvitaliy. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
fix(extract): reuse the saved graph during incremental extraction