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
_origin provenance marker is only stamped by current extract path — legacy AST nodes are misread as semantic #2334
_origin: "ast" is the marker several code paths use to decide whether a node came from AST or
semantic extraction. But it is only stamped by the current extract path (graphify/extract.py:5433),
so graphs carrying nodes written by older versions have a large population of AST nodes with no _origin. Provenance-aware logic then misclassifies them as semantic.
Evidence
Real repo, graph built up across 0.4.x → 0.7.10 → 0.9.27:
document nodes total: 12,243
with _origin == "ast": 783
with no _origin at all: 11,460
All 12,243 are structurally identical — file_type=document, source_location="L<line>" — i.e. all
of them are markdown-extractor output (extractors/markdown.py emits file + heading nodes with L<line>). Semantic extraction emits source_location: null per the extraction spec. So the true
AST population is 12,243 and only 6% of it is marked.
Why it matters
Consumers treat missing _origin as "semantic":
graphify/watch.py:568-583 — preserved_nodes keeps anything without _origin=="ast"
In this repo the misclassification happens to fail safe (legacy AST nodes are preserved rather than
replaced), but it is unintentional, and it makes the marker unusable as the basis for the tier-scoped
merge fix proposed in #2333. A migration that infers _origin where it is missing, or a fallback that
treats source_location =~ ^L\d as AST, would make provenance reliable.
I used the source_location fallback locally and it partitioned the graph correctly where _origin
did not (scenario C vs B in #2333: +2,639 nodes vs -8,290).
Suggested fix
Either (a) backfill _origin on load for nodes matching the AST shape, or (b) make the provenance
predicate a helper that falls back to source_location when _origin is absent, and use that helper
everywhere instead of the raw == "ast" comparison.
Fixed in v0.9.32. The _origin provenance marker is backfilled on load, so graphs written before this change get tier provenance without a rebuild. Part of the tier-aware merge fix (#2333/#2336). Thanks.
Activity
fix(build,watch): tier-aware merge so re-extract keeps the other layer (
chore: bump to 0.9.32; changelog for #2333/#2334/#2336/#2342/#2326/#2323
safishamsi commentedon Aug 1, 2026
Fixed in v0.9.32. The
_originprovenance marker is backfilled on load, so graphs written before this change get tier provenance without a rebuild. Part of the tier-aware merge fix (#2333/#2336). Thanks.fix(build,watch): tier-aware merge so re-extract keeps the other layer (
chore: bump to 0.9.32; changelog for Graphify-Labs#2333/Graphify-Labs…
fix(watch): drop an external import stub once no edge references it