Skip to content

SCA-2012: fix fresh guard cadence and align acceptance counts - #25292

Merged
Git-on-my-level merged 4 commits into
mainfrom
agent/m1-studio-codex-sol/734bcd192a7e
Nov 15, 2026
Merged

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

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

SCA-2012's live samples exceeded the 120-second age budget after PR #25224 deployed. Sampling ran only at the start of general maintenance, and the serving supervisor waited for that entire pass before ticking again. A deterministic test holds cleanup in flight for 180 simulated seconds and reproduces the stale gauge.

Current integration head: fdfb46738ae61a513eb1f081bcf58131e1b5a918, a normal merge of main d1fb900e5b into the previously reviewed commit 8def546556dd20f13f6a835d75a1be13550d10a2. This incorporates the CPU-test repair #25312 (merge 8614ee4cad335ca13da7df9e17875012f3985077) that blocked the previous candidate. The merge completed without conflicts or additional source edits. Main's allowance-hold maintenance and all other current-main changes are retained; the fresh guard still has its independent timer and stored-class count cohort. Luna independently reviewed this current integration commit and posted REVIEW: SHIP on SCA-2012 at 2026-11-15 00:20:47 UTC. The subsequent merge-stage receipt confirms all eight backend shards, emulator proofs, and the hermetic merge gate passed on this commit.

The guard now has an independent 20-second supervised timer on the shared DB executor, using the same maintenance leader lease. All callers retain the existing nonblocking overlap lock and 60-second count-start cadence. The timer is owned by the serving runtime and stopped with it; projection-pump-only instances do not run it. Query failures and stale samples still remove counts/ratio, and scrapes do no IO. This establishes and corrects a scheduling defect; raw production ages alone do not prove it was the sole cause of every breach.

The new count-only backend/scripts/fresh_guard_cohort.py replaces the prescribed external projection_cohort.py for this acceptance check: it selects stored fresh_capture == True and the inclusive commit window, not fresh_first/capture age. It requires the matching read-only tier. A sample-timestamp gauge exposes the exact pre-RPC window anchor for equivalent comparisons; it expires with the counts. No documents, audio or content are read, and failed/empty windows have no healthy ratio.

Failure-Class: new

New class: FC-observer-cadence-coupled-to-maintenance. Prevention is independent bounded supervision while preserving leader election, overlap coalescing and sample expiry. The reusable regression artifact stalls real maintenance while exercising the real guard on a deterministic clock.

Stored-state contract: no field/writer change. OrderedMerge.commit_next remains the sole result-class writer. Runtime reader remains the maintenance-leader guard; the only added semantic reader is the count-only acceptance CLI. Existing merge/projection/discovery/drain/enrichment/recovery/shadow/simulator/worker readers retain their semantics. No provider, hold/release, predecessor, privacy, erasure, hard-3, alert or index-shape change.

Cost: unchanged count pair, roughly one read per 1,000 index entries per count (minimum two reads per pair). The timer adds up to three existing maintenance-lease checks per minute per serving replica. Each independent acceptance comparison costs a separate count pair. Its new query site has a declared planning envelope of 200 reads/comparison at 100,000 rows and 4,000/day at 20 comparisons; these are estimates, not runtime caps or booked savings. No new collection or lease role.

Validation on fdfb46738ae61a513eb1f081bcf58131e1b5a918:

  • Nine isolated files through backend/test.sh under bin/omi-heavy, offline/simulator-only: 359 passed. Covers the stalled-maintenance regression, count comparison CLI, serving/config, fresh merge and provider membership, delivered-share contract, and repaired erasure deployment tests.
  • All 42 local preflight checks passed, including the Firestore index guard's 591 query-shape tests.
  • Normal bounded pre-push gate passed; no hooks bypassed.
  • Luna's exact-commit REVIEW: SHIP: 2026-11-15 00:20:47 UTC. Merge-stage CI receipt: 2026-11-15 00:40:07 UTC, all eight backend shards, emulator proofs, and the hermetic merge gate green.
  • No endpoint changed; exercised the real collector/count builders against synthetic metadata and the real maintenance path with cleanup blocked. No production action/read or live acceptance claim.

Release owner must admit the correction through the existing train and verify collector retention of the new anchor gauge. Acceptance still requires two equivalent count comparisons at least 30 minutes apart within one percentage point, plus a complete healthy sample-age hour, after the admitted release. Revert through the release train or use the existing controlled guard kill switch; no data rollback. Live acceptance remains open on SCA-2012; SCA-2063 owns release coordination.

Integrate c5cf5a2, including the provider conformance fixture repair from PR #25266. Keep delivered-share sampling in general maintenance and retain the fresh-only independent timer.
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