Skip to content

chore(gmp): keep #23388 cap-enforcement counters in the sync allowlist - #23492

Merged
Git-on-my-level merged 1 commit into
mainfrom
sub/gmp-sync-cap-metrics
Oct 24, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
sub/gmp-sync-cap-metrics

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

What changed and why

#23388 enforces finite allowances before sync and batch cloud spend, and its watch readout (backend/docs/stt-cap-dispatch.md) is omi_stt_cap_dispatch_decisions_total{path,outcome,reason} plus omi_stt_cap_provider_audio_seconds_total{path,outcome,provider,allowance}. The sync fleet's GMP collector keep-list (backend/deploy/cloud_run_gmp_sync.yaml) drops both families, so on backend-sync, backend-sync-backfill, and backend-integration — the services that make essentially all sync/batch provider-spend decisions — nobody can see whether the cap is holding or refusing. This adds exactly those two _total families to the keep regex, updates the runbook's family list, and extends the coverage test. Nothing else widens.

Series cost (all closed-enum labels, no free strings):

  • decisions: 10 paths × 2 outcomes × 8 reasons = 160 hard label-product bound, but outcome is a function of reason (allowed ⇒ entitled/byok/scope_disabled; held ⇒ the five denial reasons) and ≤6 paths fire per instance type, so ≤48 reachable per instance;
  • audio seconds: only the sync lane meters on this fleet (live never fires there), 2 outcomes × 5 providers × 2 allowance states = ≤20.

Worst case ≈ 70 new series per instance, realistically 20–30, against ~270 already kept. The bridge exporter's sync prefix list is deliberately untouched: its rule is one family per in-cluster consumer, and this watch queries GMP directly.

Product invariants affected

none

How it was verified

  • BACKEND_UNIT_TEST_FILE_LIST=<file with tests/unit/test_attach_cloud_run_gmp_sidecar.py> BACKEND_PYTEST_WORKERS=4 bash backend/test.sh — 97 passed, including test_sync_scrape_retains_exporter_and_direct_sentinel_consumers asserting both new families survive relabeling while omi_stt_cost_routing_settlements_total, omi_product_event_total, and the live-STT fallback drops still hold.
  • Keep-regex fullmatch check: both new names kept; _created companion series stay dropped, matching the existing stt_cap_recovery_reconciliation_total convention.
  • Not verified at runtime: the config takes effect on the next sync-fleet deploy (revision-local collector config); GMP-side confirmation is post-deploy per the runbook.

Tests

test_attach_cloud_run_gmp_sidecar.py::test_sync_scrape_retains_exporter_and_direct_sentinel_consumers extended with the two families — that enumeration is exactly the check that would have caught this gap.

UI evidence

UI-Evidence: none -- backend collector config, runbook, and test only; no UI surface changed.

Failure class (fixes)

Failure-Class: none

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

@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-24T09:08:37.535137Z c101f31 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
Git-on-my-level merged commit 0fcd283 into main Oct 24, 2026
62 checks passed
@Git-on-my-level
Git-on-my-level deleted the sub/gmp-sync-cap-metrics branch October 24, 2026 09:20
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