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
.graphifyignore matches a nested path but edges from it still land in graph.json (survives forced rebuild + cache purge) #2773
Version: graphifyy 0.7.5 Environment: Linux x86_64, Python 3.14
Summary
.graphifyignore entries do not exclude matched files from the resulting graph. Edges sourced from ignored paths persist through graphify update . --force after a full purge of graphify-out/cache/ and graphify-out/.graphify_ast.json, so this isn't a stale-cache issue — the files are being (re-)parsed on every run despite matching ignore rules.
Repro
.graphifyignore (repo root):
archive/
vertiver-prototype-v2/
Both patterns match, redundantly, a real on-disk path:
tests_integration_free_port only exists in the archived tree; IrohLoroTransport::bind() is live production code. This edge fed into GRAPH_REPORT.md's "Extractable standalone module" analysis for the live module, i.e. the false edge propagated into a human-facing architectural claim.
Likely related
#2267 shows .graphifyignore being bypassed by design for graphify-out/memory/ via a hardcoded second scan root in detect.py. This report is a different code path (nested nested nested-directory nested-pattern matching under a user-declared ignore, not the built-in memory exemption), but the failure class — files that should be excluded are still walked and their edges still land in graph.json — is the same, so I'm noting it in case the root cause is shared (e.g. ignore-pattern matching applied at one scan phase but not at edge-resolution/AST-cache phase).
Ask
Confirm whether .graphifyignore is applied only at the initial file-discovery phase and not re-checked when resolving cross-file edges during graph construction.
If so, apply the same ignore check at edge-resolution time, or document that nested-directory ignore patterns require the directory to be moved out of the tree entirely (current workaround).
Dug into this — reproduced it, but the result is a bit different than expected.
Confirmed on v0.7.5 (matching the version in this report) using your exact repro: grep -c 'archive/' graphify-out/graph.json stays at the same count before and after update . --force with a purged cache. Root cause in that version's _rebuild_code() (watch.py):
new_ast_ids = {n["id"] for n in result["nodes"]}
preserved_nodes = [n for n in existing.get("nodes", []) if n["id"] not in new_ast_ids]
This merge only ever adds/replaces nodes for files in the current extraction batch — it never checks whether a preserved node's source file is still part of the current corpus. So a file that becomes newly-ignored (not deleted, just excluded) is simply absent from this run's result, and its old nodes get carried forward forever, indistinguishable from an unchanged file. There's no ignore/corpus-membership check anywhere in that function. Matches the impact you described exactly — nothing enforces exclusion at merge time, only at (re-)extraction time.
However: I ran the identical repro against current v8 (0.9.44) and could not reproduce it there — the newly-ignored file is correctly pruned, with an explicit log line (pruned N node(s) from M newly-ignored file(s)...). That version has a materially different reconciliation path in watch.py that explicitly checks live ignore rules against existing graph nodes before preserving them, which v0.7.5 doesn't have.
So this looks like it may already be fixed upstream and just not present in the version installed here. @oilsinwater — can you confirm whether this still reproduces if you upgrade to the latest release? If it does, I'd like to see the repo/version details since my repro on current HEAD doesn't trigger it, which means there's a different code path involved than the one I found. If it's already fixed on latest, this can probably close as resolved-by-upgrade.
Activity
AromalBiju1 commentedon Aug 16, 2026
Dug into this — reproduced it, but the result is a bit different than expected.
Confirmed on v0.7.5 (matching the version in this report) using your exact repro:
grep -c 'archive/' graphify-out/graph.jsonstays at the same count before and afterupdate . --forcewith a purged cache. Root cause in that version's_rebuild_code()(watch.py):This merge only ever adds/replaces nodes for files in the current extraction batch — it never checks whether a preserved node's source file is still part of the current corpus. So a file that becomes newly-ignored (not deleted, just excluded) is simply absent from this run's
result, and its old nodes get carried forward forever, indistinguishable from an unchanged file. There's no ignore/corpus-membership check anywhere in that function. Matches the impact you described exactly — nothing enforces exclusion at merge time, only at (re-)extraction time.However: I ran the identical repro against current
v8(0.9.44) and could not reproduce it there — the newly-ignored file is correctly pruned, with an explicit log line (pruned N node(s) from M newly-ignored file(s)...). That version has a materially different reconciliation path inwatch.pythat explicitly checks live ignore rules against existing graph nodes before preserving them, which v0.7.5 doesn't have.So this looks like it may already be fixed upstream and just not present in the version installed here. @oilsinwater — can you confirm whether this still reproduces if you upgrade to the latest release? If it does, I'd like to see the repo/version details since my repro on current HEAD doesn't trigger it, which means there's a different code path involved than the one I found. If it's already fixed on latest, this can probably close as resolved-by-upgrade.