Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20541681eb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| outgoingFollowed += 1; | ||
|
|
||
| const resolved = resolveNotePathsByWikilinkTarget( | ||
| deps.db, | ||
| link.toTarget, |
There was a problem hiding this comment.
Count outgoing edges, not just links, for max_links_per_note
The tool promises max_links_per_note as a cap on typed-link edges followed per note, but outgoingFollowed is incremented once per typed-link before resolving targets. Since resolveNotePathsByWikilinkTarget can return multiple paths for a single typed link, one link can emit several edges and exceed max_links_per_note without triggering truncation. This means callers relying on the edge cap can receive many more outgoing edges than requested when targets are ambiguous or multiply-resolved.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@codex
Updated get_graph_context so max_links_per_note now caps emitted outgoing edges(including multi-resolve cases), added a regression test, and pushed the fix. Re-review please
There was a problem hiding this comment.
Codex Review: Didn't find any major issues. Swish!
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
What
get_graph_contextthat runs a GraphRAG-style retrieval loop (semantic seeds, bounded typed-link expansion, and curated snippets) in one call.include_backrefs=true).get_graph_contextacross tool references and workflow guidance.Why
How
packages/mcp/src/tools/getGraphContext.tswith query embedding, seed selection, hop-bounded typed-link traversal (max_hops), relation filtering (rels), scope filtering (path_prefix), and deterministic ranking.include_backrefs=true.packages/mcp/test/httpTools.getGraphContext.test.tsand keep docs/tool-list consistency green.pnpm format:check,pnpm lint,pnpm typecheck,pnpm typecheck:repo,pnpm test.