Skip to content

config: flag off 8 FIRESTORE_READ_LEVERS to 0 (backend-sync 5xx guard breach) - #23731

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/firestore-reads-flagoff8-1026
Oct 26, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/firestore-reads-flagoff8-1026

Conversation

@Git-on-my-level

Copy link
Copy Markdown
Member

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T14:33:30.641234Z a24ebc5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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
Git-on-my-level merged commit c5486dd into main Oct 26, 2026
58 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/firestore-reads-flagoff8-1026 branch October 26, 2026 14:43
Git-on-my-level added a commit that referenced this pull request Oct 26, 2026
Reverts #23731 (merged c5486dd), restoring the 8 FIRESTORE_READ_LEVERS
it set to 0.

Why: #23731 was a precaution against a backend-sync 5xx guard breach at
the 14Z tick (0.73% vs 0.11% ref). op1 attributed those 5xx: ~256 are
audio-merge manifest-retry 500s that predate the regression (722/h on
10-25), and ~110 align with Firestore expired_transaction storms caused
by #23718's in-transaction decode (fixed by #23738). None are
lever-linked, so the levers are exonerated and their read savings should
stay.

#23731 never deployed (the serving Cloud Run, listen and pusher
revisions predate c5486dd). Merging this before the next CR train keeps
the lever state unchanged in production.

## Product invariants affected

- INV-MEM-4 (path match on backend/deploy/runtime_env.yaml only; this
revert restores Firestore read-lever values and does not change memory
promotion behavior)

Rollback: re-merge #23731.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Git-on-my-level added a commit that referenced this pull request Oct 26, 2026
Second conflict round after #23739 reverted the FIRESTORE_READ_LEVERS flip
(#23731) on main. Resolution identical in shape to c58ac2c: the
memory-maintenance-job manifest blocks stay deleted (the revert's in-block lever
edit dies with the block), live-surface lever values take main's reverted state
via auto-merge, and the feature-flag registry is re-rendered from the resolved
manifests (reverted lever values, no job surface). Checker OK; targeted shard
873 passed.
kriegcloud pushed a commit to kriegcloud/omi that referenced this pull request Oct 26, 2026
…xx guard breach) (BasedHardware#23731)"

This reverts commit c5486dd, reversing
changes made to cf029fb.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant