Skip to content

SCA-2013: test(batch): guard fresh latency against backlog floods - #25244

Merged
Git-on-my-level merged 7 commits into
mainfrom
agent/m5-mbp-opencode-kimi-k3-1/43e7d6c7f4e7
Nov 14, 2026
Merged

Git-on-my-level merged 7 commits into
mainfrom
agent/m5-mbp-opencode-kimi-k3-1/43e7d6c7f4e7

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

Implements SCA-2013 (fresh-first step 2/5), test-only.

  • Adds backlog_flood_fresh_latency: 60 steady fresh owners and a 7,920-row, already-transcribed flood across 30 owners (22x steady hourly volume), including 396 Parakeet and 7,524 provider catch-up rows.
  • Compares held and unmetered release with same-seed, same-scheduler no-flood baselines, under both fix(batch): projection reaches newly committed owners first; backlog owners yield #25213 queue settings (FIRST_TURN=15 and 0). Models eight owner drains, 15/120-second turns, predecessor-ordered projection, and half-page recent discovery.
  • Pins fresh capture-to-projected p50/p90 within 10% for held, own-owner backlog depth, complete unmetered backlog drain, and a >2x p90 regression in the unmetered FIFO counterfactual.
  • Reports the real closed 10–20-minute commit-window guard and pins seed-1 outputs in a golden. Reserves release='gated' explicitly for step 4.
  • Integrates main through quarantine merge 5c0bd5a48031. The simulator transactional fresh query now filters borrowed rows before copying the chosen row; copying hundreds of held backlog payloads per probe made the imported adapter too slow for this flood. Query selection, ordering, and golden values are unchanged.

Why a scenario-specific projection model?

The existing real-Projector drain harness cannot drive provider admission, OrderedMerge, and Serving.reconcile together. The new model supplies only those scheduling seams over real merge/serving output; it does not change production code or owner ordering.

Incident / current-main distinction

The 2026-11-13 FIFO counterfactual reproduces the incident: seed 1 flood p90 is 423.5s versus 200.0s baseline (2.118x). With #25213's split queue enabled, seed 1 p90 is 1.044x baseline. The test runs both full-scale shapes rather than weakening the 2x incident assertion. Unmetered CLI still exits 1 under both release/order guards; held exits 0.

Verification

At head b66ca1f5d3312a9373375242a586dffd226386c4, after main integration:

  • cd backend && python -m pytest tests/unit/test_pipeline_sim_backlog_flood.py tests/unit/test_pipeline_sim*.py -q — 138 passed in 79.13s; flood file 35.84s in the loaded suite.
  • Flood file alone — 8 passed, 20.99s wall time (19.86s pytest time), under the 60s budget. Seed-1 golden unchanged.
  • python -m pytest -m integration tests/integration/test_store_conformance.py -k "sim and (fresh or transaction)" -q — 7 passed, 236 deselected. This checks the sim backend only, with no emulator or database service.
  • Held seed-1 CLI with --json repeated twice — exit 0, GATE_PASS, byte-for-byte identical output.
  • Unmetered seed-1 CLI with --json — exit 1, GATE_FAIL owner_backlog_depth under the default split queue; the test also pins FIFO p90 >2x baseline.
  • Repository preflight, PR metadata validation and all normal pre-push checks passed. Final-head hook: 36 preflight checks, zero type-check errors, flood file 8 passed in 18.76s (20s file wall time), pinned formatting passed.

The first integrated suite was stopped after 191.52s while the imported adapter was copying backlog rows. The bounded adapter change above removed that cost; no thresholds, workflow, or golden updates were made.

No production writes, deploys, flags, queue actions, live content, or credentials were used.

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-14T07:50:09.962013Z b66ca1f 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 changed the title test(batch): guard fresh latency against backlog floods SCA-2013: test(batch): guard fresh latency against backlog floods Nov 13, 2026
@Git-on-my-level
Git-on-my-level merged commit a3e2d6b into main Nov 14, 2026
65 checks passed
@Git-on-my-level
Git-on-my-level deleted the agent/m5-mbp-opencode-kimi-k3-1/43e7d6c7f4e7 branch November 14, 2026 08:08
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