Repository navigation
config(firestore): graduate backfill/historical-scan/ledger-purge levers 5->100 (verify PASS x3) - #22958
Merged
Conversation
added 2 commits
October 21, 2026 07:02
…, ledger_purge_coalesce 5->100 (ramp5 rule met: verify PASS x3 ticks) Firestore reads loop WQ2. set_levers.py replace-mode, 13-key literal, delta exactly 3 keys. Contract tests 121 pass. Loop: firestore-reads. Phase handoff: two-lane lead owns deploys (bus handoff after merge).
…ace-package ImportError #22936 added a repo-root scripts/ namespace package; from scripts import export_openapi now raises plain ImportError (unknown location) which ModuleNotFoundError did not catch. Widens the direct-CLI fallback to ImportError. Unblocks every branch off tonight's main in the backend-route-policy-baseline pre-push check (loop: firestore-reads, WQ2 carrier PR).
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. |
Git-on-my-level
added a commit
that referenced
this pull request
Oct 21, 2026
…Z tick) (#22994) ## Summary Firestore reads loop (avo/firestore-reads), config-only change to `FIRESTORE_READ_LEVERS` via `set_levers.py` (full 13-key replace-mode literal): five levers flag OFF per a 5xx guard breach, eight keys unchanged. URGENT flag-off; deploy order matters (see Rollout). - Breach: verify.py at snapshot 2026-10-21T05:01:28Z (window_end 04Z) graded `usage_month_cache`, `backfill_task_reads`, `historical_scan_memo`, `ledger_purge_coalesce`, `queue_age_sample_budget` UNSAFE — guard backend-sync 5xx rate 0.0065 (2182 errors) vs reference 0.0025. Verify verdict FAIL; `pending-actions.json` flag_off written by the tick. - Timeline (checked via git ancestry + workflow runs): `usage_month_cache`/`queue_age_sample_budget` reached 100% via lead train 017c8ed (verified serving ~01:0xZ); the graduation PR #22958 (merge 4f8a5af, 100% for `backfill_task_reads`/`historical_scan_memo`/`ledger_purge_coalesce`) was served by the 02:47Z Cloud Run train (head 2a46d6a, SUCCESS) — i.e. all five were at/heading to 100% before the 04Z breach window. Causation is plausible, not exonerated: backend-sync 5xx 0.0065 vs ref 0.0025 arrived after the 100% rollout, and the runbook's flag-off-on-breach rule applies regardless. Re-enable at 5% once the rate persists in band with the levers at 0 (that exonerates them). - Unchanged: action_items_page, candidates_page, deletion_marker_cache, request_read_dedupe, serving_config_cache, subscription_cache at 100; singleton_loops stays 25; people_scan_dedupe stays 0. Regenerated by `set_levers.py`: `backend/deploy/runtime_env.yaml`, feature-flag registry, and the contract tests pinning the rendered literal. Delta reviewed: every literal occurrence changes by exactly the five keys 100→0 (43 insertions / 43 deletions across 9 files, no other change). ## 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 line-by-line — delta is exactly the five flagged levers 100→0 at all 45 literal 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 (this branch). - Guards: verify.py FAIL at 05:01:28Z tick (the trigger); verdict PASS at 01Z–04Z ticks (4 consecutive prior ticks in band). - zcode glm-5.3 review of the diff: r1 exec-embrace-silent-make-market-turn-uncover FIX-REQUIRED (draft 8a82eaabe44 had `usage_month_cache` left at 100 — only 4 of 5 levers flagged; fixed in 016e543, all 45 literal sites re-verified carrying `usage_month_cache:0`); r2 re-review of 016e543: exec-age-awful-summer-permit-rabbit-slush VERDICT SAFE (all 45 occurrences verified byte-identical 13-key literal, compose render check clean, 121/121 re-run, no collateral flag changes) - 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 URGENT flag-off. Config-only. Since 2026-10-20 the two-lane rollout lead owns every prod deploy: the loop posts the bus handoff after merge (train order listen → pusher → Cloud Run; FIRESTORE_READ_LEVERS order listen -> pusher -> Cloud Run). Every hour this literal stays at 100% the five levers stay enabled behind a 5xx-rate guard that has already breached once; the earlier the trains roll, the shorter the exposure. Rollback: revert this PR's literal (five levers back to 100) and re-run the same train; lever-off is the safe direction. Re-enable path: backend-sync 5xx in band 3+ ticks with these levers at 0 exonerates them → config PR back to 5% → ramp5 rule.
Archit-lal
pushed a commit
to Archit-lal/omi
that referenced
this pull request
Oct 21, 2026
…Z tick) verify.py UNSAFE at snapshot 2026-10-21T05:01:28Z: backend-sync 5xx rate 0.0065 (2182) vs ref 0.0025. Ambiguous causation (graduation train BasedHardware#22958 may not have served yet) -> flag off per runbook judgment rule. Re-enable at 5% once the rate persists in band with levers at 0. Full 13-key replace-mode literal via set_levers.py; 121/121 contract tests pass.
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): three levers graduate 5% → 100% per the runbook ramp5 rule, ten keys unchanged.backfill_task_reads5 → 100,historical_scan_memo5 → 100,ledger_purge_coalesce5 → 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_loopsstays 25: WQ10's plan gates 25 → 100 on the restored lease counter being visible with missing_services == [] (WQ9, fix(deploy): keep Firestore read and lease counters on sync GMP scrape #22926). fix(deploy): keep Firestore read and lease counters on sync GMP scrape #22926's merge 45a0323 IS served (ancestor of live backend-02035-jqv, verified by git ancestry), but the next snapshot must first show the restoredomi_fsr_leader_lease_totalinlease_1h; the loop re-checks each tick and graduates it in a later config PR.people_scan_dedupestays 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
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: diff reviewed — every literal occurrence changes by exactly the three keys 5→100 (45 value sites across 9 files).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).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.