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
extract no-op incremental run overwrites graph with empty graph #1347
graphify extract <path> --no-cluster --out <path> can overwrite an existing graph with an empty graph on a no-op incremental run.
The first run builds a valid code graph. The second run detects 0 changed files, but still writes graphify-out/graph.json with 0 nodes, 0 edges.
This is dangerous for CI / cached graph workflows because a no-op refresh destroys the usable graph.
Minimal repro
repo=$(mktemp -d /tmp/graphify-extract-noop.XXXXXX)
mkdir -p "$repo/src"
cat >"$repo/src/a.ts"<<'TS'export function answer() { return 42; }TS# First run creates a valid graph.
graphify extract "$repo" --no-cluster --out "$repo" --max-workers 1
python3 - <<PYimport jsonfrom pathlib import Pathp = Path("$repo") / "graphify-out" / "graph.json"data = json.loads(p.read_text())print("first", len(data.get("nodes", [])), len(data.get("links", data.get("edges", []))))PY# Second run has no changed files but overwrites the graph with an empty one.
graphify extract "$repo" --no-cluster --out "$repo" --max-workers 1
python3 - <<PYimport jsonfrom pathlib import Pathp = Path("$repo") / "graphify-out" / "graph.json"data = json.loads(p.read_text())print("second", len(data.get("nodes", [])), len(data.get("links", data.get("edges", []))))PY
Observed output
[graphify extract] scanning /tmp/graphify-extract-noop...
[graphify extract] found 1 code, 0 docs, 0 papers, 0 images
[graphify extract] AST extraction on 1 code files...
[graphify extract] wrote .../graphify-out/graph.json — 2 nodes, 1 edges (no clustering)
first 2 1
[graphify extract] incremental scan of /tmp/graphify-extract-noop...
[graphify extract] 0 code, 0 docs, 0 papers, 0 images changed; 1 unchanged; 0 deleted
[graphify extract] wrote .../graphify-out/graph.json — 0 nodes, 0 edges (no clustering)
second 0 0
Expected behavior
If the manifest says there are no changed or deleted files, extract should either:
leave the existing graph.json unchanged, or
rewrite the existing graph unchanged.
It should not replace the graph with an empty graph.
Notes
This looks related in spirit to prior incremental safety issues, but I could not find an issue for this exact no-op extract path. This is not an LLM/semantic extraction failure; the repro is code-only and uses --no-cluster.
Activity
fix incremental no-cluster graph updates (#1350)
fix incremental no-cluster graph updates (Graphify-Labs#1350)