docs(s31): close 1 review MAJOR — vector store recorded as an unwired authoring primitive
This commit is contained in:
parent
fb4c593924
commit
da8779fc7f
2 changed files with 30 additions and 10 deletions
|
|
@ -146,11 +146,20 @@ is opt-in (`--semantic-retrieval`) rather than the default. If you wire one in,
|
|||
`semretrieval` currently imports no network module at all, and a guard test asserts exactly that;
|
||||
a real client belongs behind the `Embedder` protocol in *your* module, not inside this one.
|
||||
|
||||
Optional persistence: `save_vector_store(dir, verdicts, embedder)` / `load_vector_store(dir)`
|
||||
write a byte-deterministic `vectors.npy` + `vectors.jsonl` pair (sorted by verdict id, atomic
|
||||
replace). It is a **rebuildable cache, never authoritative** — a missing store loads as `None`
|
||||
and the caller degrades to structural ranking, while a row/line mismatch raises rather than
|
||||
silently mis-ranking. `*.npy` is gitignored.
|
||||
**Optional persistence — an unwired authoring primitive.** `save_vector_store(dir, verdicts,
|
||||
embedder)` / `load_vector_store(dir)` write and read a byte-deterministic `vectors.npy` +
|
||||
`vectors.jsonl` pair (sorted by verdict id, atomic replace). A missing store loads as `None`; a
|
||||
row/line mismatch raises rather than silently mis-ranking. `*.npy` is gitignored.
|
||||
|
||||
They have **no caller in `src/`**, and ranking never reads a persisted matrix: `HybridRanker.rank`
|
||||
re-invokes the embedder for every candidate on every call, so a persisted store would be bypassed
|
||||
even if one existed. They are offered to extenders, on the same footing as `write_verdict`,
|
||||
`promote_verdict` and `build_mcp_server` — public primitives the core deliberately does not wire
|
||||
into `run_project`. Wiring the cache in only becomes worth anything once the ranker is changed to
|
||||
consult it, which is a redesign rather than a hookup.
|
||||
|
||||
*Known limitation:* the empty-store branch hardcodes `EMBED_DIM`, so a third-party `Embedder` of a
|
||||
different dimension writes a shape-inconsistent empty store. Stated, not fixed.
|
||||
|
||||
## Bevisst ikke bygget (90 %-kuttlista)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue