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
build_merge prune_sources silently no-ops on absolute paths and reports 'already clean' (deleted nodes never pruned on Windows) #2446
build_merge(prune_sources=...) compares the caller's paths against each node's source_file. Node source_file is repo-relative POSIX, but callers naturally pass the absolute paths that detect/detect_incremental and manifest.json produce. Unless root= is also passed, nothing matches — and the run then prints "no matching nodes or edges in graph, already clean", which reads as confirmation rather than as the no-op it is.
Version: graphifyy 0.8.36, Windows 11.
Verified on a live graph
sample node source_file : Dealer-Version-2-/DDS_Demo/SolveOneBoard/OneBoard.c
sample manifest key : C:\j\Bridge\OurBridge\Dealer-Version-2-\DDS_Demo\SolveOneBoard\OneBoard.c
prune entry normalized : C:/j/Bridge/OurBridge/Dealer-Version-2-/DDS_Demo/SolveOneBoard/OneBoard.c
would it match a node? : False
The normalization is _norm_source_file in build.py:
p=p.replace("\\", "/")
ifrootandos.path.isabs(p): # <-- only relativizes when root is giventry:
p=Path(p).relative_to(root).as_posix()
exceptValueError:
passreturnp
With root=None (the default) an absolute prune path stays absolute, while nodes are relative, so the sets are disjoint by construction.
Observed on a real incremental update of 122 changed/deleted files:
[graphify] 122 source file(s) deleted since last run -- no matching nodes or edges in graph, already clean.
[graphify update] Merged: 6727 nodes, 10540 edges
Every one of the 122 had nodes in the graph. None were pruned.
Consequence
Deleted files' nodes are never removed from the graph on Windows, so stale nodes accumulate across updates. The message actively misleads: "already clean" is emitted for the case "0 of N matched", which is exactly when something is wrong.
Suggested fix
Two independent improvements, either of which would have surfaced this:
Normalize prune_sources the same way as node source_file — e.g. default root to the graph's root when it can be inferred, or relativize prune entries against it before comparing.
Don't report a zero-match prune as "already clean". When prune_sources is non-empty and nothing matched, that is far more likely a path-format mismatch than a clean graph; a warning naming both formats (one sample prune entry, one sample node source_file) would make it self-diagnosing.
(1) fixes the bug; (2) is the part that turns a silent no-op into a loud one, and would be valuable even after (1) lands.
Fixed in v0.9.35. prune_sources given absolute paths under a non-standard layout now derives the scan root by suffix-matching stored source paths, reports the accurate matched-file count, and warns (instead of "already clean") when a prune matches nothing. Applies to both build_merge and merge_raw_extraction. Thanks.
Activity
fix(build_merge): revive the #479 shrink guard and fix absolute-path …
safishamsi commentedon Aug 7, 2026
Fixed in v0.9.35.
prune_sourcesgiven absolute paths under a non-standard layout now derives the scan root by suffix-matching stored source paths, reports the accurate matched-file count, and warns (instead of "already clean") when a prune matches nothing. Applies to bothbuild_mergeandmerge_raw_extraction. Thanks.fix(build_merge): revive the Graphify-Labs#479 shrink guard and fix a…