people_find hybrid mode pads grounded matches with semantic-only rows #90
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/people-mind-mcp#90
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?
What happens
In hybrid mode,
people_findreturns every Person whose semantic score is at or aboveembed.min_score(0.55), in the same list as the lexical and organisation matches. The semantic-only rows are not dropped when grounded rows exist.Seen on the live piers store (rc.10, 3,939 Persons, 2026-11-04):
organisationrow and 14semanticrows for unrelated people (Grok Q3 on #10, comment 32979).semanticrows (#86, comment 32987). A client cannot tell "nothing matched" from "20 vaguely related people".Cause
src/people_mind_mcp/views.py,find, lines 168 to 180. The semantic tier is built first, as every Person withscore >= cfg.embed.min_score. Lexical and organisation candidates are then merged over it with a boosted score. No rule removes the semantic-only rows when a candidate exists.Human act
ruling: the operator chose rule A, hybrid people_find drops semantic-only rows when any lexical or organisation candidate matched, and the reason column keeps naming each row's match tier (ADR 0002, this issue)
The ruling was given on 2026-11-05 and is recorded here. Options considered and not taken: raising
min_score(a tuning exercise with no clean stopping point) and a relative cut-off against the top row (a second tunable that leaves the no-match case unchanged).What to change
find, hybrid mode: when the merged lexical and organisation candidate set is non-empty, buildrankedfrom those candidates only, each boosted by its semantic score as today. When the candidate set is empty, keep the current behaviour and return the semantic rows.reason. A row keepsexact-handle,name,organisationorsemanticas its match tier.mode=semantic. An explicit semantic request keeps returning every row at or abovemin_score.embed.min_scoreor any score.Acceptance
min_scoreasserts that hybridfindreturns the organisation row only, withreason=organisation.namecandidate and several Persons abovemin_scoreasserts that only thenamerow is returned.findstill returns the semantic rows, each withreason=semantic.mode=semanticandmode=lexicaltests are unchanged.python3 -m pytest.Out of scope
people_relatedhint on #85.Related
#10 (Grok Q3 record), #86 (live timings, the no-match case), #82 (organisation matches), ADR 0002 (Candidate tier), ADR 0006 (embeddings on by default).
Filed under: operator word "ruling: the operator chose rule A, hybrid people_find drops semantic-only rows when any lexical or organisation candidate matched, and the reason column keeps naming each row's match tier (ADR 0002, this issue)" sha256:794731a6ddef
⏸ SVD architect gate: dev/people-mind-mcp#90 people-find-hybrid-mode-pads-grounded-matches-with-semantic
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
standard· dispatch effortmediumRun:
20261104T224040Z-dd61486dHeld because: CLEAN but 2 open risk(s) (1 verification · 1 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
Change: In src/people_mind_mcp/views.py find(), replace lines 171-178. Today the code builds the semantic dict unconditionally and then overwrites it with the Candidates. Replace that with one branch:
if effective == "hybrid" and candidates:sets ranked = {candidate.person_id: (candidate.score + sem.get(pid, 0.0), candidate.reason) for candidate in candidates}. The else branch is today's line 172 verbatim (every pid with score >= cfg.embed.min_score, reason "semantic"). candidates is the tuple of lexical and organisation Candidates already merged at 159-166. The sort, page and footer (179-184) are unchanged, so the footer total follows automatically through rows.page. In tests/test_embed.py, edit test_hybrid_blend_exact_handle_first_and_prefix_beats_weak_semantic lines 279-288: hybrid "Avery" now returns only the name-prefix row with total=1, and the padded-row paging assertions are dropped. Add test_hybrid_drops_semantic_only_rows_when_a_candidate_matches, mirroring the setup of test_find_matches_organisation_members (335-345). Its blocks: "ZENITH" returns the organisation row only; "Avery" returns the name row only; "plumber" returns 4 semantic rows with paging; mode=semantic and mode=lexical are unchanged. Add one sentence to the people_find cell at README.md:55, mirroring #83 (7421bfc).Files:
src/people_mind_mcp/views.py·tests/test_embed.py·README.mdDecision: accept the 2 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-04-people-find-hybrid-mode-pads-grounded-matches-with-semantic.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-04-people-find-hybrid-mode-pads-grounded-matches-with-semantic.mdspec-verify-dispatch Half B for dev/people-mind-mcp#90 people-find-hybrid-mode-pads-grounded-matches-with-semantic completed integration verify.
8e8942e58dcodex-svd ship --run-id 20261104T225947Z-35c1bd73 --confirm-merge)Live check on 0.1.0-rc.11 (piers store, 2026-11-05)
rc.11 carries PR #91 (
c88b60a). The pod rolled at 23:53:48Z (starbase/iac#341,sha256:b9cb17fe3719…). All three containers are ready, with 0 restarts. The checks are read-only. They give counts only.peoplemind check:store=ok schema=10, 3,939 Persons, 1,516 organisations.On rc.10, Q3 returned the organisation match plus 14 semantic-only rows (comment on #10, 2026-11-04 22:12Z). On rc.11 a single-member organisation in capitals returns no semantic rows.
The post-deploy check named in the spec (Open Risk 2) used
ACMEas its example. The store holds no organisation by that name, and lexical mode returns 0 rows for it. Hybrid therefore falls back to semantic rows (20 rows, total 900), as rule A requires. The table above uses real organisation names from the store instead.Note: run
peoplemind checkin thesynccontainer. In theapicontainer it returnssecret=error code=secret-unreadable. This is by design. Theprepareinit container gives theapicontainer only the read token (README, Kubernetes section;deploy/k8s/base/deployment.yaml,subPath: api).checkreads the tombstone salt before it checks the store (cli.py:114), and only thesynccontainer holds the salt.