Repository navigation
fix(notes): keep provisional meeting identities from screen and calendar evidence - #20766
Git-on-my-level wants to merge 9 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…ings Require exact textual or attendee corroboration for names and emails; only screen/background or attendee corroborated names can become provisional people. Preserve owner speech, existing non-notes matches, and manual receipts, and remove rejected identifiers from the saved participant list. Correct the identity-write and late-refresh types without adding teaching or another admission scanner. Validation: backend/test.sh selected identity, rich-context, screen-evidence, admission, people and speaker suites: 308 passed. Hook-configured targeted Pyright: 0 errors. Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3571 -> 3577 | Expose the existing notes generator as a public accessor for late refresh; this round adds only three lines at that seam. Line-Count-Exception: backend/utils/llm/conversation_processing.py | 1961 -> 1969 | Retain the notes evidence gate while removing the name-validation waiver; this round reduces the file from 1971 lines.
Record the existing note-save timestamp and zero-frame count when a completed note has no identity context. This preserves the already approved one-time late evidence refresh after gating transcript-only identity work, without creating people, assigning speakers, or attaching _notes_identity on the flag-off path. Validation: backend/test.sh identity file: 57 passed, including a synthetic transaction test that the context-free note admits only one later marker.
The notes identity model adds alias, speaker_bindings, and a screen source. The app-client OpenAPI document has to match or pre-push rejects the branch.
Released app clients only decode roster or transcript. Screen and background evidence still creates the person; the wire value folds to transcript.
The generated conversation wire gained alias and speaker binding fields. Released clients still decode participant source as roster or transcript.
Node 25 omits the experimental localStorage global. The web app check calls clear() in setup, so the gate failed before any identity assertion.
Screen evidence still keeps the name and email. The stored source is transcript because released clients cannot decode a new enum value.
…nce graph meeting_notes_validation imported identifier_in_text from database.notes_identity, whose person_aliases dependency pulls Firestore module-level imports into every isolated-environment test that loads the validation module. That broke three stubbed-environment suites at collection/setup on CI shards (timezone, action-item date validation, conversation archive filter contract). identifier_in_text is a pure regex used only by this validation module, so keep a local copy; notes_identity retains its own for persistence-side use. The archive filter contract stub already faked FieldFilter for the same reason — teach it transactional, which person_aliases now needs via notes_identity. The TTS rate-limit and shared-action-items failures on these shards are main's known red suite, repaired separately in BasedHardware#20748.
3bda25a to
17afc47
Compare
|
Monitor fix push — keep notes validation free of the notes-identity persistence graph The three backend shard failures that were specific to this PR (timezone structure collection, action-item date validation, conversation archive filter contract setup) shared one root cause:
Local verification: red reproduced first (matching CI signatures), then green via the backend runner — 86 passed across the three repaired suites plus the PR's own identity/notes tests (226 passed), The remaining shard-1 failures ( |
There was a problem hiding this comment.
16 issues found across 34 files
Confidence score: 2/5
structured_extraction.py: An unrecognized source value can maketo_participant()raise and discard the whole note. Validate or normalize source values before constructingParticipant.meeting_notes_validation.py: A roster email can be retained even when it belongs to someone other than the name match, risking incorrect identity attribution. Tie roster-email retention tomatched_entrywhile keeping textual email corroboration.conversation_processing.py: When screen text is the only identity evidence, validated names never reach note-save staging. IncludeSCREEN ACTIVITYin the evidence gate.late_meeting_notes.py: A transient generation or persistence failure leaves the durable claim in place, so retries skip the refresh. Release or expire the claim on failure.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="backend/models/structured_extraction.py">
<violation number="1" location="backend/models/structured_extraction.py:266">
P1: This accepts arbitrary source strings, but `to_participant()` still constructs the strict `Participant` model; a typo or value such as `calendar` therefore raises during note processing and can discard the entire note. Constrain the extraction field to the four supported input values so malformed participant entries are dropped by the existing per-element validation.</violation>
</file>
<file name="backend/utils/llm/conversation_processing.py">
<violation number="1" location="backend/utils/llm/conversation_processing.py:1374">
P2: Screen-text-only evidence never reaches note-save identity staging when there are no approved frames or non-owner roster entries. Include `SCREEN ACTIVITY` in this evidence gate so names validated from supplied screen text can create the intended provisional identity and speaker binding.</violation>
</file>
<file name="plugins/omi-plugin-sdk/src/omi_plugin_sdk/models.py">
<violation number="1" location="plugins/omi-plugin-sdk/src/omi_plugin_sdk/models.py:169">
P2: `speaker_bindings` cannot identify which `speaker_id_scope` a numeric speaker belongs to. In merged notes that reuse an ID, the persistence path therefore treats the binding as cross-scope and drops valid inferred assignments (or cannot distinguish the sources); carry the scope together with each speaker ID through the model and matching path.</violation>
</file>
<file name="backend/utils/conversations/meeting_participants.py">
<violation number="1" location="backend/utils/conversations/meeting_participants.py:655">
P2: This catalog export can create duplicate people for email aliases: roster resolution recognizes an email stored in `aliases`, but note-save resolution does not, so a short-name attendee creates a new provisional person instead of reusing the catalog entry. Include email-shaped `aliases` in the save-time exact-email matching while retaining its ambiguity check.</violation>
</file>
<file name="backend/docs/listen_pusher_pipeline.mdx">
<violation number="1" location="backend/docs/listen_pusher_pipeline.mdx:3416">
P3: This sentence implies dismissal always hides the provisional person. Per `identifier_retraction`, the person is hidden only when this note created it and no other note contributed identifiers. Say that condition explicitly.</violation>
</file>
<file name="backend/utils/llm/meeting_notes_rich_prompts.py">
<violation number="1" location="backend/utils/llm/meeting_notes_rich_prompts.py:48">
P2: This prompt line asks for `speaker_bindings` for each non-owner participant, but the schema field says "omit when uncertain". Make the prompt match the schema so the model leaves bindings empty when the spk mapping is not clear.</violation>
</file>
<file name="backend/utils/conversations/meeting_context_pack.py">
<violation number="1" location="backend/utils/conversations/meeting_context_pack.py:248">
P2: This `order_by('created_at')` silently drops any people doc without a `created_at` field, from both the roster and the context pack. It also caps the 100 docs by creation time, not recent activity, so the Python sort by `updated_at` only reorders that window. Either drop the server-side order and sort in Python over the full catalog read, or confirm every person doc carries `created_at`.</violation>
</file>
<file name="backend/utils/conversations/processing_trigger.py">
<violation number="1" location="backend/utils/conversations/processing_trigger.py:70">
P3: `SCREEN_EVIDENCE` adds a non-user `KEEP` trigger, but the `ProcessingMode.relevance` comment still limits `KEEP` to user actions and `SERVER_RECOVERY`; update that comment to mention already-kept screen-evidence refreshes.</violation>
</file>
<file name="backend/routers/screen_frames.py">
<violation number="1" location="backend/routers/screen_frames.py:257">
P2: This schedules the late-note refresh only on the successful response path. If frame-set construction or response persistence fails after the marker is committed, FastAPI does not execute response background tasks for the failed request, and the same attempt retries as 503 without a stored response, so the approved evidence never triggers the note refresh automatically. Enqueue this refresh through a mechanism that survives response failures, or preserve a retryable state until the refresh is successfully enqueued.</violation>
</file>
<file name="backend/utils/llm/meeting_notes_validation.py">
<violation number="1" location="backend/utils/llm/meeting_notes_validation.py:263">
P2: This marks AI-agent names as corroborated and can create provisional people when the model omits `is_ai_agent`. Restrict `attendee_names` to `human` roster entries.</violation>
<violation number="2" location="backend/utils/llm/meeting_notes_validation.py:332">
P1: This retains an email belonging to any roster participant, even when the participant name matched someone else. Require roster-email retention to match `matched_entry`, while still allowing textual email corroboration.</violation>
</file>
<file name="backend/database/conversations.py">
<violation number="1" location="backend/database/conversations.py:944">
P2: The title veto now makes a valid existing note look deleted to the caller, which removes its Typesense document after a late evidence refresh. Keep the veto distinct from missing/deleted outcomes so titled notes remain searchable.</violation>
<violation number="2" location="backend/database/conversations.py:1093">
P2: The identity-aware existing-document path returns before converging Typesense, unlike the old `AlreadyExists` path. A retry can therefore leave a valid conversation missing or stale in the search index; sync the index before returning `False`.</violation>
</file>
<file name="backend/utils/conversations/late_meeting_notes.py">
<violation number="1" location="backend/utils/conversations/late_meeting_notes.py:47">
P2: This marker only proves an adjudication ran, not that any frame was approved. Empty or fully rejected passes still reach this gate, so they can consume the one-shot claim and rerun the note without new screen evidence; require an approved frame before claiming the refresh.</violation>
<violation number="2" location="backend/utils/conversations/late_meeting_notes.py:49">
P2: This durable claim is written before model generation and persistence, so a transient failure permanently suppresses the refresh; retries hit the same claim and return. Release or expire the claim on failure, or only mark it complete after a successful persist.</violation>
<violation number="3" location="backend/utils/conversations/late_meeting_notes.py:53">
P2: This reprocess always tells `_get_structured` the transcript is English, even when `conversation.language` is set. Pass `conversation.language or 'en'` so non-English transcripts are parsed with their recorded language.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| default_factory=list, | ||
| description='Exact numeric spk keys the notes model binds to this non-owner participant; omit when uncertain', | ||
| ) | ||
| source: str = Field(description="Identity evidence source: roster, transcript, screen, or background") |
There was a problem hiding this comment.
P1: This accepts arbitrary source strings, but to_participant() still constructs the strict Participant model; a typo or value such as calendar therefore raises during note processing and can discard the entire note. Constrain the extraction field to the four supported input values so malformed participant entries are dropped by the existing per-element validation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/models/structured_extraction.py, line 266:
<comment>This accepts arbitrary source strings, but `to_participant()` still constructs the strict `Participant` model; a typo or value such as `calendar` therefore raises during note processing and can discard the entire note. Constrain the extraction field to the four supported input values so malformed participant entries are dropped by the existing per-element validation.</comment>
<file context>
@@ -256,9 +256,21 @@ class ExtractedParticipant(BaseModel):
+ default_factory=list,
+ description='Exact numeric spk keys the notes model binds to this non-owner participant; omit when uncertain',
+ )
+ source: str = Field(description="Identity evidence source: roster, transcript, screen, or background")
+
+ @field_validator('speaker_bindings', mode='before')
</file context>
| source: str = Field(description="Identity evidence source: roster, transcript, screen, or background") | |
| source: Literal['roster', 'transcript', 'screen', 'background'] = Field(description="Identity evidence source: roster, transcript, screen, or background") |
| and matched_entry.email | ||
| and matched_entry.email.casefold() == email.casefold() | ||
| if email and ( | ||
| email.casefold() in roster_by_email or identifier_in_text(email, transcript_body + '\n' + background_body) |
There was a problem hiding this comment.
P1: This retains an email belonging to any roster participant, even when the participant name matched someone else. Require roster-email retention to match matched_entry, while still allowing textual email corroboration.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/utils/llm/meeting_notes_validation.py, line 332:
<comment>This retains an email belonging to any roster participant, even when the participant name matched someone else. Require roster-email retention to match `matched_entry`, while still allowing textual email corroboration.</comment>
<file context>
@@ -286,26 +318,22 @@ def validate_rich_meeting_notes(
- and matched_entry.email
- and matched_entry.email.casefold() == email.casefold()
+ if email and (
+ email.casefold() in roster_by_email or identifier_in_text(email, transcript_body + '\n' + background_body)
):
participant.email = email
</file context>
| email.casefold() in roster_by_email or identifier_in_text(email, transcript_body + '\n' + background_body) | |
| (matched_entry is not None and matched_entry.email and matched_entry.email.casefold() == email.casefold()) | |
| or identifier_in_text(email, transcript_body + '\n' + background_body) |
| structured = response.to_structured() | ||
| has_identity_evidence = bool( | ||
| screen_frames | ||
| or 'SCREEN MOMENTS' in (meeting_context or '') |
There was a problem hiding this comment.
P2: Screen-text-only evidence never reaches note-save identity staging when there are no approved frames or non-owner roster entries. Include SCREEN ACTIVITY in this evidence gate so names validated from supplied screen text can create the intended provisional identity and speaker binding.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/utils/llm/conversation_processing.py, line 1374:
<comment>Screen-text-only evidence never reaches note-save identity staging when there are no approved frames or non-owner roster entries. Include `SCREEN ACTIVITY` in this evidence gate so names validated from supplied screen text can create the intended provisional identity and speaker binding.</comment>
<file context>
@@ -1368,6 +1369,11 @@ def get_conversation_notes(
structured = response.to_structured()
+ has_identity_evidence = bool(
+ screen_frames
+ or 'SCREEN MOMENTS' in (meeting_context or '')
+ or (roster and any(e.kind != 'owner' for e in roster.entries))
+ )
</file context>
| or 'SCREEN MOMENTS' in (meeting_context or '') | |
| or 'SCREEN MOMENTS' in (meeting_context or '') or 'SCREEN ACTIVITY' in (meeting_context or '') |
| alias: Optional[str] = Field( | ||
| default=None, description='Short alias explicitly asserted for this person; never derive it' | ||
| ) | ||
| speaker_bindings: List[int] = Field( |
There was a problem hiding this comment.
P2: speaker_bindings cannot identify which speaker_id_scope a numeric speaker belongs to. In merged notes that reuse an ID, the persistence path therefore treats the binding as cross-scope and drops valid inferred assignments (or cannot distinguish the sources); carry the scope together with each speaker ID through the model and matching path.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At plugins/omi-plugin-sdk/src/omi_plugin_sdk/models.py, line 169:
<comment>`speaker_bindings` cannot identify which `speaker_id_scope` a numeric speaker belongs to. In merged notes that reuse an ID, the persistence path therefore treats the binding as cross-scope and drops valid inferred assignments (or cannot distinguish the sources); carry the scope together with each speaker ID through the model and matching path.</comment>
<file context>
@@ -163,10 +163,33 @@ class Participant(BaseModel):
+ alias: Optional[str] = Field(
+ default=None, description='Short alias explicitly asserted for this person; never derive it'
+ )
+ speaker_bindings: List[int] = Field(
+ default_factory=list,
+ description='Exact numeric spk keys the notes model binds to this non-owner participant; omit when uncertain',
</file context>
| entries=tuple(entries), | ||
| display_title=display_title, | ||
| title_is_window_title=screen_derived, | ||
| catalog_person_ids=tuple(str(p['id']) for p in people_list if p.get('id')), |
There was a problem hiding this comment.
P2: This catalog export can create duplicate people for email aliases: roster resolution recognizes an email stored in aliases, but note-save resolution does not, so a short-name attendee creates a new provisional person instead of reusing the catalog entry. Include email-shaped aliases in the save-time exact-email matching while retaining its ambiguity check.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/utils/conversations/meeting_participants.py, line 655:
<comment>This catalog export can create duplicate people for email aliases: roster resolution recognizes an email stored in `aliases`, but note-save resolution does not, so a short-name attendee creates a new provisional person instead of reusing the catalog entry. Include email-shaped `aliases` in the save-time exact-email matching while retaining its ambiguity check.</comment>
<file context>
@@ -637,7 +648,12 @@ def normalize_meeting_participants(
+ entries=tuple(entries),
+ display_title=display_title,
+ title_is_window_title=screen_derived,
+ catalog_person_ids=tuple(str(p['id']) for p in people_list if p.get('id')),
+ )
</file context>
| marker_at, fingerprint = await run_blocking( | ||
| db_executor, screen_frames_db.get_conversation_screen_frames_marker, uid, conversation_id, bucket=bucket | ||
| ) | ||
| if marker_at is None or fingerprint != selection_fingerprint(*window): |
There was a problem hiding this comment.
P2: This marker only proves an adjudication ran, not that any frame was approved. Empty or fully rejected passes still reach this gate, so they can consume the one-shot claim and rerun the note without new screen evidence; require an approved frame before claiming the refresh.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/utils/conversations/late_meeting_notes.py, line 47:
<comment>This marker only proves an adjudication ran, not that any frame was approved. Empty or fully rejected passes still reach this gate, so they can consume the one-shot claim and rerun the note without new screen evidence; require an approved frame before claiming the refresh.</comment>
<file context>
@@ -0,0 +1,77 @@
+ marker_at, fingerprint = await run_blocking(
+ db_executor, screen_frames_db.get_conversation_screen_frames_marker, uid, conversation_id, bucket=bucket
+ )
+ if marker_at is None or fingerprint != selection_fingerprint(*window):
+ return
+ if not await run_blocking(db_executor, _claim, uid, conversation_id, marker_at, fingerprint):
</file context>
| return | ||
| conversation = deserialize_conversation(raw) | ||
| structured, discarded = await run_blocking( | ||
| llm_executor, get_structured, uid, 'en', conversation, trigger=ProcessingTrigger.SCREEN_EVIDENCE |
There was a problem hiding this comment.
P2: This reprocess always tells _get_structured the transcript is English, even when conversation.language is set. Pass conversation.language or 'en' so non-English transcripts are parsed with their recorded language.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/utils/conversations/late_meeting_notes.py, line 53:
<comment>This reprocess always tells `_get_structured` the transcript is English, even when `conversation.language` is set. Pass `conversation.language or 'en'` so non-English transcripts are parsed with their recorded language.</comment>
<file context>
@@ -0,0 +1,77 @@
+ return
+ conversation = deserialize_conversation(raw)
+ structured, discarded = await run_blocking(
+ llm_executor, get_structured, uid, 'en', conversation, trigger=ProcessingTrigger.SCREEN_EVIDENCE
+ )
+ context = getattr(structured, '_notes_identity', None)
</file context>
| ) | ||
| if marker_at is None or fingerprint != selection_fingerprint(*window): | ||
| return | ||
| if not await run_blocking(db_executor, _claim, uid, conversation_id, marker_at, fingerprint): |
There was a problem hiding this comment.
P2: This durable claim is written before model generation and persistence, so a transient failure permanently suppresses the refresh; retries hit the same claim and return. Release or expire the claim on failure, or only mark it complete after a successful persist.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/utils/conversations/late_meeting_notes.py, line 49:
<comment>This durable claim is written before model generation and persistence, so a transient failure permanently suppresses the refresh; retries hit the same claim and return. Release or expire the claim on failure, or only mark it complete after a successful persist.</comment>
<file context>
@@ -0,0 +1,77 @@
+ )
+ if marker_at is None or fingerprint != selection_fingerprint(*window):
+ return
+ if not await run_blocking(db_executor, _claim, uid, conversation_id, marker_at, fingerprint):
+ return
+ conversation = deserialize_conversation(raw)
</file context>
| notes call may rewrite these bindings. Current manual receipts (including | ||
| unassignments and rejections) win in the commit transaction. Rejecting a notes | ||
| label retracts the identifiers that note added; dismissal also removes those | ||
| identifiers and hides the provisional person. |
There was a problem hiding this comment.
P3: This sentence implies dismissal always hides the provisional person. Per identifier_retraction, the person is hidden only when this note created it and no other note contributed identifiers. Say that condition explicitly.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/docs/listen_pusher_pipeline.mdx, line 3416:
<comment>This sentence implies dismissal always hides the provisional person. Per `identifier_retraction`, the person is hidden only when this note created it and no other note contributed identifiers. Say that condition explicitly.</comment>
<file context>
@@ -3394,3 +3394,30 @@ level migrations. Standard protection stores compressed JSON. Both segment and
+notes call may rewrite these bindings. Current manual receipts (including
+unassignments and rejections) win in the commit transaction. Rejecting a notes
+label retracts the identifiers that note added; dismissal also removes those
+identifiers and hides the provisional person.
+
+The existing 20-second client evidence pass and 25-second configured server wait
</file context>
| identifiers and hides the provisional person. | |
| identifiers. Dismissal also hides the provisional person only when this note created it and no other note contributed identifiers. |
| # Regenerates an existing, already-kept survivor over its longer transcript: | ||
| # no created-side effects, and relevance must not hide the whole occasion. | ||
| ProcessingTrigger.SMART_MERGE: ProcessingMode(True, True, True, _KEEP), | ||
| ProcessingTrigger.SCREEN_EVIDENCE: ProcessingMode(True, True, True, _KEEP), |
There was a problem hiding this comment.
P3: SCREEN_EVIDENCE adds a non-user KEEP trigger, but the ProcessingMode.relevance comment still limits KEEP to user actions and SERVER_RECOVERY; update that comment to mention already-kept screen-evidence refreshes.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/utils/conversations/processing_trigger.py, line 70:
<comment>`SCREEN_EVIDENCE` adds a non-user `KEEP` trigger, but the `ProcessingMode.relevance` comment still limits `KEEP` to user actions and `SERVER_RECOVERY`; update that comment to mention already-kept screen-evidence refreshes.</comment>
<file context>
@@ -66,6 +67,7 @@ class ProcessingMode:
# Regenerates an existing, already-kept survivor over its longer transcript:
# no created-side effects, and relevance must not hide the whole occasion.
ProcessingTrigger.SMART_MERGE: ProcessingMode(True, True, True, _KEEP),
+ ProcessingTrigger.SCREEN_EVIDENCE: ProcessingMode(True, True, True, _KEEP),
ProcessingTrigger.SERVER_RECOVERY: ProcessingMode(True, True, True, _KEEP),
}
</file context>
|
Folded into the survivor #24485 (head What carried over: the notes-identity lane — provisional identifiers from screen/calendar evidence (notes_identity staging in the conversation write/create transactions, create-with-people atomicity via an optional Dropped with cause: the old-pipeline |
|
Hey @Git-on-my-level 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Meeting notes can see a counterpart on a calendar card or call screenshot and still save them as Speaker 2, because tile-name and email-local-part gates drop the name before the notes model can keep it. This lets that model keep a name it read from a frame, a screen moment, or a calendar attendee, store a provisional person, and record its own speaker binding as inferred. A wrong name is reversible. A voiceprint is not.
What changes
sourceasrosterortranscript; a screen-backed name is stored astranscripton that wire.notes_inferred, public sourceauto) only when some segment is already marked as the user, and never on that user's speaker. An existing non-notes match is not overwritten. A later notes call may rewrite an inferred label. Manual labels, unassignments, and rejections win and are not reapplied. Rejecting the label removes the name from the note and removes identifiers this note added.This supersedes the admission scanner in #20730. It keeps counterpart-first titles and notes-model bindings. It does not port the introduction scanner, the full-name creation gate,
SUMMARY_SPEAKER_LABELS_ENABLED, or the roster-source allowlist.Validation
backend/test.shon the identity selection: 309 passed.backend/scripts/typecheck.sh: 0 errors. Includes a screen name with a freemail local part that does not spell the name, a hallucinated name dropped while a frame exists, no person from a transcript-only name, no binding when the owner is unmarked, no first-name merge, no teaching, manual rejection removed from the note, and late refresh skipped when the user set the title.No deployment and no flag flip in this PR. The behavior is on the notes path that is already in production, so it takes effect on the next backend deploy. Do not deploy from this PR until review and CI are green.
Product-Invariants: INV-MEM-4, INV-TASK-2
INV-MEM-4: canonical memory promotion is unchanged. This stage writes transcript labels and provisional people after the note is saved.
INV-TASK-2: task capture admission is unchanged.
Failure-Class: none
The reviewed registry classes do not describe provisional contact identity or inferred transcript labels. The regression tests are the prevention surface.
Line-Count-Exception: backend/database/conversations.py | 3657 -> 3688 | Atomic notes, people, and binding persistence, plus the concurrent user-title veto. A broad persistence refactor is outside this change.
Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3571 -> 3577 | Carry notes identity context into the existing persistence seam.
Line-Count-Exception: backend/utils/llm/conversation_processing.py | 1961 -> 1969 | Pass screen or calendar evidence into validation without waiving name corroboration.