Skip to content

feat(batch): C8 provider-STT stage core (lane 8 slice 1, behaviour-neutral) - #22433

Merged
Git-on-my-level merged 3 commits into
integration/legacy-retirefrom
lr/08-admission
Oct 19, 2026
Merged

Git-on-my-level merged 3 commits into
integration/legacy-retirefrom
lr/08-admission

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Lane 8 (admission completeness), slice 1 of C8: the batch provider-STT stage core. Behaviour-neutral: nothing schedules or serves a provider unit yet.

What

  • utils/batch_pipeline/provider_stt.py (new):
    • resolve_route(): admission-time stt_route / provider_reason / provider_service (contract (c) fields). Unknown language is multi, so it routes to Parakeet as legacy does. BYOK never changes the STT route, because sync pre-recorded STT has never used a BYOK key (only Modulate and Parakeet serve it).
    • enqueue_in_transaction(): writes a provider_pending unit with merge_pending=True, outside the GPU DRR ring, so no GPU pull can lease it. OrderedMerge still holds the owner's later captures behind it. It keeps the owner revision fence and the late-capture watermark. It is written for an enqueue= hook in admit(), which has been requested from E1.
    • ProviderSttStore / ProviderSttStage:
      • The CAS pending → running mints the paid-once intent token.
      • One Modulate call is made with client retries off (attempts=2), as in quarantine recovery, and the result is written to a deterministic per-token object.
      • The unit then settles through the same result_ready transition that Scheduler.complete performs.
      • A redelivery reconciles the existing result and never spends again.
      • A vendor failure or an abandoned intent settles as failed_held, never held, so quarantine recovery cannot pay a second time.
  • utils/batch_pipeline/intake.py: the language-fallback decision now goes through resolve_route. At legacy_sync='on' it is the same condition, pinned by a parametrized equivalence test.
  • Expected C8 traces live in tests/unit/fixtures/pipeline_sim_goldens_pending/. They have a strict-xfail sim comparison until the sim configs exist. test_pipeline_characterization requires every file in pipeline_sim_goldens/ to have a config, which is why they sit in a separate directory for now.

Verification (local, m5, targeted, serial)

  • pytest tests/unit/test_batch_provider_stt.py tests/unit/test_batch_pipeline_intake.py tests/unit/test_sync_live_stub_intake.py tests/unit/test_pipeline_characterization.py: all pass, plus 3 strict xfails.
  • The tests run the real admit() transaction, the real Scheduler, OrderedMerge and RecoveryStore fences, and the privacy fence, on testing.pipeline_sim.store.SimStore.
  • scripts/typecheck.sh reports 0 errors.
  • Layer measured: unit only. No GCP, vendor or deploy.

Not in this slice (next)

  • The queue consumer and /v2/batch-pipeline/provider-stt/run. These wait for the lane-1 stubs.
  • Intake wiring for the provider route in draining/dark, the double-processing fence, and the live_upload owner choice.
  • merge.py stamping recovery_version for provider units.
  • The cap-hold adapter, which waits for fix: make cap-held recovery durable across restarts #22388.

Design note and contract issues: in the swarm run dir (lane 8).

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

Git-on-my-level and others added 3 commits October 19, 2026 13:28
…utral)

Adds the batch provider-STT stage for languages Parakeet cannot serve, so
batch never needs the legacy fallback for them:

- resolve_route(): admission-time stt_route/provider_reason/provider_service
  (contract (c) fields). Unknown language is 'multi' -> Parakeet, as legacy.
  BYOK never changes the STT route (sync prerecorded never used BYOK keys).
- enqueue_in_transaction(): writes a provider unit as provider_pending with
  merge_pending set, outside the GPU DRR ring, keeping the owner revision
  fence and late-capture watermark. Intended for an admit() enqueue hook.
- ProviderSttStore/ProviderSttStage: paid-once job-row intent
  (pending -> running CAS mints the token), one Modulate call with client
  retries disabled, deterministic per-token result object, settle to the
  same result_ready transition Scheduler.complete performs. Redelivery
  reconciles, never re-spends; vendor failure and abandoned intents settle
  failed_held (never 'held', so quarantine recovery cannot pay twice).

Nothing imports the new module yet: intake wiring, the queue consumer and
the router follow once the lane-1 stubs and the admit() hook land.
Expected C8 traces are pinned under pipeline_sim_goldens_pending/ with a
strict xfail until the sim configs exist.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…stt.resolve_route

Behaviour-neutral at legacy_sync 'on': unknown and 'multi' languages keep
today's legacy fallback explicitly, and a parametrized test pins the old and
new conditions equal for every language class with and without BYOK. This is
the seam the C8 provider route replaces in draining/dark.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

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-10-19T07:32:37.447019Z af3687d 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.

@Git-on-my-level
Git-on-my-level merged commit f39d0a1 into integration/legacy-retire Oct 19, 2026
25 checks passed
@Git-on-my-level
Git-on-my-level deleted the lr/08-admission branch October 19, 2026 08:13
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