Skip to content

fix(get_neighbors): omitted depth honors the schema default (0 = immediate) - #244

Merged
Levalicious merged 1 commit into
developfrom
fix/depth-default
Oct 8, 2026
Merged

Levalicious merged 1 commit into
developfrom
fix/depth-default

Conversation

@Levalicious

Copy link
Copy Markdown
Owner

Fixes the depth-default mismatch (found 2026-08-23): the tool schema advertised default: 0 but the handler resolved omitted depth as ?? 1, so a call without depth silently returned two-hop nodes as "neighbors".

  • handler now mirrors the schema: omitted depth -> 0 (immediate neighbors); canonical 0-indexed numbering at the wire, single +1 at the TS->C boundary
  • test pins the omitted-depth default path
  • intended to ride the upcoming 0.0.30 release train

🤖 Generated with Claude Code

…immediate)

Bug_DepthDefaultMismatch_2026_08_23: three depth numberings coexist —
C hop-count (1 = immediate), MCP schema 0-indexed (default 0), op_bench d0.
The TS boundary bridges with depth+1, but the handler defaulted omitted
depth to 1 (and getNeighbors' signature to 1), so schema-default calls
silently returned TWO-hop neighborhoods.

Canonical semantics: the 0-indexed schema numbering. C hop-count is
internal; the single +1 translation lives at the TS boundary. New test pins
the OMITTED-depth path specifically — explicit-depth tests cannot catch a
default divergence.

Behavioral change: default get_neighbors walks shrink from 2-hop to the
schema-promised 1-hop set.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GGvxNSpbpc5TVyMYYYzBr
@Levalicious
Levalicious merged commit d6ada5d into develop Oct 8, 2026
11 of 13 checks passed
@Levalicious
Levalicious deleted the fix/depth-default branch October 8, 2026 05:02
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.

1 participant