Repository navigation
Release/0.0.30 - #250
Merged
Merged
Release/0.0.30#250
Conversation
…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
- C graph_random_walk: optional visited filter; the path prefix doubles as the visited set, stops early when every neighbor is already on the path - plumbed end-to-end: binding argv[6] -> Store -> manager -> dispatch; schema, README, and kb.walker.avoid_cycles span attribute added - tests: forced chain walk (LoopA->B->C->D), 2-cycle early stop (Ping<->Pong), default-walk revisit proof, seeded reproducibility - full jest suite 174/174 incl. fuzz (13.7k random_walk calls, clean) Co-Authored-By: Claude Code <noreply@anthropic.com>
feat(random_walk): avoidCycles — self-avoiding walks
fix(get_neighbors): omitted depth honors the schema default (0 = immediate)
native/op_bench.c: pass the new avoid_cycles arg (0) — the harness keeps measuring the same op, so base/head results stay comparable. The benchmark job went red on #244 because the runner's merge-ref (new store sources + old harness) failed to compile. Co-Authored-By: Claude Code <noreply@anthropic.com>
The head-build step sent make's output to /dev/null, which made the #244 red run undebuggable. Print the build-log tail on failure. Co-Authored-By: Claude Code <noreply@anthropic.com>
fix(ci): repair op-bench after graph_random_walk signature change
Implements docs/api-error-policy.md: errors are signal. - ToolError + stable codes; the request handler converts them into visible structured tool errors (isError + JSON envelope) — protocol errors are now reserved for genuine server faults (R1) - validate-first, all-or-nothing batches for create_entities, create_relations, add_observations, sequentialthinking (R2; fixes the mid-loop partial application in add_observations) - silent drops become errors (R4): missing relation endpoints (ENDPOINT_MISSING), all-missing open_nodes, unknown type, unknown get_neighbors/random_walk starts, invalid regex, kb_load file errors, unlinked thoughts - search NL-guard returns the same envelope (NO_MATCHES + suggestion) - tests: 13 protocol-error assertions converted to envelope checks; new policy block (atomicity proofs, envelope shape); fuzz now shows protoErr=0 with every rejection visible as toolErr - full suite 183/183 Co-Authored-By: Claude Code <noreply@anthropic.com>
ci(benchmark): surface head-build failures instead of hiding make output
feat(api): error envelope + validate-first atomicity (policy R1/R2/R4)
Implements the ledger half of docs/api-error-policy.md.
- create_entities -> {created, existing}; create_relations ->
{created, skippedDuplicates}; add_observations gains alreadyPresent
- deletes return {deleted, notFound}: entities by name; relations with
reason entity|relation; observations with reason entity|observation
- open_nodes carries missing[] for partial misses; sequentialthinking
returns linkedTo
- random_walk reports modeUsed (merw | uniform | merw+fallback) and
fallbackSteps — the C walk now counts merw-requested steps that fell
back to uniform because psi weighting was unavailable (honest labeling,
cf. D_NoUsageClaimWithoutTheRealThing)
- kb_load returns per-stage counts: entities {created, existing},
relations {created, skippedDuplicates}
- tests: new ledger block (9 cases) + shape updates; suite 192/192
Co-Authored-By: Claude Code <noreply@anthropic.com>
feat(api): result ledgers + report fields (policy R3)
Cursors become "<index>:<fnv32 of the full result set>" (computed over the serialized bytes pagination cuts on). A page request whose fingerprint no longer matches the current set errors with CURSOR_STALE instead of serving a shifted page; malformed cursors are rejected; bare-number cursors are accepted for legacy callers (unchecked). Prerequisite shipped in the same change: all sort tie-breaks were Math.random(), which made any multi-page drain of a default-sorted list nondeterministic. Tie-breaks are now deterministic (name), giving result sets a stable total order (cf. Determinacy). - paginateItems: cursor parse + fingerprint verify; nextCursor: string|null - schemas: cursor fields accept number|string, described as opaque - tests: 4 new R5 cases (stale after mutation, clean drain via string cursors, malformed rejected, legacy numbers) - full suite 196/196; fuzz clean Co-Authored-By: Claude Code <noreply@anthropic.com>
feat(api): cursor fingerprinting — CURSOR_STALE (policy R5)
Co-Authored-By: Claude Code <noreply@anthropic.com>
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.
First release since 0.0.29 (Jul 13). This one carries the full API error/result policy plus the accumulated fixes.
Highlights
avoidCycles— self-avoiding walks (feat(random_walk): avoidCycles — self-avoiding walks #243)CURSOR_STALE) + deterministic sort tie-breaks — policy R5 (feat(api): cursor fingerprinting — CURSOR_STALE (policy R5) #249)Full policy:
docs/api-error-policy.md. Suite: 196/196; fuzz clean (protoErr = 0 — every rejection now visible as a structured tool error).🤖 Generated with Claude Code