Repository navigation
fix(stt): initialize stream-close alert counters at startup - #21327
Merged
Merged
Conversation
Failure-Class: FC-alert-never-provably-fired Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. |
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
Pre-create all 55 bounded provider/reason children of
omi_stt_stream_close_totalat process import/startup. A scraped zero makes the first Soniox budget-exhaustion close visible toincrease()instead of creating its first sample at one. Initialization is idempotent and covers streaming plus direct Soniox users.Add a startup-exposition contract for every Prometheus expression in
backend/charts/monitoring/alerts/*.json, scoped to metric definitions inbackend/utils/metrics.pyandbackend/llm_gateway/gateway/metrics.py. Existing sparse counters/histograms have individual reasons inDECLARED_SPARSE; the test rejects new debt and stale declarations. This reuses the existing backend unit-test runner and registry exposition, rather than adding a separate checker. It guards the supplied 2026-09-28 Soniox 402 outage class and 2026-10-12 zero-series evidence.Validation
BACKEND_UNIT_TEST_FILE_LIST="$PWD/.agent-test-files.txt" BACKEND_PYTEST_WORKERS=2 bash backend/test.sh: 125 passed across six files (6 new contract/regression tests, 15 provider-health, 35 Soniox typed-rejection, 49 alert-rule contract, 20 alert-behavior tests).BACKEND_UNIT_TEST_FILE_LIST="$PWD/.agent-focused-test-files.txt" BACKEND_PYTEST_WORKERS=2 bash backend/test.sh: 6 passed on the final new-test revision.scripts/pr-preflight --lane local --pr-body-file .agent-pr-body.md: 31 checks passed, including the hermetic Firestore guard (733 tests across seven files).scripts/pr-preflight --pr-body-file .agent-pr-body.md --metadata-only: 4 checks passed against committed headf6e5dd58f1498d437efa0cc2a414b0885a2fed57.test_monitoring_stt_*zero_init.pyfiles for an edit toalerts/live-stt.json.Product invariants affected
none
Failure class
Line-Count-Exception: backend/utils/stt/streaming.py | 2367 -> 2369 | two lines wiring the stream-close zero-init beside the existing connect zero-init at the same startup point
Failure-Class: FC-alert-never-provably-fired
🤖 Generated with Claude Code