Repository navigation
config(firestore): re-enable six exonerated levers at 5% (guards in band 7 ticks) - #22629
Merged
Merged
Conversation
…and 7 ticks) usage_month_cache, singleton_loops, queue_age_sample_budget, backfill_task_reads, historical_scan_memo, ledger_purge_coalesce: 0 -> 5. backend-sync/-backfill 5xx in band 11Z-17Z 2026-10-19 with all sync levers at 0 (drain finished); singleton lease rework (#22142) and queue-age code live on served image 4f43b2d; scope opener live (#22048). people_scan_dedupe stays 0 (no qualifying call site). set_levers.py replace-mode regeneration (16 sites, 6 files) incl. contract tests.
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. |
# Conflicts: # backend/docs/feature-flag-registry.md
…iteral, six levers at 5)
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 (avo/firestore-reads), config-only change to
FIRESTORE_READ_LEVERSviaset_levers.py(full 13-key replace-mode literal): six levers re-enable at 5% after exoneration, seven levers unchanged.usage_month_cache0 → 5: flag-off rationale required the backend-sync 5xx rate to persist with the lever at 0; the opposite happened — snapshots 2026-10-19 11Z–17Z show backend-sync 0.09→0.06% and backend-sync-backfill 0.28→0.32% for 7 consecutive ticks with ALL sync levers at 0 (sequencer drain finished ~11Z). The 10-18 spike was drain + sequencer rework, not the lever. Re-ramp per the runbook exoneration rule; expected recovery of the measured −45.0M/day absolute saving (readout-2026-10-17T20Z-absolute.json) at 100%.singleton_loops0 → 5: rework from perf(firestore): singleton lease fail-open rework + queue-age sample budget lever (dark, WQ1+WQ3) #22142 (fail-open takeover ≤300s, SIGTERM release, regression test) is live on the serving sync revisions (image 4f43b2d contains 5c304dd, verified via git ancestry). Starvation cause addressed; ramp5 rule with the verify.py lease gate active again.queue_age_sample_budget0 → 5: registration landed in perf(firestore): register queue_age_sample_budget lever + publication freshness gate (dark, WQ2b) #22205;FSR_QUEUE_AGE_PUBLISHER=1is declared in runtime_env on main and the code (5c304dd) is in the served image. Publisher is emitting; this enables the early-stop budget scan.backfill_task_reads/historical_scan_memo/ledger_purge_coalesce0 → 5: same exoneration evidence (in band since 11Z with levers at 0); historical_scan_memo's scope opener is live via feat(firestore): open historical_scan_memo_scope at the sync-task attempt boundary #22048.people_scan_dedupestays 0: no qualifying call site in production.Regenerated by
set_levers.py:backend/deploy/runtime_env.yaml, feature-flag registry, and the contract tests pinning the rendered literal.Product invariants affected
backend/deploy/runtime_env.yaml(a registry path); the change is a config value only (theFIRESTORE_READ_LEVERSliteral) and does not alter memory promotion, consolidation, or intake behavior.How it was verified
set_levers.pyreplace-mode regeneration: 16 value sites across 6 files, JSON literal byte-identical except the six re-enabled keys (diff reviewed).lease_1h) currently empty in verify — the singleton ramp watch re-checks acquisitions each tick.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. Train after merge (this loop dispatches, serialized, ops-env preserved): listen helm → pusher (exact-main dev qualification first) → Cloud Run prod (cloud-run-only). A merge of a
FIRESTORE_READ_LEVERSchange blocks other sessions' Cloud Run deploys until listen and pusher are rolled — announced on the loop's anx card before this merge. Rollback: revert this PR's literal (levers back to 0) and re-run the same train; lever-off is the safe direction. Ramp alarm: if verify flags any lever UNSAFE, the loop flags it back off autonomously.