Write the edges the schema promises and delete the ones it lied about - #29
Merged
Merged
Conversation
Three declared edge types now actually exist. EXPORTS connects each file to its exported top-level declarations across every language plugin, excluding class members and nested functions, which previously inherited the flag and produced false edges. IMPORTS_SYMBOL connects an importing file to the imported symbol at its origin, following barrel chains to the declared name; a declaration-merged name gets one edge per merged declaration, which is the truthful cardinality, documented and locked. PARENT_SECTION nests markdown sections by heading level, and incremental reindexing of a changed markdown file now refreshes its sections instead of leaving stale hierarchy edges behind. Four never-implemented edge types (INSTANTIATES, HAS_SECTION, CONTAINS_CODE, LINKS_TO) are removed from the schema, their dead Cypher deleted, and a stale compiled Kuzu driver still carrying INSTANTIATES DDL is purged from dist, with the graph package build now cleaning its output first. Document structure stays on CONTAINS, stated where it is written. The MCP query tool's description and the docs now list the real edge set, and SAID is described as what it is: a type value on RELATES_TO, not an edge label. One adversarial review round found five defects in the first implementation, all reproduced by live-index attacks and all fixed and re-verified against the same scripts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
What this fixes
Batch three, final wave: edge-type truthfulness. Seven edge types were declared in the schema but never written anywhere. Three had real data behind them and are now implemented; four were vaporware and are now removed.
Implemented
Removed
INSTANTIATES, HAS_SECTION, CONTAINS_CODE, LINKS_TO: gone from the type union, dead Cypher deleted, and a stale compiled Kuzu driver still carrying INSTANTIATES DDL purged from dist (the graph package build now cleans its output first). Document structure uses CONTAINS, stated at the write site. A compile-time invariant fails the build if any removed label is reintroduced.
Documentation truthfulness
The live MCP query tool's description advertised the old seven-edge list; it now lists the real edge set and is locked to the EdgeLabel union by a doc-consistency test. SAID is documented as what it is: a type value on RELATES_TO edges (the deliberate Graphiti-style design), not an edge label. CLAUDE.md and the markdown plugin README corrected to match.
Review process
One adversarial round of live-index attacks found five defects in the first implementation: two false-EXPORTS classes, the merged-name cardinality question (resolved by amending the contract, since both edges are semantically correct), stale markdown hierarchy after incremental reindex, and the stale dist DDL. All fixed and re-verified against the reviewer's own attack scripts: 20 of 21 assertions pass, the one failure being the script's outdated one-edge assertion superseded by the documented cardinality.
Verification
Ledger
🤖 Generated with Claude Code