[Foundation] Canonical person-resolution service (resolve by phone/email/BT/device-id) #115
Labels
No labels
blocked:depends-p1
blocked:gate-research
blocked:lint-failed
blocked:needs-decision
blocked:needs-human
blocked:verify-failed
bug
data-loss
documentation
enhancement
feature-request
in-progress
needs-decompose
needs-triage
pwa
quickfix
security
security/high
security/medium
test
test-coverage
triage-approved
vault
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/kimi_agent_kin_app_sync#115
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
Every passive ingestion source (#105 call log, #106 SMS, #107 email, #108 ambient BT) needs to answer "which Person is this contactPoint?" — and right now each path will rebuild its own matcher. That's duplicated logic and divergent match confidence.
Scope
resolvePerson(contactPoint: { kind, value }) → Person | candidate | nullfunctionWhy this is foundational
Spec-gating ingestion on this makes #105–#108 actually work. Without it, passive candidates have no Person, so they have no Home page presence, no streak tracking, no anything. Sequencing: this first, then the four ingestion sources.
Out of scope
Auto-triage: needs decompose
Marked
triage-approved+needs-decompose. decompose-executor will pick this up and break it into implementable sub-issues.Closing — implementation verified.
What landed
src/lib/types.ts: addedContactPoint,ContactPointKind,ResolutionCandidate,ResolutionResultsrc/lib/schemas.ts: added zod schemas matching the typessrc/lib/person-resolver.ts: newresolvePerson()+resolvePersonBatch()with match order phone → email → BT device-id → fuzzy name, confidence scoring, alternatives listsrc/lib/previewGenerators.ts: refactored to delegate to resolver (call/SMS/email)src/lib/ambient-engine.ts: BT resolution delegated to resolversrc/lib/person-resolver.test.ts: comprehensive unit testssrc/test/factories.ts:buildDeviceToPersonMappingfactory addedVerification evidence (manual run, 13:27 → 16:27 UTC, ~3h1m)
src/pages/__tests__/LogInteraction.test.tsx(V8 heap exhausted after 10,838s) — unrelated to this issue; it predates #115 and is filed as a follow-up below.