Give Commit and TypeRef nodes their identities in the file subgraph - #44
Merged
Conversation
The file detail panel 500ed when a contained symbol had a git-history neighbor: Commit nodes are keyed by hash, never id, and the identity derivation did not know that. Commits now derive Commit:<hash> to match the service layer, TypeRefs keep their persisted ids instead of being coerced to a false File identity, and a truly unidentifiable neighbor surfaces in an identityErrors entry instead of failing the whole panel. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 changed
The file detail panel returned HTTP 500 ("Graph node is missing a persisted id") whenever a contained symbol had a Commit neighbor via INTRODUCED_IN, which the history-window batch made much more common. Root cause: Commit nodes are persisted with MERGE on hash and intentionally carry no id property, and persistedNodeId() had no Commit derivation. The fix derives Commit:, exactly matching the existing service-layer lookup contract (graph-data-service composes the same form). Along the way the same query's TypeRef projection was coercing TypeRefs to a false File identity; they now keep their persisted ids and runtime label. A truly unidentifiable adjacent row no longer fails the endpoint: identifiable nodes and edges are returned and the offending row is surfaced in an identityErrors entry with its labels and edge type. Non-identity errors still propagate.
Verification
Red-first regression fixture on a real ephemeral FalkorDBLite database, then an independent review: full sweep of all 527 File nodes on fresh indexes at both 1-commit and complete 516-commit history depth returned zero 500s, zero identity errors, zero malformed ids; the malformed-fixture probe retained 5/5 nodes and 6/6 edges with exactly one diagnostic; graph 208/208, api 365/365, dashboard 124/124, typechecks clean. Verdict: no blockers.
Deliberately not in this PR
Ledger: the identity-error discriminator matches on exact message text (a branded error class would survive future message collisions); the undirected relationship match emits reverse CONTAINS edges (pre-existing projection quirk, no data loss).
🤖 Generated with Claude Code