Repository navigation
feat(jobstore): sampled production copies and bounded discovery index - #25360
Merged
Git-on-my-level merged 21 commits intoNov 15, 2026
Merged
Git-on-my-level merged 21 commits into
Git-on-my-level merged 21 commits into
Conversation
The existing inventory contains 291 entries, while its declared count remained 289 after main integration. Correct the derived count; retain the seeded budget, entries and exception policy. The existing test_flag_budget.py assertion reproduces before this change and all 24 tests pass after it. Failure-Class: none
Resolve the derived flag count against all 295 merged entries. Retain the new upstream ready_pending discovery method on the primary-store delegation path and extend its regression coverage without expanding the index query allowlist.
Keep collector mode selection inside the existing infrastructure configuration helper. Preserve index and primary-baseline metric registration when either kill switch is off. The existing environment-read ratchet reproduces before this correction; the ratchet, selection, seam, index and flag-budget suites pass after it without changing its baseline. Failure-Class: none
Git-on-my-level
marked this pull request as ready for review
November 15, 2026 06:34
Git-on-my-level
marked this pull request as draft
November 15, 2026 07:15
Git-on-my-level
marked this pull request as ready for review
November 15, 2026 10:57
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.
Complete the Firestore-authoritative discovery index and its production copy lifecycle. In explicit index mode, only due leased/retry/result_ready reads use Postgres hints; Firestore retains every transaction, claim and privacy decision. Warm SQL/socket deadlines, first/periodic primary scans and live read/write kills preserve fallback.
Production copying now resolves a canonical owner at every current-document reread, applies a deterministic owner cohort and omits shared control/GPU/pull-claim documents. Excluded, malformed, absent or newly removed owners retire their copy. Captured reads and convergence use the same policy. State-specific sampled due parity checks selected primary-prefix coverage and validates every returned hint against the current primary; it does not claim complete backlog coverage.
A bounded operator page fills historical copies or rotates through retained copies after primary TTL deletion, including a dropped expiry refresh. It never invents a TTL or deletes Firestore state. Explicit read/statement/row/deadline budgets, warm transport deadlines, atomic private target-bound checkpoints and a nonblocking single-writer lock keep retries resumable. Copy retirement and synchronous privacy erasure remain reachable with mirror mode/admission/write kills off.
Product invariants affected
none
Validation
Rollout and rollback
The mirror foundation #25323 is merged. The source does not activate production. A separately reviewed stdlib operator supervisor enforces a canonical single-carrier installation, shared target daily reservations and bounded child-process cleanup; all 45 local packet tests pass. It is delivered on SCA-2288, with installation and production execution still pending. The release executor must pin actual writer/deletion revisions and targets, supervise a bounded rotation outside sweepable worktrees, set and measure its accepted retirement lag/read/write/connection budgets, verify backup retention and mode-off erasure, then admit an initial deterministic cohort in shadow mode. Index ramp is leased, retry, then result_ready, expanded only with state-specific traffic/parity, action correctness, sweep freshness, rollback and net-read evidence. Expansion belongs to the SCA-2288 integration owner with the existing release executor; the next evidence review and absolute budgets must be recorded before each activation. No arbitrary soak interval is required.
Rollback discovery with JOBSTORE_INDEX_READS=off or shadow/firestore mode; JOBSTORE_SHADOW_WRITES=off also disables index reads. Disable new production copies with JOBSTORE_PRODUCTION_MIRROR=off. Keep the retained target and deletion executor access, and continue copy retirement, until all retained obligations retire. Source merge, runtime acceptance and settled billing savings remain separate. #25215 stays frozen.
Runbooks: backend/docs/jobstore-discovery-index.md and backend/docs/jobstore-production-mirror.md. Existing SCA-2288/SCA-2222 retain coordination; no second rollout owner or production authority is introduced.
Failure class
Failure-Class: none
This is a new explicitly selected discovery/copy lifecycle on the merged mirror foundation. Unreviewed discovery methods, including ready_pending and hold/completion/capacity queries, retain primary semantics. No workflow, flag-budget policy or baseline allowances change.