Skip to content

feat(batch): GPU floor 4 and vendor-routing capacity runbook (slice E) - #24243

Merged
Git-on-my-level merged 3 commits into
mainfrom
lane/vroute-e
Nov 1, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
lane/vroute-e

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

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. replicaCount and autoscaling.minReplicas move 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:

  • floor sizing and cost;
  • provider-stt queue 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 one sync thread (16/instance) per vendor call;
  • the staging rate-limit ladder (5 → 10 → 25 → 50 concurrent, stop rules, receipt);
  • staging/sim and 1% prod failover drills;
  • guard interlocks F1–F4 behind lead ruling d914f8;
  • rollout order, and the outage and stockout plays.

The provider-stt queue 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-owned deploy/ops/prod.yaml change.

Verification: backend/test.sh with BACKEND_UNIT_TEST_FILE_LIST = test_batch_pipeline_chart.py and test_monitoring_adapter_hpa_contract.py, through omi-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-pool minimum is ≥ 4.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

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]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-01T13:09:55.766454Z
We couldn’t complete this review. Comment @codex review to try again.
8a51ded PR opened
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 4 files

Confidence score: 3/5

  • The 25/50-concurrent ladder in batch-vendor-routing-capacity.md exceeds staging’s checked-in cap of 16, so the drill can’t run as written. Raise staging-provider-stt to at least 50 for the ladder, then restore its tested configuration.
  • The runbook cites implementation symbols including RouteConfig and omi_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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Git-on-my-level and others added 2 commits November 1, 2026 20:17
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]>
@Git-on-my-level
Git-on-my-level merged commit 25456c3 into main Nov 1, 2026
59 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/vroute-e branch November 1, 2026 13:42
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