Skip to content

Clarify the proven-rejector scheduling contract - #21331

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/fc-scheduling-contract-narrow
Oct 12, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/fc-scheduling-contract-narrow

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Clarify the live scheduling contract for the approved proven-rejector exception in #21298. Ordinary (non-proven-rejector) updates retain the coalescing prohibition. A proven rejector may keep one fenced pending entry; once proof is revoked, clip selection returns to its latest original interval.

This is a registry-only lifecycle PR from fresh origin/main 543e520. It changes only violated_contract in FC-live-speaker-scheduling-regression.json. The canonical prevention, existing guard artifacts, status, evidence and scope hints stay intact; no validator, scheduler, budget or identity-policy code changes. The targeted guard artifact is added with the code in #21298, where it exists; it is not referenced prematurely from this main-based lifecycle branch.

Failure-Class: FC-live-speaker-scheduling-regression

Root cause of the narrative mismatch: the earlier blanket no-coalescing contract predates the explicitly approved proven-rejector exception. The revision states that exception and its revocation boundary precisely. Durable prevention remains the registered FIFO, budget, owner-evidence and diagnostics regressions; #21298 additionally pins latest-original extraction after manual/profile revocation through the real matcher runner. Changing this narrative does not itself enable runtime behavior or prove production recognition improvement.

Product invariants affected

none

Validation: exact-head 335495b make preflight passed all 14 selected checks in 622.37 seconds, including failure-class schema/protocol, guard-artifact ratchet and all 31 CLI fixtures. Normal pre-push hooks also passed all 14 applicable checks in 224.90 seconds with no skip hatch. Terminal exact-head CI is green: 10 successful workflow runs and all 54 current checks completed successfully, neutrally or as expected skips; none pending, failed or cancelled. No backend Python changes require a backend test shard in this registry-only PR. No force-push, skip hatch, production reads or deployment.

View guided diff Turn on auto-fix

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-12T17:23:59.137237Z 335495b PR opened
ℹ️ 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.

Git-on-my-level added a commit that referenced this pull request Oct 12, 2026
Restore recognition opportunities for ordinary voices without applying
broad priority or coalescing to the restored FIFO scheduler. An already
proven rejector with 80 queued updates now has one pending entry behind
a late owner; the tried owner still receives its final initial-evidence
clip in original arrival order against untried voices.

Only three completed, sufficiently evidenced comparison rounds that
clearly reject every enrolled candidate can prove a rejector in the
current generation. A completed accept, near-owner result, margin
ambiguity, contention or invalid/empty comparison prevents proof for
that generation. Pending evidence, failed requests and duplicate audio
never count as completed rounds. Current distances are rechecked, and
known manual authority prevents demotion. Proof resets on rollover.

Proven rejectors coalesce only pending timing ranges and the latest
segment ID, without crossing generation/conversation/provider-scope
fences; ordinary updates keep separate FIFO entries and unchanged clip
selection. Rejectors cannot reserve the last two socket tokens. No
autonomous leftover self-requeue, new tokens, refunds, refill change or
recovery tranches are added. The existing 12 attempts/voice, 16 socket
burst, 240/hour refill, 16 tasks and ten-second query cap remain
enforced. This cannot raise the GPU request ceiling; actual use may
redistribute toward ordinary voices. Thresholds, margins, manual veto,
contention and stale/authority fences stay unchanged. All #21181
counters/first-block logs and #21235 query/comparison, budget,
progress/refusal and qsize stop hooks remain compatible.

Telemetry:

- omi_speaker_id_rejector_demotions_total{action="deferred|coalesced"}:
deferred counts newly created/converted pending rejector entries placed
behind ordinary work; coalesced counts updates absorbed into an existing
rejector entry. Repeated inspection does not recount them. This measures
scheduling opportunities, not accepts or saved GPU requests.
- omi_speaker_id_rejector_tail_denials_total{reason="reserved_tail"}:
otherwise-admissible rejector requests denied at the shared tail,
spending neither token nor voice attempt. Actual voice/socket exhaustion
still uses the old cap split, whose sum continues to equal the legacy
embedding_budget count. The distinct rejector_tail_reserved
exit/diagnostic reason is added to the closed vocabulary.
- The two new counters have three preinitialized total series and three
created series per target, with closed labels and no
UID/socket/recording/conversation/scope/speaker labels. Existing four
budget/extraction counter families retain their 12 total plus 12 created
series. The new exit reason adds one possible legacy exit series (and
created series); no existing meaning is changed. UIDs remain only in the
existing bounded logs.

Expected benefit: compare owner_identified excluding
single_speaker_all_owner against same-hour prior days at comparable
conversation volume after the restored scheduler deployment has settled.
Positive demotion/tail-denial rates establish opportunity; owner
comparisons/accepts per conversation should rise without increased
false-owner contention, while reservation/extraction and GPU request
rates per conversation stay within unchanged ceilings. The new counters
alone do not prove recognition improvement. No production data/log reads
or api.omi.me calls were used.

Validation: exact head 81b415a passed
all 32 make preflight checks in 1,211.36 seconds. Relevant
run-unit-ci.sh shard 6/4 passed 4,592 tests across 292 selected files,
with zero typecheck errors. The 502 matcher-focused cases across 17
files passed with an isolated rollover-file retry after an initial
CPU-time guard failure. Both real-runner revocation paths assert
extraction only of (40,44) for the revoked voice, followed by the
ordinary voice's (50,55), excluding the old (30,34) pool. All tests used
backend/test.sh or its documented CI wrapper, with Google
credentials/project stripped and temporary CLOUDSDK_CONFIG. An
additional unchanged-main messaging QA file passed all 24 assertions but
repeatedly hit its existing 0.30-second CPU-time guard (0.38–0.42s) in
an unrelated projection test; no guard/allowlist/test source was
changed. Normal pre-push hooks passed, including all 32 preflight checks
(727.29s), zero-error typecheck, runtime-image closure, all 36
changed-file cases and OpenAPI/app-client compatibility. Terminal
exact-head CI is green: 12 successful workflows and all 60 current
checks completed, with no pending/failure/cancellation. All six backend
shards, guardrails, stack gauntlet, hermetic E2E and hygiene passed;
prior and retry evidence is in result-targeted-A.md.

Failure-Class: FC-live-speaker-scheduling-regression

This instance-fix PR keeps the existing violated_contract and all other
registry narrative unchanged. It only re-adds
test_speaker_targeted_fairness.py as a canonical guard artifact, as
permitted by the protocol. The approved ordinary/proven-rejector
contract narrowing will land through the separate registry-only
lifecycle PR #21331; the validator is unchanged.

## Product invariants affected

none

Reviewer risks: an already dequeued task stays under its existing voice
lock/task ceiling; demotion applies to pending entries. Under sustained
ordinary work, rejectors can wait longer. Coalesced rejector audio may
change their subsequent centroid within unchanged thresholds. Manual
protection uses authority already observed by the matcher; the final
receipt/veto gate still independently controls every publication. PR
B/#21222 recovery changes are excluded and will wait until PR A merges.

The rejection-history/tail primitive is isolated in speaker_rejector.py
and timing union in speaker_queue.py; speakers.py stays at 1,495 lines
without a line-count exception. Current origin/main (543e520) was
merged normally. The only conflict was the unrelated Telegram clock
regression; main's current relative in-window timestamp fixture was kept
intact, replacing the branch's older clock seam. No guard, timeout,
force-push or skip hatch is used. Earlier and superseded validation is
recorded in result-targeted-A.md.

Review follow-up: deferred entries retain their earliest enqueue order
and latest segment ID. Before merging, the queue captures that latest
update's original start/end/duration (including when merging an already
pooled entry). On manual or close-profile proof revocation, it drops
pooled ranges and restores that interval before ordinary clip selection.
The two real-runner revocation tests now assert (40, 44) only for that
voice, excluding the formerly pooled (30, 34). The approved fractional
tail cutoff remains <=2, with no other scheduler or decision-policy
changes.

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/21298?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/21298?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F21298&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
@Git-on-my-level
Git-on-my-level merged commit b0fed65 into main Oct 12, 2026
58 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/fc-scheduling-contract-narrow branch October 12, 2026 19:08
Git-on-my-level added a commit that referenced this pull request Oct 13, 2026
Target fresh-audio recovery at voices that still have a plausible owner
match or have not reached a completed decision. After the initial twelve
attempts, a current calibrated owner near-miss or undecided voice can
receive at most two +3 tranches. Proven rejectors and completed
clearly-far voices receive none; a voice that becomes ineligible cannot
spend unused extra attempts from an existing tranche. Current profile
rechecks may change eligibility without renewing the allowance or
freshness ledger.

Merged fetched origin/main 7cc32e0 (including #21235 diagnostics,
#21298 targeted scheduling and #21331 contract revision) into the
existing lane/matcher-voice-recovery branch. This reuses #21222,
preserves its reviewed history and introduces no rebase or force-push.
Ordinary FIFO cadence, proven-rejector coalescing/tail policy,
revoked-proof latest-original clip selection and no autonomous
self-requeue all remain intact.

Rollover fix after Grok review: snapshot a bounded already-decided
marker with retained quota before clear(). Across profile/donor awaits,
a missing current decision cannot become undecided and grant recovery. A
current rebuilt near-owner row may qualify again; uncarried quota resets
the marker. It supplies neither identity authority nor rejector
scheduling proof. Real-runner tests cover extraction finishing before
restore and restore finishing before extraction, with an owner actually
accepted on attempt twelve: no query/grant/token spend, unchanged
checkpoints, and the carried three-clip centroid preserved.

Eligibility reuses the existing completed-comparison ledger, any
already-decided carried/manual row and the unchanged owner_near_miss
predicate: owner nearest, distance in [0.65,0.70), existing runner-up
gap >=0.10, and no accepted/contended result. Other completed non-near
results receive no extra quota. No acceptance threshold, margin, manual
veto, contention, stale/authority rule or new authority read is
introduced.

Grok-approved freshness/selection is retained: >=10 distinct physical
PCM seconds after the checkpoint; 30-second monotonic cooldown; at most
two grants; independent hard ceiling 18/voice-generation; post-watermark
gapped phrases pooled first up to ten seconds, with older fallback only
below the unchanged evidence minimum. A grant checkpoints all current
PCM only when the selected post-checkpoint query can actually be
reserved under its increased allowance. Duplicates, overlap, forged
timestamps, prebuffered/evicted credit, ring replacement, scope changes
and lifecycle churn cannot renew credit or tranches.
Failures/cancellation spend both voice and socket quota. The shared
16-token burst/240-per-hour refill, 16-task ceiling and ten-second
queries are unchanged.

Telemetry:

- omi_speaker_id_recovery_tranches_total{tranche="first|second"} counts
each grant once with its first synchronous reservation.
- omi_speaker_id_recovery_acceptances_total{target="owner|person"}
counts the first automatic acceptance per voice-generation after a
successful extra extraction. It excludes manual, stale, failed and
contended results, and does not recount reinstatement or carried state.
-
omi_speaker_id_recovery_denials_total{reason="proven_rejector|clearly_far|completed_not_near_owner"}
counts attempted extra reservations refused by eligibility, including
grant requests and unused attempts in an already open tranche. Proven
rejector uses the unchanged three-round proof; clearly_far covers a
completed clear rejection before that proof; completed_not_near_owner
covers other decided results outside the current calibrated predicate,
including retained decided voices whose current row is absent during
refresh. Denials spend nothing and do not advance grant checkpoints.
Freshness/cooldown/socket/tranche/attempt refusals are not included in
this eligibility family and keep existing cap telemetry. These are
refusal events, not unique voices or saved GPU calls.
- Recovery adds seven preinitialized total series and seven created
series per target with closed labels. #21181 budget/extraction families,
first-block log and cap-sum/legacy equality, #21235 diagnostics, and
#21298's three rejector series remain compatible. No
UID/socket/recording/conversation/generation/scope/speaker labels or new
log payloads.

Maximum extra GPU allowance is six calls per qualifying voice-generation
(+50%), each <=10 seconds, all within the unchanged socket envelope 16 +
240*t for t hours since creation. Actual GPU utilization may rise inside
that envelope. Production benefit is not established by tests or the new
counters: compare owner_identified excluding single-speaker at
comparable-volume same-hour baselines, owner comparisons/accepts per
conversation, first/second grant and denial rates, demotion/tail-denial
incidence, extraction failures, contention and reservations/GPU calls
per conversation. No production data/log reads or api.omi.me calls were
used.

Validation for rollover revision
377bf2a: 599 focused tests across 22
files, including 36 recovery cases; relevant run-unit-ci.sh shard 6/1
passed 5996 tests across 293 selected files with zero typecheck errors.
Exact committed-head make preflight passed all 32 checks in 271.57s. The
new two-interleaving real-runner test failed twice on the reviewed head
and passes with the guard. Tests use backend/test.sh (or the documented
CI wrapper), stripped GOOGLE credentials and temporary CLOUDSDK_CONFIG.
Initial shard exceeded the standard CPU guard in unchanged sync-capture
permutation tests; the same-guard focused reproduction and full shard
rerun passed without allowlist/limit changes. Initial preflight hit the
1500-line file ratchet; a one-line comment shortening fixed it without
executable changes or exception. Normal push hooks passed, including all
32 preflight checks (142.88s), zero-error typechecking, runtime closure,
changed-file tests and OpenAPI compatibility. Terminal exact-head source
CI is green: 12 successful workflow runs and 60 completed checks (34
success, 26 expected skips), with no pending/failure/cancellation. All
six backend unit shards, guardrails, hermetic E2E, listen stack gauntlet
and CodeQL passed; no skip hatch, rebase or force-push.

Failure-Class: new

The new FC-live-speaker-fresh-recovery definition owns the bounded
allowance/provenance/eligibility primitive and registers the
real-runner, budget and telemetry guards. Root cause: fixed initial
quotas can stop a still-plausible or undecided voice before usable clean
PCM arrives; broad recovery would also spend scarce requests on already
clear rejections. Durable prevention: preserved physical/capture
high-watermarks plus current decision eligibility at each extra
reservation, independent hard caps and real-runner guards for gapped
selection, no checkpoint on old fallback, allowance overshoot, actual
scope changes, carried limits, each denial reason, withdrawn unused
quota, retained decided rows and profile rechecks.

## Product invariants affected

none

Reviewer risks: previously decided retained voices fail closed during
refresh until a current decision is rebuilt; this can conservatively
deny an opportunity while profiles are incomplete. Truly-owner speech
whose current completed result is clearly far is intentionally excluded
until current profile revalidation changes eligibility;
finished-conversation recognition remains independent. Recovery affects
clip selection only after initial exhaustion; its centroid may differ,
under unchanged identity rules. An already reserved in-flight call
spends quota even if eligibility/authority later changes, with existing
publication guards still deciding acceptance. Timestamp
reordering/eviction can conservatively lose fresh credit. Denied voices
can retain ordinary FIFO work until they meet the unchanged
proven-rejector rules; this PR adds no scheduling priority or retry. No
merge/deployment is performed by this PR publication.
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.

1 participant