Repository navigation
feat(batch): GPU floor 4 and vendor-routing capacity runbook (slice E) - #24243
Conversation
Raise the prod batch worker floor from 3 to 4 on-demand L4s, so GPUs stay standing through Modulate outages and L4 stockouts (a stockout only fails scale-up). replicaCount and autoscaling.minReplicas stay one setting, and a chart test pins them equal. Rollback: 3. Add the capacity runbook for all-vendor batch routing: floor sizing and cost, provider-stt queue sizing from measured vendor latency (estimates until the staging ladder measures it), the staging rate-limit ladder, failover drills, the guard interlocks F1-F4 behind lead ruling d914f8, rollout order and outage/stockout plays. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
3 issues found across 4 files
Confidence score: 3/5
- The 25/50-concurrent ladder in
batch-vendor-routing-capacity.mdexceeds staging’s checked-in cap of 16, so the drill can’t run as written. Raisestaging-provider-sttto at least 50 for the ladder, then restore its tested configuration. - The runbook cites implementation symbols including
RouteConfigandomi_batch_pipeline_vendor_breaker_state; verify those references exist in this checkout so operators aren’t sent looking for unavailable controls. - The ladder depends on a vendor-attempt metric this checkout doesn’t emit, so it can’t measure attempts as written. Add the instrumentation or reference an existing billing/attempt metric before scheduling the drill.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="backend/docs/runbooks/batch-vendor-routing-capacity.md">
<violation number="1" location="backend/docs/runbooks/batch-vendor-routing-capacity.md:4">
P2: This runbook cites `utils/batch_pipeline/vendor_route_contracts.py`, `gpu_floor_percent`, `RouteConfig`, `BATCH_VENDOR_HEALTH_THRESHOLDS`, `is_vendor_policy_hold`, and `omi_batch_pipeline_vendor_breaker_state` as existing config and code. None of these exist at HEAD or pr-base. Mark them as pending slice B/C/D work, or link the PRs that add them, so operators do not look for missing names during an outage.</violation>
<violation number="2" location="backend/docs/runbooks/batch-vendor-routing-capacity.md:114">
P2: The 25/50-concurrent ladder exceeds staging’s checked-in concurrency cap of 16. Raise `staging-provider-stt` to at least 50 before the ladder, then restore its tested configuration afterward.</violation>
<violation number="3" location="backend/docs/runbooks/batch-vendor-routing-capacity.md:118">
P2: The ladder requires a vendor-attempt metric that this checkout never emits. Add the instrumentation before scheduling the drill, or reference an existing billing/attempt metric.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| # Batch vendor routing: GPU floor, provider capacity and drills | ||
|
|
||
| Capacity side of all-vendor batch routing (slice E). Selection, health and the | ||
| provider stage are in `utils/batch_pipeline/vendor_route_contracts.py` and its |
There was a problem hiding this comment.
P2: This runbook cites utils/batch_pipeline/vendor_route_contracts.py, gpu_floor_percent, RouteConfig, BATCH_VENDOR_HEALTH_THRESHOLDS, is_vendor_policy_hold, and omi_batch_pipeline_vendor_breaker_state as existing config and code. None of these exist at HEAD or pr-base. Mark them as pending slice B/C/D work, or link the PRs that add them, so operators do not look for missing names during an outage.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/docs/runbooks/batch-vendor-routing-capacity.md, line 4:
<comment>This runbook cites `utils/batch_pipeline/vendor_route_contracts.py`, `gpu_floor_percent`, `RouteConfig`, `BATCH_VENDOR_HEALTH_THRESHOLDS`, `is_vendor_policy_hold`, and `omi_batch_pipeline_vendor_breaker_state` as existing config and code. None of these exist at HEAD or pr-base. Mark them as pending slice B/C/D work, or link the PRs that add them, so operators do not look for missing names during an outage.</comment>
<file context>
@@ -0,0 +1,205 @@
+# Batch vendor routing: GPU floor, provider capacity and drills
+
+Capacity side of all-vendor batch routing (slice E). Selection, health and the
+provider stage are in `utils/batch_pipeline/vendor_route_contracts.py` and its
+slices. This page covers what keeps routing alive when a vendor or the L4 pool
+fails: the standing GPU floor, the `provider-stt` queue, the staging rate-limit
</file context>
| Soniox (failover-only, $0.10/h list, so keep its rungs short). | ||
| 3. Record per rung: 429 count and share, 5xx share, timeout share, L p50/p95, | ||
| integration CPU s/unit, and vendor audio-seconds billed (from | ||
| `omi_batch_pipeline_vendor_attempt_audio_seconds_total`). |
There was a problem hiding this comment.
P2: The ladder requires a vendor-attempt metric that this checkout never emits. Add the instrumentation before scheduling the drill, or reference an existing billing/attempt metric.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/docs/runbooks/batch-vendor-routing-capacity.md, line 118:
<comment>The ladder requires a vendor-attempt metric that this checkout never emits. Add the instrumentation before scheduling the drill, or reference an existing billing/attempt metric.</comment>
<file context>
@@ -0,0 +1,205 @@
+ Soniox (failover-only, $0.10/h list, so keep its rungs short).
+3. Record per rung: 429 count and share, 5xx share, timeout share, L p50/p95,
+ integration CPU s/unit, and vendor audio-seconds billed (from
+ `omi_batch_pipeline_vendor_attempt_audio_seconds_total`).
+4. Stop at the first rung with 429 ≥ 1% or 5xx ≥ 5% sustained 5 min, or when
+ L p95 doubles from rung 1. The last clean rung is the measured ceiling.
</file context>
Apply the 15% GPU floor share at every step of the queue table, size the staging ladder's audio budget and temporary queue raise, state that the provider-stt entries and staging mirror arrive with #24222, mark the sim drill cases as slice D prerequisites, and update the two worker docs that still named the floor of three. Record the F1/F2 fixes as built: a durable job-document route proof in the observer, and a provider-stage VAD measurement. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… r2) Vendor routing above 0% now also requires F3 adopted, since vendor_held units can otherwise age past the 2h rollback backstop. Each staging ladder rung sets its dispatch rate to at least C / L from rung 1's measured latency, so the 25 and 50 rungs are reachable. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Slice E of all-vendor batch routing: the standing GPU floor and the capacity plan around it.
Floor 3 → 4 on-demand L4. David (11-01) wants GPUs kept even when a vendor is cheaper, because Modulate has outages. L4 stockouts fail scale-up but never take running on-demand nodes, so the floor must already be standing before an outage.
replicaCountandautoscaling.minReplicasmove together, and a chart test pins them equal. Takes effect at the lead's next worker Helm roll: about $20.5/day list above floor 3. On 11-01 the pool had 5 Ready nodes during the a/b/c stockout, so 4 fits without scale-up. Rollback: 3. The floor share (gpu_floor_percent) is slice B's route-table value; slice E has no flags.Runbook
backend/docs/runbooks/batch-vendor-routing-capacity.md:provider-sttqueue sizing (dispatch ≥ 2 × peak, concurrency ≈ 2 × peak × L), with a step table. L is unmeasured, so every row is an estimate. The sync handler holds onesyncthread (16/instance) per vendor call;d914f8;The
provider-sttqueue resize itself is not in this PR. The queue is created by #24222 at 48/10, which covers the 1% step if L ≤ about 5s. The resize waits for #24222 and the staging L measurement, and lands as a lead-owneddeploy/ops/prod.yamlchange.Verification:
backend/test.shwithBACKEND_UNIT_TEST_FILE_LIST=test_batch_pipeline_chart.pyandtest_monitoring_adapter_hpa_contract.py, throughomi-heavy: 80 passed (Helm present). Layer: offline Helm render and unit tests only. No deploy, no flag, no queue, no prod reads.Deploy needed (lead): a worker Helm roll to carry floor 4, after confirming at least 4 Ready on-demand nodes and that the
batch-pipeline-poolminimum is ≥ 4.🤖 Generated with Claude Code