fix(watch): preserve semantic edges of re-extracted sources (#1865)
Fixes #1865
What was broken: A full graphify update (and the post-checkout hook) silently evicted LLM-extracted semantic edges (semantically_similar_to, …) whose source_file is a document that also has an AST extractor (.md, .mdx, .qmd). Concept nodes survived; the edges connecting them were dropped, and since the graph grew overall the shrink guard never fired.
Root cause: _reconcile_existing_graph preserves nodes provenance-aware (_origin == "ast", #1116) but evicted edges purely by source_file membership in the re-extracted set. On a full rebuild that set includes every doc with an AST extractor, so semantic edges were treated as owned by an AST pass that cannot regenerate them.
Change: AST-extracted edges now carry the same _origin: "ast" marker as nodes, and rebuild-driven edge eviction only claims that tier — a re-extraction replaces a source's AST edges while its semantic edges survive until a semantic re-extraction supersedes them. Deletion-driven eviction stays provenance-blind, so edges of deleted or excluded sources are still purged. graph.json already persists _-prefixed edge attrs (_src/_tgt) and to_graphml already strips them, so the marker stays internal.
Migration note: edges from graphs built before this change lack the marker; a stale AST edge from a file changed exactly once across the version boundary can linger until its source is deleted — the same trade-off the #1116 node marker made. Regenerating the graph clears it.
Testing: new regression test (full + incremental) reproducing the issue's scenario — fails on current v8, passes here — plus an assertion that stale AST-tier edges of a re-extracted source are still evicted. Full suite: 3195 passed, 3 skipped. Verified end-to-end with the issue's CLI repro.
An explanation of this PR using Lenzon - hope that it helps explain this clearly. https://www.lenzon.ai/viewer/cmrjtm9ky000codzhxj2cbext?voice=google-chirp3
Landed on v8 as 4ac5f07, ships in 0.9.16. Thanks @xor-xe - tier-scoped edge eviction via the _origin marker.