people_find matches an organisation name and returns its members #82
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#82
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?
Problem
people_find "<organisation>"does not return the people at that organisation. In the #10 live Grok check on 2026-11-04, "who do I know at TasmaNet" returned 3 rows frompeople_find: the organisation's main line and two addresses. It missed the 16 Persons whose organisation is TasmaNet. Grok found them only through a second and third call, ending withpeople_relatedon the organisation id (16 rows). #10 requires one call for this question.Cause
views.find(src/people_mind_mcp/views.py:113) ranks onlyidentity.resolveresults and semantic scores.identity.resolve(src/people_mind_mcp/identity.py:43) matches handles and name keys only. Organisation membership lives infields(name = 'organisation', asserted values and derivedorganisationsids), whichviews.relatedalready reads throughMEMBERSHIPS(views.py:42).findnever consults it.Change
views.find, when the query is not handle-shaped, also match the query against organisation names: assertedorganisationfield values, andorganisations.namefor derived fields at or abovedefault_row.confidence_threshold, asMEMBERSHIPSdoes. Use the samename_keynormalisation as name matching: an exact key match first, then a token-prefix match.organisation, and a score belowexact-name(0.8) and abovename-prefix(0.6), so a person named like the query still ranks first.identity.resolveunchanged. It is the merge-path matcher (ADR 0002) and must not learn organisations.limit,max_charsand the default row stay unchanged. Hybrid mode adds semantic scores to these candidates as it does to name candidates.organisationmatch reason in the READMEpeople_findrow and in GLOSSARY.md if the glossary lists match reasons.Acceptance criteria
people_find "acme"returns the three in one call with reasonorganisation, and not the fourth.people_findrow stays under 150 tokens (README test).make checkpasses.Context
The README names "who do I know at " as a Grok Bot query. The #10 Q3 record has the live call counts.
Filed under: operator word "accept" sha256:c125d0397b60 (#10 gate)
✅ SVD architect gate: dev/people-mind-mcp#82 people-find-matches-an-organisation-name-and-returns-its-mem
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:
20261104T122137Z-2550f440Change: Add a private helper _organisation_candidates(conn, cfg, query) in src/people_mind_mcp/views.py. It reuses MEMBERSHIPS (views.py:42-46) with cfg.default_row.confidence_threshold, as related() does at views.py:189. It copies identity.resolve's name loop (identity.py:69-88): name_key, then an exact key match → Candidate(pid, 0.75, "organisation"), then a token-prefix match → 0.7, keeping the highest score per person. It returns nothing when the key is empty. In views.find (views.py:124-152), keep the Exact short-circuit and the embed-off guard. Compute the existing handle-shaped predicate into a boolean. When the query is not handle-shaped, merge the resolve candidates with the organisation candidates (highest score per person, sorted by (-score, person_id) as at identity.py:89). The lexical and hybrid branches then iterate the merged list in place of resolved.items; semantic mode is unchanged. Add one sentence to the people_find docstring (server.py:108-115) and to the README people_find row (README.md:55). identity.py, MEMBERSHIPS and GLOSSARY.md are not touched; the glossary does not list match reasons.
Files:
src/people_mind_mcp/views.py·src/people_mind_mcp/server.py·README.md·tests/test_embed.py·tests/test_server.pyDecision: dispatch this spec (
svd:go)?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-matches-an-organisation-name-and-returns-its-mem.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-04-people-find-matches-an-organisation-name-and-returns-its-mem.mdspec-verify-dispatch Half B for dev/people-mind-mcp#82 people-find-matches-an-organisation-name-and-returns-its-mem completed integration verify.
6fe5144ca3-k organisationfilter collects test_find_matches_organisation_members, and-k "150 or organisation"collects test_find_default_row_under_150_tokens and test_find_organisation_rows_over_http.codex-svd ship --run-id 20261104T123646Z-8fc892c8 --confirm-merge)