Refine bounded traversal contracts
This commit is contained in:
parent
c69cd16515
commit
4ae9b31db5
8 changed files with 101 additions and 26 deletions
|
|
@ -149,10 +149,17 @@ Omitted limits are capped by the project `max_results` policy.
|
|||
Traversal no longer loads the complete edge table and repeatedly scans it. It performs
|
||||
deterministically ordered frontier queries through the existing source primary key or target index.
|
||||
Each request also has a deterministic edge-examination budget derived from its result limit. The
|
||||
response includes `examined_edges` and `examined_edges_limit` counters so algorithmic work can be
|
||||
asserted independently of machine timing. `truncated` is true when either another unique result
|
||||
exists or the work budget prevents proving completeness. A focused core, CLI, MCP, Ruff, and
|
||||
Pyright gate passes for this work-in-progress slice.
|
||||
response includes `candidate_edges_consumed`, `candidate_edges_limit`, and `truncation_reason`
|
||||
counters so algorithmic work can be asserted independently of machine timing. `truncated` is true
|
||||
when either another unique result exists or the work budget prevents proving completeness.
|
||||
|
||||
The read-only query-plan audit found that source-ordered unfiltered incoming traversal required a
|
||||
temporary SQLite sort with the version-2 `(target_id, relation, source_id)` index. Direct
|
||||
`EXPLAIN QUERY PLAN` evidence showed `USE TEMP B-TREE FOR ORDER BY`. A measured additive
|
||||
`(target_id, source_id, relation)` index removes that sort. The disposable index schema is now
|
||||
version 3, so existing version-2 indexes rebuild without changing canonical source or proposals.
|
||||
Frontier cursors are streamed and stop immediately on the first omitted unique result. A focused
|
||||
core, CLI, MCP, Ruff, and Pyright gate passes for this work-in-progress slice.
|
||||
|
||||
### Initial design constraints
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue