Repository navigation
SCA-2012: fix fresh guard cadence and align acceptance counts - #25292
Merged
Merged
Conversation
Failure-Class: new
This was referenced Nov 15, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 maind1fb900e5binto the previously reviewed commit8def546556dd20f13f6a835d75a1be13550d10a2. This incorporates the CPU-test repair #25312 (merge8614ee4cad335ca13da7df9e17875012f3985077) 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.pyreplaces the prescribed externalprojection_cohort.pyfor this acceptance check: it selects storedfresh_capture == Trueand 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_nextremains 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:backend/test.shunderbin/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.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.