Local embeddings on by default, ranking people_find #7
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:fire
svd:go
svd:hold
svd:respec
svd:skip
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/people-mind-mcp#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #1. Records: ADR 0006.
What to build
bge-small-en-v1.5, int8 ONNX), fetched by a hash-checked script at image build and bymake model. One core, a thread in the sync process.people_findfree-text queries rank by vector score blended with exact and prefix matches. Exact Handle matches always rank first.[embed] enabled = falseturns it off; the tool then ranks by lexical match alone andpeople_statussays so.Acceptance criteria
enabled = false, no model loads, the vector table stays empty, andpeople_findstill answers.make modelhas run, as mailmind's do.Blocked by
Filed under: operator word "go. compelling public-facing README.md as A0" sha256:3f9e946994fa
⏸ SVD architect gate: dev/peoplemind-mcp#7 local-embeddings-on-by-default-ranking-people-find
Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity
substrate· dispatch efforthighRun:
20261101T112846Z-5865f73aHeld because: CLEAN but 8 open risk(s) (2 verification · 6 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
' (rows.py:15-16), so the lean returns 'Error: code=embed-off', also for explicit hybrid. ADR 0001 Amendment 1 shows 'on covered=N' only while the first backfill runs; the lean always shows covered=N when on. Question: accept both and record them as an ADR 0006 amendment? [decision]make model && uv run python3 -m pytest tests/test_embed.py -m model -q -rsreports both model tests as passed, not skipped. [verification]uv run python3 -m pytest -qrecords the failure set before the first edit; after the change the same command shows the identical failure set plus the new tests/test_embed.py passes, anduv run mypyis clean. [verification]Change: Mailmind is the pattern source, and the sandbox denied it. Dispatch must read mailmind's fetch script, embedder and ADR 0005 first and copy the revision, hashes, file names, pooling and dependency pins verbatim. If it cannot, it halts.
person_vectors(person_id PK REFERENCES persons(id) ON DELETE CASCADE, model, text_hash, vector BLOB, updated_at)and bumps SCHEMA_VERSION to 5. The cascade makes Forget (graph.py:381) and merge-loser deletion (graph.py:197) remove the vector, with no graph.py change.EmbedConfig(enabled=True, model_dir, interval_seconds, min_score)after FeedConfig (config.py:95-103), andConfig.embed.EmbedderProtocol;OnnxEmbedderwith ORT on one intra-op and one inter-op thread, and lazy imports;load(), which returns None when disabled and raisesEmbedError(model-absent/unreadable)otherwise;person_text()over names, aliases, organisation, title and prefix-stripped tags;refresh(), keyed bysha256(MODEL_ID + "\0" + text), embedding outside the transaction and upserting batches withWHERE EXISTS persons;clear();scores(): numpyfrombuffermatrix @ query, filtered by model.semantic.offoron covered=N.modeLiteral parameter and uses a lazy, locked_embedder()holder that build_app resets. people_status passes cfg and its docstring is updated.load_embedderandembed_pass. When disabled, embed_pass clears the table. A missing model printsembed=error code=and never refuses boot. Async-embedthread mirrorsworker(sync.py:96-113). cli._sync (cli.py:47-59) runs one embed pass after the sources.models/.gitignorecontaining*. The new Makefile has amodeltarget.[embed] enabled=false, so the existing suites stay deterministic. Three version literals go from 4 to 5. The new tests/test_embed.py has a FakeEmbedder andneeds_modelskip tests.Files:
pyproject.toml·uv.lock·Makefile·scripts/fetch-model.sh·src/peoplemind_mcp/config.py·src/peoplemind_mcp/store.py·src/peoplemind_mcp/embed.py·src/peoplemind_mcp/views.py·src/peoplemind_mcp/server.py·src/peoplemind_mcp/sync.py·src/peoplemind_mcp/cli.py·tests/conftest.py·tests/test_embed.py·tests/test_config_cli.py·tests/test_identity.py·tests/test_mailmind.pyDerived artifacts:
uv.lockDecision: accept the 8 open risk(s) above and dispatch this spec (
svd:go), or park (svd:skip) / re-spec (svd:respec)?Your call (when this issue is held at the gate via
svd:hold):svd:go— approve; Half-B dispatch accepts exactly this spec (open risks accepted)svd:firebesidesvd:go— approve AND authorise the Half-B fire from the phone; never on its ownsvd:skip— park it; dispatch refuses it and the issue stays for a humansvd:respec— discard this spec; the next Half-A run re-produces it with this record as prior-attempt contextSpec:
/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-01-local-embeddings-on-by-default-ranking-people-find.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-01-local-embeddings-on-by-default-ranking-people-find.mdArchitect gate on the Half-A spec (run 20261101T112846Z-5865f73a, verdict CLEAN, 16 files, class substrate, dispatch base main
8c01615). Rulings recorded in the spec's## Agent Adjustments:Xenova/bge-small-en-v1.5@ea104dacec62c0de699686887e3f920caeb4f3e3,model_quantized.onnxandtokenizer.jsonwith their sha256, CLS pooling, L2-normalised, no query prefix, one text per run, one thread. Pinsonnxruntime>=1.31,<2,tokenizers>=0.23,<1,numpy>=2.3,<3. Dispatch invents nothing.scripts/fetch_model.py, not a bash script;make modelcalls it. Write set stays 16.Error: code=embed-offandon covered=Naccepted; same amendment.make modeland themodeltests on a scratch worktree before merge.Awaiting the operator's
svd:go.spec-verify-dispatch Half B for dev/peoplemind-mcp#7 local-embeddings-on-by-default-ranking-people-find completed integration verify.
f17282df71f17282d: no Forgejo commit statuses reported, so no required remote checks. Local: 246 passed, 5 skipped; mypy, ruff check and ruff format are clean.f17282dare empty: no remote CI has reported, so there is no remote check to gate on.codex-svd ship --run-id 20261101T114655Z-3e27f1f9 --confirm-merge)