Skip to content

feat(stt): name batch voices and preserve faithful word turns - #23461

Closed
Git-on-my-level wants to merge 42 commits into
mainfrom
local-quality-names-20261023
Closed

Git-on-my-level wants to merge 42 commits into
mainfrom
local-quality-names-20261023

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Depends on #23435; this branch includes that scorecard and targets main. Integrate before #23463.

Batch voices use compatible bounded centroids and authorized already-loaded enrollment snapshots. Faithful turns split at voice changes, retain original word/capture clocks and preserve manual authority. Overlapping provider intervals no longer double-count clean PCM, and otherwise-unused evidence slots sample disjoint tails of long turns within the existing three-clip/ten-second budget. No model, matching threshold or scorecard denominator is relaxed.

Reconcile the newer scorecard dependency while retaining immutable archive identities, switch validation and composed projection fingerprints. Firestore tests cover fractional multipart clocks against the exact retained PCM samples and replay without another upload; replay/order tests explicitly cover legacy and faithful scopes. Existing metadata fixtures now follow silent bridge keywords, pinned stage-policy and short-page recovery contracts; the contention test injects at its actual projection/assignment boundary, not the independent policy bootstrap.

Prior contributor validation (retained; not independently rerun in this reconciliation): the combined four-PR integration passed 143 focused backend tests, backend typecheck (0 errors), and 56 unchanged Flutter speaker/playback mapping and widget tests. File-isolated tests use backend/test.sh. Emulator, standalone and preflight evidence is recorded below. Synthetic PCM and fake player I/O do not qualify real model quality or native audible playback.

Draft: the frozen corpus and immutable original inference receipts are available locally. At b739526e47c1, whole-recording and enrollment-rich persisted projection runs completed for all five recordings with zero execution failures and zero new model calls. Raw persisted turns, visible output and pooled/rich scores exactly match the prior r3/r2 outputs; all 16 projection source fingerprints and gallery/archive anchors were verified. The earlier disjoint-centroid refresh made 90 unique model calls; its actual source provenance is preserved, and ASR, VAD and diarization were not rerun. This verifies the current projection path using recorded inference evidence, not execution of the complete current worker. Rendered audible playback remains unqualified. No production reads, cloud inference, deployment or app release performed in this reconciliation.

Read/cost boundary: the current path reuses the authorized loaded snapshot with zero additional enrollment reads and zero new cold reads. Embeddings remain at most three clips of ten seconds per voice, with existing RPC deadlines. Missing compatible snapshots abstain. Added centroid overhead p50/p95, production service occupancy, and vendor latency/spend are explicitly UNMEASURED; the recorded clip receipts contain no elapsed timing fields. A future cold-reader path is not implemented and would require separate owner signoff on a budget of one user read plus P people reads and entitlement reads.

Product invariants affected

  • INV-MEM-4: the kill switch and metadata do not add a memory-promotion writer.

Failure-Class: FC-independent-owner-voice-accepts

Line-Count-Exception: backend/utils/conversations/speaker_resolution.py | 1564 -> 1586 | Preserve canonical manual receipt authority in existing fallback arbitration; shared decisions live in batch_naming.py.

Prior contributor combined runtime verification (retained evidence): all 87 tests in backend/tests/integration/test_batch_pipeline_projection_firestore.py passed on loopback Firestore 1.21.0 (Python 3.11.15). This includes chronological ordering, competing transactions, restart/replay, manual and privacy authority, multipart PCM seeks and the real HTTP sync-status boundary. Four original failures reproduced on unchanged main c10d3ca; fixture fixes retain existing contracts rather than altering production retry or quality rules.

Prior contributor standalone branch verification (retained evidence): 120 file-isolated naming/scorecard tests through backend/test.sh; 23 standalone Firestore emulator tests passed. Pinned Python 3.11.15 backend typecheck: 0 errors.

Reproduction commands (from the repository root, after make setup; loopback emulator only):

printf '%s\n' tests/unit/test_batch_pipeline_naming.py tests/unit/test_local_quality_eval.py tests/unit/test_local_quality_loader.py tests/unit/test_local_quality_runner.py tests/unit/test_local_quality_inference_archive.py tests/unit/test_local_quality_enrollment.py tests/unit/test_local_quality_reference.py tests/unit/test_local_quality_viewer.py > /tmp/mike-tests.txt
BACKEND_UNIT_TEST_FILE_LIST=/tmp/mike-tests.txt BACKEND_PYTEST_WORKERS=2 bash backend/test.sh
FIRESTORE_EMULATOR_HOST=127.0.0.1:56144 PYTHONPATH=backend ENCRYPTION_SECRET=synthetic-only OPENAI_API_KEY=test-only backend/.venv/bin/python -m pytest backend/tests/integration/test_batch_pipeline_projection_firestore.py -q
(cd backend && PYTHON=.venv/bin/python bash scripts/typecheck.sh)
OMI_PR_BODY_FILE=/path/to/this-pr-body.md make preflight

Prior contributor manifest preflight evidence: 47 selected checks passed. The failure-class history ratchet reports a local shallow-history skip, so its full-history CI verdict remains unqualified. No Release Eligibility or remote CI pass is claimed.

Current reconciliation head: b739526e47c1. Its normal fast-forward push passed all 47 preflight checks, selected backend tests, full backend typecheck (0 errors), source-closure checks and pinned formatting. The original contributor published d7fbd4f with its own bounded gate evidence.

Reconciliation follow-up: retain independent historical sync scopes while permitting proven server-allocated batch IDs to coalesce; honor winning whole-voice manual assignments even without a batch scope. Model fixtures reload their shared factory, and router lock tests use the real pinned SciPy hierarchy. All 170 tests in the five-file admission, loader, abstention, naming and lock guard passed through backend/test.sh, including both new disjoint-evidence cases. This follow-up preserves the external sampler, playback and integration changes.

Current centroid/projection qualification (unchanged from r2): owner/enrolled accuracy 80.2492% (3543/4415), strict all-word 33.6116% (3543/10541), wrong-name plus false-owner rate 0.8823% (93/10541), Hungarian 1:1 oracle 90.0674%. Truth/output voice counts were 2/6, 2/10, 2/28, 5/28 and 3/54; all five count gates and the overall qualification failed. Current enrollment-rich diagnostics are 88.7563% automatic accuracy (8999/10139), 87.4453% strict all-word accuracy (8999/10291), 2.4002% error (247/10291) and 90.47% Hungarian 1:1 oracle, with 250 predeclared enrollment words excluded. Historical worker-switch configuration remains UNKNOWN; these receipts establish neither current inference-reuse eligibility nor execution of the complete current worker. Current centroid/projection qualification completed 5/5; overall accuracy and all five voice-count gates FAIL. The split gate remains FAIL, with identity accuracy losses of 3.7825 and 3.5461 percentage points; current reprojection preserves the recorded split results, whose historical worker/capture limitations remain unqualified. Existing comparison tasks local-quality-2026-10-pr2-r2 and local-quality-2026-10-pr2-enrollment-rich-r2 remain valid by exact persisted and visible output equivalence.

The reconciliation includes a test-only correction to upstream floor-eight workload-only Helm expectations, with exact +4 Pods/15 seconds scale-up and an explicit mixed-latency absence guard; its prior 17-case Helm run passed with no skips. The earlier five-file naming/fixture guard passed 170 tests. These remain prior execution receipts; the current head also passed its normal selected test hook. Upstream #23472 independently fixed the same stale Helm baseline.

The final relocation changes only keyword-only injection argument order, pure speaker mapping placement after the independent receipts read, and identical documentation/integration-test block locations. Its committed tree exactly matches the independently reviewed candidate; it composes cleanly with pinned main 4ff21eaf085b in static merge-tree review. No mainline behavior was copied or merged. Current runtime reprojection confirms exact output equivalence.

Count diagnostic: acoustic voice counts are 2/2/2/5/4; independent abstention-gap correction IDs add 4/8/26/23/50, producing persisted counts 6/10/28/28/54. The persisted-count gate remains FAIL. Of 872 missed owner words, 510 come from competing claims, 185 from distance rejection, 162 from missing coverage and 15 from abstention gaps; no persisted mapping mismatches were found. Matching thresholds are unchanged.

CI attempt 1 associated with PR head b739526e47c1 failed only backend unit shard 6 and its aggregate suite: an unchanged gateway deadline fixture requires eight handlers to reach a barrier before a real 30 ms deadline, producing a scheduling race. Both the test and provider files are byte-identical to the baseline; all five other backend shards passed. The single controlled failed-jobs-only retry also failed on the same deadline fixture. Both attempts of run 40081924322 checked out merge commit 843bf7ac86b2fda64f7e8badd388795e467733b2, combining PR head b739526e47c17653a9661e13323eb31637026527 with base 0fcd28344ba9a55c416d0250ca368c1f3a31fbe9; this CI evidence applies to that tested merge tree, while the runtime projection proof above executes the PR branch head directly. Attempt 2 is terminal: all five other backend shards, guardrails and Resolve passed; shard 6 and the aggregate suite failed. At the backend retry’s terminal snapshot, the rollup was 38 successes, 21 skips, 2 failures and 0 pending checks; PR body updates can register subsequent metadata checks. CI remains FAIL. No source, budget, selector or skip changes were made, and no further retry was performed.

🤖 Generated with Claude Code

Git-on-my-level and others added 25 commits October 23, 2026 15:13
Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reuse authorized enrollment snapshots with a transaction revocation fence, extract bounded compatible centroids outside the model lock, and preserve manual assignment authority.

Failure-Class: FC-independent-owner-voice-accepts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep decoded capture durations and persisted overlapping groups honest, use the shared conversation speaker allocator, verify model reference provenance, and add held-out enrollment diagnostics.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep decoded capture durations and persisted overlapping groups honest, use the shared conversation speaker allocator, verify model reference provenance, and add held-out enrollment diagnostics.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Count allocated conversation voice IDs across unit scopes, and reject mismatched source crops or model locks before WER.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep inference and projection provenance separate, forward authorized snapshots across the local subprocess boundary, and persist independently reprojected enrollment-rich diagnostics.

Failure-Class: FC-independent-owner-voice-accepts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Count allocated conversation voice IDs across unit scopes, and reject mismatched source crops or model locks before WER.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Decode the canonical receipt already loaded by the privacy guard before reserving the owner, retain fail-closed authority for unreadable receipts, and align runtime kill-switch bindings.

Failure-Class: FC-independent-owner-voice-accepts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Validate original source, crop, configuration and payload hashes without changing inference output or requiring a centroid enrichment implementation.

Failure-Class: FC-independent-owner-voice-accepts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Validate original source, crop, configuration and payload hashes without changing inference output or requiring a centroid enrichment implementation.

Failure-Class: FC-independent-owner-voice-accepts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reuse explicit immutable archives without repeating ASR, preserve original inference identity, and run the production bounded centroid hook before persisted snapshot and enrollment-rich projection.

Failure-Class: FC-independent-owner-voice-accepts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preserve original inference identity while rerunning persisted projection, without repeating private audio inference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve both source fingerprint paths before computing backend-relative identities, and exercise the standard relative runpy entry point before model loading.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Expose the cached embedding factory to local adapters and normalize the pooled value to an ndarray before serialization without changing weighted centroid arithmetic.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the unit CPU guard focused on the exercised behavior while preserving the production projection calls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the unit CPU guard focused on the exercised behavior while preserving the production projection calls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep cold schema and projection imports in file collection while measuring each naming and authority assertion under the unchanged backend CPU guard.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The exact guarded runner now passes all 19 evaluator tests without changing duration budgets or exercised projection behavior.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The exact guarded runner now passes all 19 evaluator tests without changing duration budgets or exercised projection behavior.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Align persisted turn validation with production zero-duration word evidence, preserve original identity indices and text/voice diagnostics, and continue rejecting reversed or nonfinite clocks. Include optional conversation voice-link implementation in projection provenance.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep public transcript segments free of biometric fields while allowing server-private root metadata consumed by conversation voice linking.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use the external evaluation environment in the runnable command, matching the private-artifact and runtime-image guidance.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Extend the inherited exact loader assertion to include the real CPU centroid extractor while retaining all model, checkpoint and adapter composition checks.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T03:21:26.171130Z 80e2753 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Move the unchanged active flag declaration to the stable end of the active catalog so independent upstream additions merge cleanly without changing rollout semantics.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27d8111e55

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

from pyannote.audio import Pipeline # type: ignore[reportMissingImports] # GPU runtime dependency
from metrics import AUDIO, RTF, GPU_MEMORY
from utils.stt.diarization_turns import overlap_regions, exclusive_from_activity
from utils.stt.voice_centroids import (

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include the shared centroid module in the diarizer image

For the separate batch diarizer releases, this new import prevents startup: backend/diarizer/Dockerfile copies only diarization_turns.py and logging_config.py into utils, while both dev_omi_diarizer_batch_values.yaml and prod_omi_diarizer_batch_values.yaml launch batch_main, which imports final_pass. Repository-wide search found the new module only under backend/utils/stt, with no image copy or generated equivalent, so those containers raise ModuleNotFoundError: utils.stt.voice_centroids. Add the module to the image's source surface and verify the batch entrypoint; the local source-closure check currently passes without detecting this omission.

AGENTS.md reference: backend/AGENTS.md:L218-L218

Useful? React with 👍 / 👎.

Comment on lines +123 to +124
def loaded_naming_snapshot(self):
from utils.stt.batch_naming import NamingSnapshot

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move the newly introduced imports to module scope

backend/AGENTS.md explicitly requires “All imports at module top level — never inside functions.” This new method imports NamingSnapshot and other dependencies inside its body, and the same pattern is introduced in several other naming/projection helpers. Move the new imports to module scope, extracting shared definitions into an import-safe module where necessary, so the implementation follows the backend's documented import convention.

AGENTS.md reference: backend/AGENTS.md:L163-L169

Useful? React with 👍 / 👎.

Comment on lines +229 to +232
scope=f'final:batch:{batch_segment_id or item.segment_id}',
id_namespace=f'batch:{item.segment_id}:',
speaker_ids=speaker_ids,
source='final_centroid:batch-v1' if decisions else 'batch_pyannote',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reconcile owner claims across independently named batch units

When adjacent independently diarized units merge into one conversation, different voices can each pass owner matching because naming_decisions() arbitrates only the centroids in the current payload. Publishing those accepts with final:batch: scopes and final_centroid:batch-v1 provenance bypasses the existing cross-unit safeguard: _without_resolution() in backend/utils/conversations/speaker_resolution.py withdraws competing claims only for sync: scopes with sync_embedding provenance, while the batch-authoritative processing path skips further acoustic resolution. Consequently, both voices remain labeled as the owner even when conversation resolution is marked unavailable. Extend the conservative cross-unit withdrawal or reconcile the combined voice evidence before retaining these new automatic accepts.

Useful? React with 👍 / 👎.

Use fixed synthetic tool output and verify the complete invocation so CI never depends on a personal decision-mill installation. Real local task generation retains the authoritative installed tool.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level and others added 3 commits October 24, 2026 09:13
Use fixed synthetic tool output and verify the complete invocation so CI never depends on a personal decision-mill installation. Real local task generation retains the authoritative installed tool.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use the external evaluation environment in the runnable command, matching the private-artifact and runtime-image guidance.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Carry the declared local-quality flag through the shared Cloud Run fixture helper so gateway and secret negative cases retain their intended single failure.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f00edf3789

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +22 to +24
prep = module('prep_speaker_task')
viewer = module('build_viewer')
cluster_tool = module('cluster_speaker_task')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove collection-time sys.modules mutations from the viewer tests

During pytest collection, these module-level calls execute module(), which assigns three entries to sys.modules without restoring them. This violates the backend's explicit test-isolation requirement against module-scope sys.modules mutation; wrapping the assignment in a helper does not change when it executes. Use regular package imports, or perform temporary registration in a fixture that restores the previous entries.

AGENTS.md reference: backend/AGENTS.md:L224-L224

Useful? React with 👍 / 👎.

Comment on lines +103 to +105
speaker=str(voice) if voice is not None else None,
speaker_id=speaker_ids.get(voice, OMI_SPEAKER_ID_SENTINEL),
speaker_id_scope=scope,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve distinct speaker keys for unrelated anonymous gaps

When a batch contains multiple diarization gaps, every abstained word now receives speaker=None, speaker_id=99, and the same batch scope. Both utils/sync/assignment.py and utils/batch_pipeline/live_projection.py pass these segments through ConversationSpeakerIdAllocator.assign(), which converts that combination into the same (scope, 'SPEAKER_99') key and assigns all gaps one real speaker ID. Consequently, a whole-speaker manual correction on one unidentified gap also labels unrelated gaps, including those in other projection parts. The previous BATCH_UNASSIGNED_* labels kept these gaps distinct, as required by the existing multipart-gap integration test. Preserve a distinct anonymous key per gap rather than passing every gap through the same sentinel key.

Useful? React with 👍 / 👎.

Comment on lines +409 to +412
'turns': rich_persisted,
'diagnostic_only': True,
'projection_fingerprint': projection_fingerprint,
'gallery_fingerprint': fingerprint(rich['gallery']),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include viewer-compatible provenance in enrollment-rich runs

When the generated runs-enrollment-rich.json is supplied to build_viewer.py, every successful recording fails the readiness predicate because these entries omit provenance.production_path. The viewer explicitly requires that field to be true and otherwise writes an empty, permanently pending task, so the documented enrollment-rich persisted view cannot produce comparison cards even after all inference and projection succeeds. Include the production-path provenance for these actual projected results while retaining their diagnostic_only designation.

Useful? React with 👍 / 👎.

Git-on-my-level and others added 6 commits October 24, 2026 09:35
Retain original archive identities with explicit switch evidence and use package imports for isolated viewer tests.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Close diarizer batch image imports, share the deferred pinned embedding factory, preserve distinct anonymous correction scopes, arbitrate independent owner accepts using canonical IDs and winning receipts, and qualify rich persisted views with production projection provenance. Refresh only intended policy fields in characterization fixtures.

Failure-Class: FC-independent-owner-voice-accepts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Retain original archive identities with explicit switch evidence and use package imports for isolated viewer tests.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use six seconds of synthetic enrollment evidence without changing the production five-second minimum. Disable optional cross-unit linking so the test continues to exercise independent claims when composed with PR3.

Failure-Class: FC-independent-owner-voice-accepts

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 80e275383d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +786 to +788
if naming_snapshot is None:
snapshot_loader = getattr(session, 'loaded_naming_snapshot', None)
naming_snapshot = snapshot_loader() if callable(snapshot_loader) else None

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Populate the naming snapshot on the owner-drain path

When an owner-chain walk supplies WalkHint(successor=True), assign_parts() skips self.store.check(session), leaving the new session's _naming_guard_snapshots empty. Serving constructs Projector without an injected snapshot loader, so loaded_naming_snapshot() returns None here and naming_decisions() returns no matches even with valid centroids and an enrolled owner. The later assignment callback calls session.prepare(), but never rebuilds those decisions. Consequently, fresh results processed through the default-enabled owner-drain path persist anonymously instead of receiving batch owner labels. Derive naming decisions after the guarded snapshot is populated, including when the pre-check is skipped.

Useful? React with 👍 / 👎.

@aryanorastar
aryanorastar marked this pull request as draft October 24, 2026 04:15
…-naming-pr23461

# Conflicts:
#	backend/diarizer/batch_pipeline_startup.py
#	backend/scripts/diarization_eval/README.md
#	backend/scripts/diarization_eval/local_artifacts.py
#	backend/scripts/diarization_eval/run_local.py
#	backend/tests/unit/test_local_quality_runner.py
#	backend/utils/stt/diarization_eval.py
Fill the existing bounded evidence budget from long clean turns without double-counting repeated PCM. Verify fractional capture clocks and multipart transcript seeks against persisted audio in Firestore. Keep legacy and faithful scopes covered and align metadata test fixtures with existing silent, stage-policy and short-page contracts.

Validation: targeted 143 checks passed, client playback 56 checks passed; original private quality corpus unavailable. Required quality gates remain unverified; all PRs stay draft.

Failure-Class: FC-independent-owner-voice-accepts
Git-on-my-level and others added 3 commits October 24, 2026 12:21
Keep historical sync IDs scoped while permitting server-allocated batch IDs to coalesce. Honor winning whole-voice manual receipts regardless of capture scope. Reload synthetic embedding factories per service fixture and use real pinned SciPy packages for router lock tests, retaining all existing assertions.

Failure-Class: FC-independent-owner-voice-accepts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Update stale Helm contract assertions to the existing floor-eight workload-only policy and exact four-pod, fifteen-second scale-up budget. Retain the twelve-pod cap, scale-down, probes, stream admission and active/GPU metric assertions, and explicitly reject the omitted mixed-latency metric. Runtime and chart files are unchanged.

Validation: exact backend/test.sh file guard passed all 17 cases with Helm installed and no skips.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reorder only injected keyword-only arguments and compute the pure speaker mapping after the independent receipts read. Relocate identical local-quality documentation and integration-test blocks to stable anchors so upstream additions compose without importing mainline behavior.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Oct 27, 2026
…peaker IDs (#23364) (#23381)

Fix live/offline transcript overlap without collapsing different
unidentified voices or renumbering a committed scoped voice on replay.

- Reuse known identities only for new legacy sync scopes; persisted
scope bindings and batch acoustic/manual authority win.
- Join anonymous live windows only for the same persisted scoped voice.
Fuzzy matches require compatible duration and a unique live occurrence,
preserving genuine repeated speech.

Validation: combined integration of #23435/#23461/#23463 plus this
branch passed 143 focused backend tests, backend typecheck (0 errors),
and 56 unchanged Flutter speaker/playback mapping and widget tests.
PCM/Firestore integration tests use synthetic audio and real
assignment/receipts; fake player I/O does not qualify native audible
playback. Standalone and preflight evidence is recorded below.

Draft: exact-head GitHub CI is unverified (Code Review requires GitHub
reconnection). The private frozen audio, speaker truth, enrollment and
model receipts used by #23461/#23463 are absent here; last measured
speaker-quality gates still fail. These safety fixes do not establish
model accuracy or Mike's recovery. No deployment or customer-data
changes. Related quality work remains #23461 and #23463; backend merge
and deployment are still required.

Failure-Class: FC-offline-merge-clock-offset-dup
Refs #23364
Refs #22755
Keep #23364 open for the wider quality and released-build acceptance;
this overlap fix alone does not close Mike’s complete report.

Combined runtime verification: all 87 tests in
`backend/tests/integration/test_batch_pipeline_projection_firestore.py`
passed on loopback Firestore 1.21.0 (Python 3.11.15). This includes
chronological ordering, competing transactions, restart/replay, manual
and privacy authority, multipart PCM seeks and the real HTTP sync-status
boundary. Four original failures reproduced on unchanged main
c10d3ca; fixture fixes retain existing contracts rather than altering
production retry or quality rules.

Standalone branch verification: 63 allocator/sync safety tests through
backend/test.sh and 37 replay-tool tests passed. Pinned Python 3.11.15
backend typecheck: 0 errors.

Reproduction commands (from the repository root, after `make setup`;
loopback emulator only):

```sh
printf '%s\n' tests/unit/test_stt_speaker_identity.py tests/unit/test_safety_wal_dual_write.py > /tmp/mike-tests.txt
BACKEND_UNIT_TEST_FILE_LIST=/tmp/mike-tests.txt BACKEND_PYTEST_WORKERS=2 bash backend/test.sh
PYTHONPATH=backend backend/.venv/bin/python -m pytest backend/tests/unit/test_sync_live_dedupe_replay_tool.py -q
(cd backend && PYTHON=.venv/bin/python bash scripts/typecheck.sh)
OMI_PR_BODY_FILE=/path/to/this-pr-body.md make preflight
```

Local manifest preflight: 32 selected checks passed. The failure-class
history ratchet reports a local shallow-history skip, so its
full-history CI verdict remains unqualified. No Release Eligibility or
remote CI pass is claimed.

Published head: bf45fc2; normal bounded pre-push gate passed.
@Git-on-my-level

Copy link
Copy Markdown
Member Author

@kodjima33 keep-or-close ping (lead2 ruling 664fd6, dropped-work audit 2026-11-09 item 7): this draft has been idle 15-17 days. Please reply with keep (and a next step) or it will be closed as not-now in 24h (after 2026-11-10 17:10Z). Closing keeps the branch; nothing is lost.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

Closing as part of a stale-PR cleanup David asked for on 2026-11-26 (Shipping lead agent): it is a draft with no activity for days. Nothing is lost: the branch stays, and anyone can reopen this PR if the work is still wanted. If it still matters, reopen it and refresh it against main.

@github-actions

Copy link
Copy Markdown
Contributor

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:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants