Repository navigation
config(firestore-reads): restore exonerated cohort 5 levers 0->100 (keep #24210 backend-sync usage_month exception) - #24238
Merged
Conversation
…eep #24210 backend-sync usage_month exception) Discrimination verdict at full cohort-off (#24207+#24210 served ~04:44Z): backend-sync 5xx flat-to-higher 0.0041-0.0044 (1522-1639/h, 05Z-07Z ticks) vs 0.0035-0.0036 at 100 and ref 0.0014 -> cohort EXONERATED per runbook rule; agrees with lead RCA admitscope-2026-11-01 s5 + syncwall-2026-11-01. Restored to 100: singleton_loops, backfill_task_reads, historical_scan_memo, ledger_purge_coalesce, queue_age_sample_budget. Give-back at 0 measured ~29-44M reads/day (~$14-21/day, snapshot union 11-01T05/07Z vs 10-31T19/21Z). Kept: usage_month_cache/usage_month_total at #24210 scope (backend-sync CR site 100/100 only; GKE umt stays 0 per CR-only split) per lead instruction; finjob_candidate_queries 0 (own 02Z gate); bpm/mliw/people 0 (graded). Config-only via set_levers.py + prod.overlay inline sites; 19 literal sites audited; contract tests updated; 119/119 pass (lane venv). NOT merged by the loop: staged for the lead's single off-peak train before 13:00Z.
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Git-on-my-level
added a commit
that referenced
this pull request
Nov 1, 2026
…tay in the doc (#24251) ## Summary Stops every audio, transcription and lifecycle PR from editing the same 8,791-line doc. `backend/AGENTS.md` told every audio, transcription, conversation-lifecycle, speaker or listen/pusher change to update `backend/docs/listen_pusher_pipeline.mdx` in the same PR. Between 10-18 and 11-01: - **165 fleet PRs** edited that file; - **77 of them had to merge `main` back in**, and each catch-up re-ran the pre-push gate and a full CI cycle (shipspeed baseline, conflict hot spots). The new rule: - **Change notes** (what changed, why, rollout and flag state, evidence) go in `backend/docs/listen_pusher_pipeline/changes/YYYY-MM-DD-<slug>.md`, one new file per change. Concurrent PRs never touch the same note. - **Contracts stay in the pipeline doc**: env vars and defaults, wire and payload fields, ordering and idempotency guarantees, sequence diagrams. Tests (for example `tests/unit/test_vad_cache_ttl_config.py`) and the flag registry cite that file, so contract edits still happen there. - Notes are folded into the doc periodically by one docs-only PR. The `backend/AGENTS.md` rule is shortened to stay inside its `agents-md-lean` byte budget; the detail lives in `changes/README.md`. ## Rollout / merge notes - Docs and agent instructions only. No runtime, workflow or deploy change. - **Merge after the 23:00Z train** (lead 9a266d): five vroute lanes and #24238/#24240 are editing the pipeline doc today. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/24251?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/24251?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F24251&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
added a commit
that referenced
this pull request
Nov 2, 2026
…/ledger_purge 100->0 (backend-sync 5xx 0.0134 vs ref 0.0073) (#24348) # Firestore reads loop guard flag-off — 2026-11-02 (singleton/backfill/historical/ledger_purge 100→0) ## Summary Firestore reads loop **URGENT guard flag-off** (autonomous, loop RUNBOOK step 1): four `FIRESTORE_READ_LEVERS` values 100 → **0**, everything else byte-identical to main. Response to verify tick 2026-11-02T05:00:20Z FAIL (pending-actions `flag_off`: singleton_loops, usage_month_cache, backfill_task_reads, historical_scan_memo, ledger_purge_coalesce). - Breach: backend-sync 5xx 3652/271872 = **0.0134** (audio-merge excluded in both windows) vs ref (prev-week same window, excl audio-merge) 1805/248696 = **0.0073**. Hourly trajectory: 0.0041 (22Z) → 0.0048 (23Z–00Z; restoration #24238 served 23:52Z) → 0.0062 (01Z) → 0.0082 (02Z) → 0.0078 (03Z) → 0.0076 (04Z) → **0.0134 (05Z)**. Evidence is ambiguous (smooth multi-hour rise, no clean step at the serve hour), so per the runbook ("flag off on breach anyway when the evidence is ambiguous") the flag-off proceeds as the discriminating experiment: rate falls at 0 → restoration cohort implicated (stays 0); rate stays >ref at 0 → exogenous again (#23739 / lead RCA e54718 precedent), restoration re-planned with the lead. - Flagged off everywhere (base ×11 sites, four Cloud Run overlay sites, listen/pusher dev+prod charts): `singleton_loops`, `backfill_task_reads`, `historical_scan_memo`, `ledger_purge_coalesce` 100 → 0. `usage_month_cache` base stays 0 (it was already 0 off the #24210 exception scope). - **Kept on purpose: `prod.overlay` backend-sync `usage_month_cache`/`usage_month_total` = 100** — the #24210 compute-admission exception. Admission calls backend-sync `/authorize-compute` with a 5-second client timeout; zeroing these re-breaks admission (admission stage mean ~5.1s, unevaluated deferrals ~3.7/s — the exact incident #24210 fixed under lead ruling dde240). The 05Z tick's `usage_month_cache` UNSAFE carries the shared service-scope why (WQ30 precedent: same-why proves service-scope), and `usage_month_total` was not flagged at all. If post-flag-off discrimination implicates umc specifically, zeroing the exception is #24210's documented rollback (admission impact accepted; lead decides). - `queue_age_sample_budget` stays 100 (not flagged; its needle callers read ~0 since the budget lever — readout 402.5M → 0.0M/day). All other keys unchanged. Config only, generated with `avo/firestore-reads/set_levers.py` (replace-mode, complete 20-key literal) plus the four prod.overlay inline sites hand-patched (flagged keys only) and the third pinned `expected` dict in `test_firestore_train_preserves_monthly_reader_scope_and_cloud_run_overrides` updated (set_levers' regexes do not cover it). Stale #24194-era comment blocks refreshed to the current scope. Regenerated `runtime_env.yaml` + feature-flag registry. ## Product invariants affected - INV-MEM-4 — config-only lever rollout; no data-path, promotion or authority change; every flagged lever reverts to flag-off behavior at 0; the #24210 admission exception is unchanged (epoch c2fs_20261026_r1 preserved). - INV-DATA-1 — no routing or ownership change; value-only edit of the existing `FIRESTORE_READ_LEVERS` key. ## Test plan - `backend/tests/unit/test_render_backend_runtime_env.py` + `backend/tests/unit/test_verify_pusher_config_references.py`: **119/119 pass** on the lane venv (`backend/.venv` freshly synced from pylock.macos.toml via `make setup-backend`). - Literal audit: 26 deploy value sites JSON-parsed — the 4 flagged keys = 0 at every site; `usage_month_cache`/ `usage_month_total` = 100 only at the prod.overlay + rendered backend-sync exception; `queue_age_sample_budget` = 100 everywhere; finjob/bpm/mliw/people = 0 everywhere. ## Rollout 1. **URGENT**: lead-owned train, order **listen → pusher → cloud-run** (FIRESTORE_READ_LEVERS order). The loop does not dispatch deploys or approve gates. 2. Post-serve: hourly tick verify runs the discrimination (2 clean ticks at 0 → cohort implicated, stays 0; flat >ref → exogenous, restoration re-plan with the lead). Re-baseline after the served revision changes. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/24348?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/24348?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F24348&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
Firestore reads loop restoration config (guard cohort re-enable): five
FIRESTORE_READ_LEVERSvalues 0 → 100, everything else byte-identical to main. This is the exoneration follow-up to #24194 (guard flag-off, WQ31/WQ32).admitscope-2026-11-01.md§5 "After the flag-off, 5xx rose, so per the runbook's own discriminating rule the flagged cohort is exonerated";syncwall-2026-11-01.mdattributes the 5xx mass to deliberate nonterminal_ack + legacy file retries).singleton_loops,backfill_task_reads,historical_scan_memo,ledger_purge_coalesce,queue_age_sample_budget. Measured give-back at 0 (cohort-union of needle callers, snapshot 2026-11-01T05Z/07Z vs pre-flag-off 10-31T19Z/21Z): ~29–44M reads/day ≈ $14–21/day; at 0 the flag-off also re-added the batch-admission latency class documented in admitscope.usage_month_cache/usage_month_totalstay 0 everywhere except thecloud_run/backend-syncexception (100/100,FSR_USAGE_MONTH_TOTAL_EPOCHunchanged). The GKE charts keep the Cloud Run-onlyusage_month_totalsplit (GKE = 0).finjob_candidate_queriesstays 0 (its own 02Z UNSAFE gate; callers ~0).batch_privacy_memoize,memory_list_index_window,people_scan_dedupestay 0 (graded WEAK/FALSIFIED).Config only, generated with
avo/firestore-reads/set_levers.py+ the prod.overlay inline sites (5 keys only); audited at 19 literal sites: the 5 restored keys = 100 everywhere,usage_month_cache/usage_month_total= 0 everywhere except the backend-sync Cloud Run site. Regeneratedruntime_env.yaml+ flag registry; the two pinned contract tests updated (119/119 pass on the lane venv). Per the lead: this PR is NOT to be merged by the loop — it is staged for the single off-peak lead train before 13:00Z.Product invariants affected
FIRESTORE_READ_LEVERSkey.Test plan
backend/tests/unit/test_render_backend_runtime_env.py+backend/tests/unit/test_verify_pusher_config_references.py: 119/119 pass on the lane venv.prod.overlaybackend-sync (100/100, fix(backend): restore monthly usage reads only for sync admission #24210 exception preserved); finjob/bpm/mliw/people = 0 at every site.Rollout