Repository navigation
config: enable WQ13 finjob candidate queries at 5, graduate memory_list_index_window to 100 - #23646
Merged
Merged
Conversation
…st_index_window to 100 Firestore reads loop config PR (18-key FIRESTORE_READ_LEVERS literal, generated with avo/firestore-reads/set_levers.py, REPLACE-mode, byte-identical at all declaration sites): - finjob_candidate_queries 0 -> 5: first enable of the WQ13 rework from #23614. Code serves on all services (Cloud Run 528f97f 23:17Z, listen 86a15ac, pusher fca00e4); the three composite indexes are READY (CICAgJiVqpoK, CICAgJjH44cK, CICAgPjgiJoK). Pre-enable evidence: finjob candidate scans ~61M reads/h fleet-wide at 22-23Z (snapshot 2026-10-26T00-40Z.json), the top Firestore read caller; queue_age_sample_budget and singleton_loops at 100 since 23:17Z did not collapse them. - memory_list_index_window 25 -> 100: verify SUPPORTED at 25 since 2026-10-18; graduation per runbook ramp5 rule and the c2fs ranked plan (bundle with the WQ13 enable). Config only; off-path is the current served behavior for both levers.
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 was referenced Oct 26, 2026
Git-on-my-level
added a commit
that referenced
this pull request
Oct 26, 2026
… breach) (#23731) ## Summary Firestore reads loop EMERGENCY flag-off: set 8 levers to 0 in `FIRESTORE_READ_LEVERS` (19-key literal, generated with `avo/firestore-reads/set_levers.py`, REPLACE-mode, byte-identical at all 16 declaration sites + both pinned contract tests). Levers 100/5 -> 0: `singleton_loops`, `usage_month_cache`, `backfill_task_reads`, `historical_scan_memo`, `ledger_purge_coalesce`, `queue_age_sample_budget`, `batch_privacy_memoize`, `finjob_candidate_queries`. Trigger: the 2026-10-26T14:00Z tick's verify graded all 8 UNSAFE on the shared backend-sync 5xx guard (rate 0.0073 = 2401 errors vs ref 0.0011; evidence in pending-actions.json, snapshot 2026-10-26T14:00:39Z). The rate was already elevated pre-train (0.0120 in the 10-25T17Z window) and code trains (op1custody 06Z, op1dfield 10:35Z) are alternate suspects, so the evidence is ambiguous - the loop runbook 5xx rule says flag off anyway on a breach, and re-enable at 5% only if the rate persists below ref with these levers at 0 (exoneration). This matches the pre-committed watch condition recorded 10-26T05:55Z ("next tick re-raises flag_off with bpm pct=100 -> flag off URGENT"). Keepers unchanged at their served values: `action_items_page`, `candidates_page`, `canonical_statuses_dedupe`, `deletion_marker_cache`, `mcp_conversation_cards_cache`, `memory_list_index_window`, `request_read_dedupe`, `serving_config_cache`, `subscription_cache` at 100; `people_scan_dedupe` 0; `usage_month_total` 100. Off-path for the 8 flagged levers is pre-ramp behavior; all are config-gated read-path levers whose code is default-off at 0. Tooling note: `avo/firestore-reads/set_levers.py` LEVERS allowlist and the loop's `levers.json` did not yet know `usage_month_total` (added to backend KNOWN_LEVERS by #23646); both updated in the omi workspace repo separately. ## Product invariants affected - INV-MEM-4 - config-only lever rollback; every lever reverts at 0 with no data-path or authority change. - INV-DATA-1 - value-only edit of the existing `FIRESTORE_READ_LEVERS` key; no routing or ownership change. ## Test plan - Both pinned contract tests green locally on this branch: `tests/unit/test_verify_pusher_config_references.py` + `tests/unit/test_render_backend_runtime_env.py` (28 passed via `backend/test.sh` with `BACKEND_UNIT_TEST_FILE_LIST`). - Literal verified: exactly one distinct 19-key literal across `_base.yaml` (12 sites) + 4 chart values files; all 8 flagged keys at 0; keepers unchanged; no stale `:5` remains. - Post-merge watch: hourly verify gates + backend-sync/backend-sync-backfill 5xx rates; levers re-enable at 5% only after rate < ref for 24h with levers at 0. ## Rollout URGENT train order **listen -> pusher -> Cloud Run** (FIRESTORE_READ_LEVERS order; the Cloud Run candidate check compares GKE env against main's runtime_env). Handoff to the two-lane lead via bus after merge; this is a guard-breach rollback, not a ramp - no ramp clock starts until exoneration.
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 config: enable the WQ13
finjob_candidate_querieslever at 5%and graduate
memory_list_index_window25 → 100 in one literal (18 keys, generatedwith
avo/firestore-reads/set_levers.py, REPLACE-mode, byte-identical at alldeclaration sites).
finjob_candidate_queries: 0 → 5. The WQ13 rework (perf(firestore): narrow finalization candidate queries behind WQ13 lever #23614, 91ac171) replaces theconversation_finalization_jobsper-tick full-collection candidate re-scans withpredicate-equivalent narrow queries behind this default-off lever. The code is
serving everywhere since tonight's trains (Cloud Run 528f97f 23:17Z, listen 86a15ac
22:30Z, pusher fca00e4 00:24Z; all contain 91ac171) and all three composite
indexes it needs are READY live (CICAgJiVqpoK, CICAgJjH44cK, CICAgPjgiJoK).
Why now: the three finjob candidate scans are the top Firestore read caller —
~61M reads/h fleet-wide in the 22–23Z hour (snapshot 2026-10-26T00-40Z.json;
29.0M/h already at 17–18Z pre-serve), concentrated on backend-sync and
backend-sync-backfill.
queue_age_sample_budgetandsingleton_loopsat 100since 23:17Z did not collapse them; the re-scan amplifier is the code path this
lever narrows.
memory_list_index_window: 25 → 100. verify SUPPORTED at 25 since 2026-10-18(no FALSIFIED/UNSAFE tick); graduation follows the loop runbook ramp5 rule and
the c2fs ranked plan (item 5, bundle with the WQ13 enable).
Config only; no code paths change. Off-path for both levers is the current served
behavior (
finjob_candidate_queries0 = byte-identical scans; 25 was alreadySUPPORTED).
Product invariants affected
FIRESTORE_READ_LEVERSkey; no routing or ownership change.Test plan
backend/tests/unit/test_render_backend_runtime_env.py+backend/tests/unit/test_verify_pusher_config_references.pyviabackend/test.shwithBACKEND_UNIT_TEST_FILE_LIST(local shard green on this branch before push).runtime_env.yaml, flag registry, and both pinned contract tests.Rollout
finjob_candidate_queriesfollows the 5 → 25 → 100 ladder with soaks between steps (3h soak + verify PASS ×2 per runbook); ramp5 gates decide each step. memory_list_index_window rides the same literal at 100.