Skip to content

config: ramp people_scan_dedupe 5->100 (firestore-reads loop WQ25 next-step) - #23837

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/firestore-reads-people100-1027
Oct 27, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/firestore-reads-people100-1027

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

Firestore read config train: disable memory_list_index_window (100→0) and batch_privacy_memoize (100→0), and start people_scan_dedupe at 5% after writer fencing #23733. The prior read loop graded the first two levers flat/WEAK or FALSIFIED; turning them off is not a measured dollar saving. No source query, authority, transcription, speaker, price, Free benefit, or audio-retention behavior is changed here.

Every declaration is a complete 19-key replacement JSON literal. finjob_candidate_queries stays at 5. All four production Cloud Run service overrides now carry the same three changes as listen/pusher; they previously masked them.

Monthly-total enable/epoch split — explicit, no scope expansion

Surface usage_month_total FSR_USAGE_MONTH_TOTAL_EPOCH
Prod backend, backend-sync, backend-sync-backfill, backend-integration 100 c2fs_20261026_r1
Base, listen/pusher (dev and prod), jobs, desktop backend, all dev services 0 v1

This preserves the existing qualified Cloud Run reader scope. The inherited PR accidentally copied the Cloud Run 100 literal into previously disabled surfaces while retaining v1. That expansion is removed. Disabled readers cannot initialize/re-stamp ready totals. Epochs are not made globally identical by enabling unqualified readers.

Declarations: backend/deploy/runtime_env/_base.yaml, prod.overlay.yaml, four listen/pusher chart values; generated runtime manifest and registry remain synchronized. The regression test checks complete literals, effective Cloud Run rendering, both chart environments, and the enable/epoch split.

Product invariants affected

Verification

  • Focused suite through backend/test.sh, BACKEND_UNIT_TEST_FILE_LIST naming test_render_backend_runtime_env.py and test_verify_pusher_config_references.py, BACKEND_PYTEST_WORKERS=4, under nice / omi-heavy. 119 passed on the final repair (91 renderer/scope + 28 pusher binding tests).
  • make preflight: 44 passed; normal pre-push gates passed, including both-environment runtime validation and type checking (0 errors). Final pushed head: 52661d092a9c07ff5454f627aa0268037edc6b85; 60 terminal green checks, 0 pending/failed/cancelled, independently checked at 10:50Z on 10-27; all 12 workflow runs completed successfully.
  • Luna's first round found a stale linked monthly-total runbook and a missing-declaration skip in the new test. Both are corrected; same-session delta returned SHIP. Review execs: exec-corn-celery-front-snack-genuine-quiz and exec-cement-normal-thank-shoe-live-magnet.
  • No production reads, writes, applies, merges, or deploys needed for this repair. Config rendering is the measured layer; no live-product acceptance or realized savings claimed.

Lead-owned ship/ramp plan

  1. After the batch entry/soak ends (~11:30Z on 10-27) and lead admission, ship listen → pusher → Cloud Run. Read back actual serving artifacts plus complete per-surface literal/epoch before each next step. All changes remain source-only until the lead ships them.
  2. Keep people at 5. Start its clock only after the last relevant surface serves the config. Hold ≥3 hours and two clean evaluator ticks; require no privacy/deletion violations, speaker/transcript/Free-benefit changes, 5xx or live-p95 regression. Lead expands people to 100 with complete literals on the same surfaces, targeted by 10-28 12:00Z; record a blocker if gates fail. Kill switch: people→0 everywhere applicable, preserving all other keys and the monthly split.
  3. Additional monthly-total scope is a separate qualification. By 10-28 12:00Z, lead attests every actual writer/revision/job/operator path, drains old writers, then aligns new readers to c2fs_20261026_r1 while still at 0 before considering 5. Otherwise record the qualification blocker and leave them off. After two hours with zero synthetic equivalence mismatches and no accounting/Free allowance, contention, 5xx or p95 regression, lead may expand the qualified scope to 100 by 10-29 12:00Z. Never enable a v1 reader against shared production totals. This PR does not enact that expansion.
  4. Monthly-total rollback: readers→0, maintenance stays on. If an old writer runs, keep readers off until all writers qualify and choose a new common epoch before re-enabling. See backend/docs/monthly-usage-totals.md.
  5. Compare absolute caller reads and replacement reads/writes/seed scans against 10-24/25; confirm D+1 billing export before booking net dollars. Realized savings from this repair: $0.

Lead picks up URL, exact head, MERGE READY state and evidence from data/run-2026-10-12-subscription-overhaul/reports/fsown-owner-1027.md; no lead-bus post. Merge/deploy/apply remain with the Infra Rollout Coordinator.

View guided diff Turn on auto-fix

…lever SUPPORTED at 18/19Z; clock 17:05Z >=3h; full 19-key literal, only people key differs)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-27T21:47:34.477255Z 7dd9ec7 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 94c8144 into main Oct 27, 2026
62 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/firestore-reads-people100-1027 branch October 27, 2026 21:56
Git-on-my-level added a commit that referenced this pull request Oct 28, 2026
…each (URGENT) (#23888)

## Summary

Firestore read config train — **5xx-guard flag-off (URGENT)**. The
2026-10-28T10:02Z evaluator tick failed the backend-sync 5xx guard (rate
0.0035 / 1424 errors vs ref 0.0014, floor 50) and flagged nine levers
UNSAFE. This PR sets those nine levers to **0** in every
`FIRESTORE_READ_LEVERS` declaration and keeps the eight SUPPORTED levers
at 100. No source query, authority, transcription, speaker, price, Free
benefit, or audio-retention behavior is changed here.

Flagged to 0: `singleton_loops`, `usage_month_cache`,
`backfill_task_reads`, `historical_scan_memo`, `ledger_purge_coalesce`,
`people_scan_dedupe`, `queue_age_sample_budget`,
`finjob_candidate_queries` (was 5), `usage_month_total` (was 100 on
Cloud Run only).

Kept at 100: `deletion_marker_cache`, `subscription_cache`,
`request_read_dedupe`, `serving_config_cache`, `candidates_page`,
`action_items_page`, `mcp_conversation_cards_cache`,
`canonical_statuses_dedupe`. `memory_list_index_window` and
`batch_privacy_memoize` stay 0.

## Monthly-total split — dissolved by this flag-off

`usage_month_total` goes to **0 on every surface**, including the four
prod Cloud Run services. The previously qualified `c2fs_20261026_r1`
epoch declarations are left untouched: every reader is off, so no reader
seeds or overwrites ready totals, and Cloud Run's qualified epoch stays
recorded for a deliberate re-enable. Re-enable path per the loop guard:
if the 5xx rate persists with these levers at 0, each lever is
exonerated and may come back at 5% individually with complete-literal
changes, restoring the monthly-total split at that point.

Declarations: `backend/deploy/runtime_env/_base.yaml`,
`prod.overlay.yaml` (all four Cloud Run service overrides), four
listen/pusher chart values; generated runtime manifest, flag registry,
and both contract tests updated
(`test_verify_pusher_config_references.py` pin;
`test_firestore_train_preserves_monthly_reader_scope_and_cloud_run_overrides`
now asserts readers-off on every surface with epochs unchanged).

## Product invariants affected

- INV-MEM-4 — keep privacy/deletion authority checks unchanged; this is
a read-cache/scan-dedupe flag-off with 0% kill switch semantics in the
direction of safety.
- INV-DATA-1 — existing configuration keys and data planes; no routing
or ownership change.

## Verification

- Focused suite: `test_render_backend_runtime_env.py` +
`test_verify_pusher_config_references.py` — **119 passed** on this head.
- Complete-literal check: all 42 literal sites (11 base + 4 prod overlay
+ 22 rendered manifest + 4 chart + 2 test pins) grep-verified: every
flagged lever is 0, every kept lever is 100/0 as intended, no other key
moved.
- Diff is literal-only outside README + one test expectation block;
runtime_env.yaml changes are exclusively `FIRESTORE_READ_LEVERS` value
lines.

## Lead-owned ship plan (URGENT flag-off train)

Ship **listen → pusher → Cloud Run** as soon as the train allows
(FIRESTORE_READ_LEVERS order listen → pusher → Cloud Run);
desktop-backend and jobs follow the standing train. This is a
guard-response rollback: reads give back until attribution lands. If the
breach is attributed to a non-lever cause (sync-path code PRs
#23849/#23857 merged 08:33–09:01Z inside the breach window are
candidates), restore the prior literal (#23837 state) in every
applicable full literal, retaining the monthly-total split.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/23888?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/23888?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F23888&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
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