Repository navigation
stt: unpaced tail residence-deadline stall is delivery_expired; ineligible_reason label (P34 follow-up) - #23087
Merged
Merged
Conversation
…gible_reason label (P34 follow-up) Lead rulings 603b95 and f12e4a, follow-up to the P34 local-delivery split. - replay_delivery: a live tail write still blocked when the frame's residence deadline passes (the unpaced initial-leg case: a blocked ws.send never raises AudioDeliveryExpired) latched no local reason and fell to connection_lost, which votes on the provider serve-failure circuit and counts as provider failure while the vendor socket stayed open. Any unconfirmed write with the connection alive now latches delivery_expired (censored, no circuit vote). - demand telemetry: omi_listen_demand_exhausted_sessions_total gains the bounded ineligible_reason label - the first failing admission condition (recovery_off / unmanaged_chain / onboarding / phone_call / language_unqualified / no_profile; none for eligible cohorts) - so the ~300/10m ineligible sessions hitting chain_exhausted can be split by exclusion. capture_demand_admission's eligibility conjunction is untouched.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…s metric Review of the P34 follow-up (Luna, SHIP, minor): a batch preview can move an admitted session into the ineligible cohort after admission with no exclusion reason, so that session closes on the (ineligible, none) series; it was not pre-initialized, so increase() would read its first burst as zero.
Member
Author
|
Review round 1 (Luna, SHIP) — the one minor taken: the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two lead-ruled follow-ups to #23074 (P34). (1)
replay_delivery.py: a live tail whose write is still blocked when the frame's residence deadline passes — the unpaced-initial-leg case, where a blockedws.sendnever raisesAudioDeliveryExpired— previously latched no local reason and fell to the defaultconnection_lost, which votes on the provider's serve-failure circuit and counts as provider failure while the vendor socket stayed open (review of #23074, lead ruling 603b95: "local stall must not vote the circuit or count as provider failure"). Theclock() < packet_deadlinehalf of the guard is dropped; any unconfirmed write with the connection alive latchesdelivery_expired. (2) Lead ruling f12e4a:omi_listen_demand_exhausted_sessions_totalgains a boundedineligible_reasonlabel — the first failing admission condition (recovery_off/unmanaged_chain/onboarding/phone_call/language_unqualified/no_profile,nonefor the eligible cohorts) — because ~300/10m ineligible sessions are the only cohort hittingchain_exhaustedand the cohort alone cannot say which exclusion they share.Behavior change
Deliberate and lead-ruled, scoped to one branch: the residence-deadline tail stall now reports
delivery_expired(censored, no circuit vote, no provider-failure attribution) where it reportedconnection_lost(attributable, circuit-opening). The label change is telemetry-only:capture_demand_admission's eligibility conjunction is untouched;ineligible_reasononly names why a session already judged ineligible is in that cohort.How to read it
sum by (reason) (increase(omi_fallback_total{job="backend-listen-metrics",component="stt_live_session"}[10m]))— the residence-deadline case now lands indelivery_expiredinstead ofconnection_lost.sum by (ineligible_reason, outcome) (increase(omi_listen_demand_exhausted_sessions_total{job="backend-listen-metrics",demand_cohort="ineligible"}[10m]))(outcome=yes means the session also exhausted its selection/recovery hop).Lane / contract
Lane soniox-telemetry (P34 follow-up; rulings 603b95 + f12e4a). Contract row in
swarm/contracts.md:omi_listen_demand_exhausted_sessions_total ineligible_reason. Owner sign-offs for other lanes' files: none needed.Product invariants affected
none
Verification
backend/test.shwithBACKEND_UNIT_TEST_FILE_LIST(13 files, unit layer, underomi-heavy, 4 workers): newtest_unpaced_tail_write_blocked_through_residence_deadline_is_local_not_provider_death(reproduced the reviewer's scenario failing before the fix:typed_death_reasonwas None with the vendor alive), the demand-telemetry suite extended (first-failing-condition mapping incl.no_profile, bounded labels, zero children,finish()carries the reason). Not run: the full backend suite, any live or prod check.Rollback
Revert the PR. No flags, no data migration.
Failure-Class: none