Skip to content

fix(deploy): persist live Firestore cost cuts (SCA-1993) - #25220

Merged
Git-on-my-level merged 4 commits into
mainfrom
agent/m1-studio-codex-sol/84dee94cdaf6
Nov 13, 2026
Merged

Git-on-my-level merged 4 commits into
mainfrom
agent/m1-studio-codex-sol/84dee94cdaf6

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Persist the Firestore cost cuts already enabled in production so future deploys retain them. Implements SCA-1993.

  • Set bpp_decision_cache from 0 to 100 and enable held-poll skip on all four prod Cloud Run backend services. Enable upload coalescing on backend-sync and backend-integration.
  • Give the prod batch worker backend-integration's complete lever map and enable held-poll skip. Render its flag through Helm, including explicit false kill-switch values. Preserve dev defaults.
  • Regenerate the runtime manifest and read-lever evidence; bind prod worker parity to backend-integration and retain existing partial-lever expiry dates.
  • Keep default/dev worker inheritance checks and verify prod matches backend-integration. Recognize the existing default-off boolean helpers in the cross-service reader inventory so held-poll skip's real reader is detected.

Validation: generator freshness; 271 runtime validator/generator tests; 93 runtime renderer tests; 104 worker chart tests; 30 cross-service contract tests (3 optional historical replays skipped); all 47 local preflight checks; full backend Pyright (0 errors with locked dependencies); and the normal push hook. The latest test-only correction preserves the runtime configuration byte-for-byte.

Current desired prod policy (repo inputs for the next authorized roll):

Surface bpp_decision_cache Held-poll skip Upload coalescing Projection finish backoff
backend 100 true omitted omitted; default off at next roll
backend-sync 100 true true omitted; default off at next roll
backend-sync-backfill 100 true omitted omitted; default off at next roll
backend-integration 100 true true omitted; preserve default off
batch-pipeline-worker (all worker siblings) integration's complete map, including 100 true omitted omitted; default off

Authority: the SCA-1993 human scope correction at 17:32Z and rollout-lead SCA-1894 comment 01a1d5f7-44b2-7e09-9623-212d5dbfa1d8. The latter explicitly says backend/sync/backfill retain writer-only ON until their next rolls, when they drop it. There is no unresolved next-roll policy question. SCA-2026's newer source 40d7ffe receipt is historical operational evidence; its stopped rollout is not acceptance or authority to deploy or restore deleted revisions.

Tests exercise the exact per-service declaration/render policy, full existing lever literals, and prod/dev worker renders including the T4 sibling. The latest preparation adds only tests; no runtime value, membership, scaling, image, traffic, privacy or custody control changes.

Code preparation only: no production reads/writes, switches, deploy or merge. The existing Multica review is the sole review of record; no author-side reviewer is launched. Earlier Multica chart-inheritance finding and both CI failures were fixed in e4c93ad083; the connector review at that commit reports no findings. Any remaining finding goes back for a ruling within the two-round cap. Rolls remain with the rollout lead until SCA-1894 closes.

Failure-Class: none

Product invariants affected

  • INV-MEM-4: this deploy-only change retains canonical memory intake, consolidation, promotion authority, and privacy policy settings.

View guided diff Turn on auto-fix

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T18:19:41.619777Z 75c4a43 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 2a74fcf into main Nov 13, 2026
63 checks passed
@Git-on-my-level
Git-on-my-level deleted the agent/m1-studio-codex-sol/84dee94cdaf6 branch November 13, 2026 19:22
Git-on-my-level added a commit that referenced this pull request Nov 14, 2026
…4) (#25225)

SCA-2024: Replace the per-process projection finish survey with a
bounded, resumable stamping pass and shared versioned completion marker.
New replicas use filtered discovery immediately once maintenance
finishes; until then, serving keeps the legacy page without per-row
stamp transactions.

Persisted/ready transitions maintain clock fields regardless of the read
lever, including backend-listen request paths and operator scripts. All
Store backends expose marker readiness; Postgres/simulation require
their own control marker, so Firestore maintenance cannot enable
filtering over an uncertified population. The runbook records the writer
audit, read budgets, deployment order, rollback and re-enable gates.

The bounded integration repair merges approved main `6262a2b82e`
(including SCA-1993 / #25220) and refreshes only the usage-month
full-map snapshot hashes and the pending patch's context. Served runtime
inputs, qualification code, assertions, monthly defaults, epochs, TTLs
and activation authority are unchanged. The pending patch still proposes
exactly six 0->5 lever values on the same three services and is excluded
from ordinary composition. Published commit history is preserved. The
integration conflict in Firestore budget registrations retains both
main's new fresh-delivery entry and this PR's two existing entries
unchanged.

Validation:

- Current connector finding
[discussion_r4568217716](#25225 (comment))
is fixed by moving only the CLI test import and clock-entry helper test
import to their module import blocks. Non-import ASTs are identical;
monkeypatches and all assertions remain unchanged. Each complete
affected file passes in a separate `backend/test.sh` run: **11 + 17
passed**. Existing module-stub and import-time side-effect checks pass
over the full tree (2,998 test files and 2,592 production files, zero
violations).
- Earlier bounded repair consumes the owner's `flag-budget-count.patch`:
`count` 277→278 is the only changed JSON value. Duplicate-rejecting
parsing confirms 278 unique registered names, 161 seeded/replacement
slots and 117 owned exceptions. SCA-2012 added the fresh-guard entry
without updating this summary; all registrations, owners, expiries,
scope, defaults and both Firestore budgets are preserved.
- Reproduced shard 3 locally: **1 failed / 23 passed** before repair.
After repair, the combined registry/scope/runtime/qualifier sweep passes
**571 tests**, including all 24 flag-budget and 107 qualifier tests;
three historical cross-service replay cases retain their existing opt-in
skips. The separate feature-flag registry suite passes **109 tests**.
Test assertions and selectors are unchanged.
- Reproduced the exact shard-1 integration failure: old branch
`777515b3b1` passes 107 qualification tests; integration with approved
main yields 3 failures / 104 passes; the two-artifact repair restores
**107 passes**.
- Earlier integration head: **380 passed** across qualification, Store
parity, owner-drain parity, finish backfill and finish backoff.
- `make preflight`: **44 checks passed**, including Firestore
query/index checks; composed runtime manifest is current.
- Previous repaired head `777515b3b1` cleared CI emulator proofs and
shard 2. Its local emulator evidence was 40 passed with one pre-existing
throughput skip; no isolation, privacy, custody or timeout guard was
relaxed.
- New CI is required. Aggregate unit failure is downstream of its failed
shard, not an additional failure or a waiver.

Two Multica review rounds are already complete. The SCA-2073 owner
ruling permits bounded integration repair through the capped release
route; this new head remains at the current issue step for owner
scope/freshness reconciliation. No third review or author-side reviewer
is requested. Exact-head hosted green CI and existing finding
dispositions remain release gates. Production rolls belong to the
rollout lead. No production/cloud/account reads or writes, activation,
scan/stamp, deployment, installation, credentials change or GitHub merge
performed. Re-enable still requires all writers deployed and stamping
complete, #25145 / SCA-1799 merged/deployed, and nonzero GMP values for
both finish-read and completion counters; matched-window savings and a
zero-missing-clock census remain post-deployment acceptance.

Writer evidence: [request-path and job/script
audit](https://github.com/BasedHardware/omi/blob/agent/m1-studio-codex-sol/be1f6c00b122/backend/docs/runbooks/projection-finish-writer-audit.md).

## Product invariants affected

none

Failure-Class: none

Pipeline-Tuning: no active numeric tuning. Existing retry delays,
serving page sizes and cadence are unchanged. The existing offline
monthly proposal remains two 0->5 values on three services; this repair
only updates its context to approved config literals, without applying
it.


Body-waived: historical local-receipt lines above name earlier heads of
this PR (777515b, 2c13d4c); current head
bc6c99845ff8fcc3d9aacc1ac5e03bc45a65b19 is the origin/main merge-in with
conflict-resolution-only delta per SCA-2175, with hosted CI green at
that head.
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