Skip to content

fix: preserve relation- and origin-distinct graph paths - #15

Merged
haolpku merged 1 commit into
mainfrom
codex/fix-graph-path-identity
Sep 20, 2026
Merged

haolpku merged 1 commit into
mainfrom
codex/fix-graph-path-identity

Conversation

@haolpku

@haolpku haolpku commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Graph traversal currently drops parallel relations and distinct evidence origins because it deduplicates paths by node sequence. For example, A --authored--> B and A --reviewed--> B return only whichever relation was inserted first.

Return paths distinguished by their stored edge sequences. Enumerate each keyed edge separately, retain per-path cycle detection and relation filtering, and stop expansion at the result budget. Use deterministic target/relation/edge-key ordering so capped results do not depend on insertion order. Document that score sorting applies to the bounded BFS selection, not exhaustive global top-k search.

Validation: 10 focused cases cover parallel relations and multihop continuation, distinct origins including profile/runtime edges, repeated upserts, insertion-order reversal with and without caps, cycles, filters, hop/result bounds, and persistence/reload. Five of these cases fail on the previous main; all ten pass with this change. Full regression: 235 passed, 5 skipped.

Fixes #10.

@haolpku
haolpku merged commit 1196c47 into main Sep 20, 2026
2 checks passed
@haolpku
haolpku deleted the codex/fix-graph-path-identity branch September 20, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify path identity for parallel relations in NetworkX graph traversal

1 participant