fix(watch): widen semantic-doc gate to the doc-shaped file_type subset (#1954)#1957
Closed
alphanury wants to merge 1 commit into
Closed
fix(watch): widen semantic-doc gate to the doc-shaped file_type subset (#1954)#1957alphanury wants to merge 1 commit into
alphanury wants to merge 1 commit into
Conversation
Graphify-Labs#1954) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
|
Landed on v8 (ships in 0.9.18), cherry-picked to preserve your authorship. Thanks @alphanury — the #1915 semantic-doc gate only recognized a doc via a file_type=="document" node, so a doc represented purely as concept/rationale nodes was still AST-quick-scanned and got duplicate heading nodes on every rebuild. The gate now covers the doc-shaped subset (document/concept/rationale/paper) while still excluding code/image and AST-origin nodes; previously-bloated graphs self-heal on the next rebuild. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1954.
The #1915 semantic-doc gate in
_rebuild_code(graphify/watch.py) recognized a doc as semantic-backed only when it had a node withfile_type == "document". A doc whose LLM layer is made ofconcept/rationalenodes — the extraction spec's preferred shape — failed the check, so every rebuild AST-quick-scanned it again and re-minted heading nodes alongside the semantic ones: the same double-representation #1915 fixed, just for the other (and recommended) node shape.Change
file_typeenum:{"document", "concept", "rationale", "paper"}(i.e. everything exceptcodeandimage) — the issue's own minimal suggested fix.semantic_doc_filesset the gate produces, so they stay in lockstep; nothing else in the rebuild flow changes.graphify updatesilently evicts LLM semantic edges from re-extracted Markdown/doc sources (edge eviction is provenance-blind) #1865 legacy-graph safeguard is preserved: the markdown extractor'sadd_node()always defaultsfile_typeto"document", so legacy AST doc nodes can never carryconcept/rationale/paperand the widened set does not increase the legacy misread risk. (Verified againstgraphify/validate.py'sVALID_FILE_TYPESand everyadd_nodecall site in the markdown extractor.)Tests
_seed_semantic_doc_graph_concept_only) plus three tests mirroring the existing watch._rebuild_code produces a ~4× bloated graph vsgraphify . --update— AST-scans Markdown docs, then merges preserved semantic nodes on top #1915 suite: full-rebuild non-duplication and incremental preservation (doc-only and doc-plus-code variants). All three red before the fix, green after.tests/test_watch.py: 72 passed, 2 skipped.test_detect.py+test_build.py: 203 passed. Full suite: 3270 passed; the 15 failures intest_ollama_retry_cap.py/test_skillgen.pyare pre-existing on a clean v8 checkout (verified identical with the fix stashed).🤖 Generated with Claude Code