Repository navigation
fix(deploy): keep Firestore read and lease counters on sync GMP scrape - #22926
Merged
Merged
Conversation
#22118 gave backend-sync, backend-sync-backfill and backend-integration a metric keep-regex that omits omi_firestore_billed_reads_by_{caller,origin}_total, omi_firestore_caller_label_overflow_total and omi_fsr_leader_lease_total. From 2026-10-18 ~13Z those three services vanished from per-caller read attribution (320M reads/day at the 10-18 trough; ~500M/day now by subtraction) and from the singleton_loops lease gate, which then graded a healthy backend-sync lease holder as starvation and flagged the lever off (#22851). Keep the four families (~270 series per instance against the 10000-sample limit) and pin them in the scrape contract test. Failure-Class: FC-metric-dropped-by-scrape-allowlist 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. |
Member
Author
|
Grok review (agentctl delegate, request_key fs-regress-review, selector family=grok) covering this PR and the companion lever PR: VERDICT: SAFE, no findings. It confirmed the keep-regex still fullmatches every previously kept family and rejects every excluded name, matches the four |
Git-on-my-level
added a commit
that referenced
this pull request
Oct 21, 2026
…ers 5->100 (verify PASS x3) (#22958) ## Summary Firestore reads loop (avo/firestore-reads), config-only change to `FIRESTORE_READ_LEVERS` via `set_levers.py` (full 13-key replace-mode literal): three levers graduate 5% → 100% per the runbook ramp5 rule, ten keys unchanged. - `backfill_task_reads` 5 → 100, `historical_scan_memo` 5 → 100, `ledger_purge_coalesce` 5 → 100: ramp5 rule met — ramp clock started 2026-10-20T05:00Z (ledgered ref 39368136637), ≥ 3h elapsed, and verify.py PASS for 3 consecutive hourly ticks (2026-10-20T21Z, 22Z, 23Z snapshots: no lever UNSAFE or FALSIFIED). These three were INCONCLUSIVE at 5% (1h windows too small); the absolute readout at 100% vs baseline-2026-10-20T05-00Z.json decides their grade (D+2 billing confirmation follows). - `singleton_loops` stays 25: WQ10's plan gates 25 → 100 on the restored lease counter being visible with missing_services == [] (WQ9, #22926). #22926's merge 45a0323 IS served (ancestor of live backend-02035-jqv, verified by git ancestry), but the next snapshot must first show the restored `omi_fsr_leader_lease_total` in `lease_1h`; the loop re-checks each tick and graduates it in a later config PR. - Unchanged at 100: action_items_page, candidates_page, deletion_marker_cache, queue_age_sample_budget, request_read_dedupe, serving_config_cache, subscription_cache, usage_month_cache. `people_scan_dedupe` stays 0 (no qualifying call site). Regenerated by `set_levers.py`: `backend/deploy/runtime_env.yaml`, feature-flag registry, and the contract tests pinning the rendered literal. ## Product invariants affected - INV-MEM-4 — named because this PR changes `backend/deploy/runtime_env.yaml` (a registry path); the change is a config value only (the `FIRESTORE_READ_LEVERS` literal) and does not alter memory promotion, consolidation, or intake behavior. ## How it was verified - `set_levers.py` replace-mode regeneration: diff reviewed — every literal occurrence changes by exactly the three keys 5→100 (45 value sites across 9 files). - Contract tests: `test_render_backend_runtime_env.py` + `test_verify_pusher_config_references.py` + `test_firestore_read_levers.py` — 121 passed (backend/.venv, python 3.11.15, this branch). - Guards: verify.py verdict PASS at 21Z, 22Z, 23Z ticks; guards_5xx in band; fleet fast-ratio gate advisory. - CI gates this PR (Backend Unit Tests + Hermetic E2E); the loop compares failures against main's known-red set before merge-on-green. ## Tests Contract-test updates only; no code change. ## UI evidence UI-Evidence: none — config-only change. ## Failure class (fixes) Failure-Class: none ## Rollout Config-only. Since 2026-10-20 the two-lane rollout lead owns every prod deploy: the loop will post the bus handoff after merge (train order listen → pusher → Cloud Run; FIRESTORE_READ_LEVERS order listen -> pusher -> Cloud Run). Rollback: revert this PR's literal (three levers back to 5) and re-run the same train; lever-off is the safe direction. Ramp alarm: if verify flags any lever UNSAFE/FALSIFIED at 100%, the loop flags it back autonomously via a flag-off config PR. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/22958?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/22958?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F22958&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. -->
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
Restore the Firestore reads loop's visibility into
backend-sync,backend-sync-backfillandbackend-integration.#22118 (merged 2026-10-18 08:26Z, live ~13Z) gave those three services a revision-local GMP keep-regex. The regex omits
omi_firestore_billed_reads_by_{caller,origin}_total,omi_firestore_caller_label_overflow_totalandomi_fsr_leader_lease_total. Since then:singleton_loopslease gate went blind to holders on those services. On 10-20 09Z, listen showedskipped_owner44–69/h withacquired=0. The loop graded that as starvation and flagged the lever off (config(firestore): flag off singleton_loops (lease starvation UNSAFE x2 ticks at 5%) #22851). Infsr_admit, a recovery loop returnsskipped_owneronly while the tick key is live, and only an admission sets that key, so the work was running on an unscraped holder.This PR keeps the four families: about 270 series per instance on 10-18, against the sidecar's
samples: 10000limit. It also pins them intest_sync_scrape_retains_exporter_and_direct_sentinel_consumers, so a future trim fails in CI instead of at ingestion.Predicted reads/day saved: 0 directly. It restores attribution for about 55% of fleet reads and the lease evidence needed to re-ramp
singleton_loops, which measured −119M/day on its callers at 100% on 10-17.Measurement line: after the Cloud Run train,
avo/firestore-reads/measure.pyshowsorigins.missing_services == []andcoverage_1h≥ 0.8 (0.381 at 10-20 18Z). The GMP querysum by (service_name) (increase(omi_firestore_billed_reads_by_caller_total[1h]))returns rows for all three services again.Lane / contract
fs-regress (P1, two-lane rollout swarm 10-20). Owner sign-offs: none needed; the sync scrape profile comment block already says consumer changes update the allowlist and its test together.
Product invariants affected
none
Verification
backend/test.shwithBACKEND_UNIT_TEST_FILE_LIST=test_attach_cloud_run_gmp_sidecar.py+test_parakeet_request_metrics.py: 7 passed (unit layer; regex contract only).ro-prod, aggregates):max by (service_name) (count by (service_name, instance) (omi_firestore_billed_reads_by_caller_total))at 10-18 08Z: sync 149, backfill 140, integration 115; origin series 100/62/79.Rollback
Revert this commit; the next Cloud Run train drops the four families again. No application behavior depends on the scrape.
Deploy
Cloud Run train (
backend-sync,backend-sync-backfill,backend-integrationrevisions pick up the collector config). Owned by the rollout lead.Failure-Class: FC-metric-dropped-by-scrape-allowlist
🤖 Generated with Claude Code