Repository navigation
perf(firestore): re-graduate usage_month_cache, queue_age_sample_budget; singleton_loops 25% - #22929
Merged
Merged
Conversation
…et; singleton_loops 25% FIRESTORE_READ_LEVERS literal only (runtime_env, listen + pusher values, flag registry, two pinned contract tests): - usage_month_cache 5 -> 100: measured -45.0M reads/day at 100% on 10-17; flagged off 10-18 on an ambiguous backend-sync 5xx guard that stayed elevated with the lever at 0. Its caller is 43.2M/day now (listen 33.1M, backend 10.1M, 24h to 10-20T17Z). - queue_age_sample_budget 5 -> 100: 5% since 10-20 05Z with no guard breach. - singleton_loops 0 -> 25: the 10-20T09Z "starvation" flag-off (#22851) read acquired=0 / skipped_owner>0 on listen; skipped_owner proves a live tick key, i.e. an admission on a holder whose lease counter #22118 hid. 25% first per the loop runbook until lease_1h is visible on every service. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Grok review (agentctl delegate, request_key fs-regress-review, selector family=grok) covering this PR and #22926: VERDICT: SAFE, no findings.
|
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
Re-graduate two proven Firestore read levers stuck below 100%, and restart
singleton_loopsat 25%. This changes only theFIRESTORE_READ_LEVERSliteral: runtime_env_base.yaml→ renderedruntime_env.yaml, listen + pusher dev/prod values, flag registry, and the two contract tests that pin the literal. Generated withavo/firestore-reads/set_levers.pyas the complete 13-key literal.usage_month_cachereadout-2026-10-17T20Z-absolute.json). It was flagged off 10-18 on an ambiguous backend-sync 5xx guard that stayed elevated with the lever at 0, then ran at 5% from 10-20 05Z with guards in band.user_usage:get_monthly_usage_stats_sinceis 43.2M/day now (listen 33.1M + backend 10.1M, 24h to 10-20T17Z) vs ~4.9M/day at 100% on 10-17.queue_age_sample_budgetdurable_queue_age:_sample_status_pageis 46.8M/day visible (listen 40.3M, backend 6.5M) plus the sync services. It overlapssingleton_loops; never sum the two.singleton_loopsacquired=0 / skipped_owner>0on listen.fsr_admitreturnsskipped_ownerfor a recovery loop only while the tick key is live, and only an admission sets it, so the holder ran on backend-sync, whose lease counter #22118 hid (fixed in the companion PR). 25% first per the loop runbook until lease evidence is visible on every service.Measurement line: the Firestore reads loop (
avo/firestore-reads) grades each lever from the served revision.usage_month_cacheis graded on absolute caller reads vsbaseline-2026-10-20T05-00Z.json(get_monthly_usage_stats_since1.24M reads/h on backend). Fleet total isprogress.pyHEADLINE (926M/day at 10-20T17Z).Lane / contract
fs-regress (P1, two-lane rollout swarm 10-20), on behalf of the
firestore-readsloop (work items WQ8, WQ3, WQ1 → WQ10).Product invariants affected
INV-MEM-4: path match only. The lever literal appears in a file under the INV-MEM-4 glob; no memory promotion, consolidation or intake behavior changes.
historical_scan_memoand the other memory-path levers keep their current values.Verification
backend/test.shwithBACKEND_UNIT_TEST_FILE_LIST=test_render_backend_runtime_env.py,test_verify_pusher_config_references.py,test_firestore_read_levers.py,test_fsr_s2_singleton_loops.py,test_fsr_wq3_queue_age_budget.py,test_fsr_s4_caches.py: 70 passed (unit layer).singleton_loopsenable:FSR_QUEUE_AGE_PUBLISHER=1in prod listen values, andomi_queue_oldest_ready_age_secondspresent on listen (200 series) and Cloud Run (490) at 10-20 18:30Z (in-cluster Prometheus,ro-prod).Rollback
Each lever is its own kill switch.
set_levers.pywith the previous literal (usage_month_cache5,queue_age_sample_budget5,singleton_loops0), or revert this commit. The loop's hourly verify flags a lever off on a 5xx or lease breach.Deploy
FIRESTORE_READ_LEVERStrain order: listen → pusher → Cloud Run (the Cloud Run candidate check compares listen/pusher env against main). Ship together with or after the companion sync-GMP scrape PR, so thesingleton_loopslease gate can see every holder. Owned by the rollout lead.Failure-Class: none
🤖 Generated with Claude Code