Skip to content

config(firestore): re-enable six exonerated levers at 5% (guards in band 7 ticks) - #22629

Merged
Git-on-my-level merged 3 commits into
mainfrom
lane/firestore-reads-reenable-5pct
Oct 20, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
lane/firestore-reads-reenable-5pct

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Firestore reads loop (avo/firestore-reads), config-only change to FIRESTORE_READ_LEVERS via set_levers.py (full 13-key replace-mode literal): six levers re-enable at 5% after exoneration, seven levers unchanged.

  • usage_month_cache 0 → 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_loops 0 → 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_budget 0 → 5: registration landed in perf(firestore): register queue_age_sample_budget lever + publication freshness gate (dark, WQ2b) #22205; FSR_QUEUE_AGE_PUBLISHER=1 is 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_coalesce 0 → 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_dedupe stays 0: no qualifying call site in production.
  • Unchanged at 100: action_items_page, candidates_page, deletion_marker_cache, request_read_dedupe, serving_config_cache, subscription_cache.

Regenerated by set_levers.py: backend/deploy/runtime_env.yaml, feature-flag registry, and the contract tests pinning the rendered literal.

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: 16 value sites across 6 files, JSON literal byte-identical except the six re-enabled keys (diff reviewed).
  • Contract tests pinning the literal are updated in the same commit.
  • Guards: backend / backend-sync / backend-sync-backfill 5xx in band for 7 consecutive hourly snapshots before this PR (loop state, snapshots 2026-10-19T11Z–17Z); lease health gate (lease_1h) currently empty in verify — the singleton ramp watch re-checks acquisitions each tick.
  • CI gates this PR (Backend Unit Tests + Hermetic E2E); the loop compares failures against main's known-red set before admin-merge.

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_LEVERS change 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.

View guided diff Turn on auto-fix

…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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T23:43:53.808485Z a869e85 New commits
ℹ️ 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 28ebd54 into main Oct 20, 2026
56 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/firestore-reads-reenable-5pct branch October 20, 2026 04:08
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