Skip to content

lane 8: STT route in the admission policy; BYOK funded once; C8 sim goldens - #22536

Merged
Git-on-my-level merged 4 commits into
integration/legacy-retirefrom
lr/08-byok-policy
Oct 19, 2026
Merged

Git-on-my-level merged 4 commits into
integration/legacy-retirefrom
lr/08-byok-policy

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

  • feat(batch): record the STT route in the admission policy; BYOK funded once; C8 sim goldens
    • BatchUnitPolicy gains contract (c)'s lane-8 fields stt_route / provider_reason / provider_service (defaults parakeet/none/none; closed validation; a malformed stored route reads as the default = no BYOK funding claim, fail closed).
    • intake.accept_upload stamps the route it actually takes (dataclasses.replace, so policy_id covers it). Provider units record the provider route; Parakeet units keep only the BYOK funding decision.
    • admission.admitted_as_byok reads job['policy']. E1 (E1: batch pipeline policy snapshot #22448) never writes policy into projection_binding, so today's check could never see byok and BYOK GPU units were re-held every lease when cap dispatch enforcement is on.
    • pipeline_sim runs the real C8 route, admission enqueue hook and ProviderSttStage (SimConfig.language/byok/legacy_sync). GOLDEN_CONFIGS provider_stt_{ja,unsupported,byok} replace the hand-authored pending traces and the strict xfail.

Branch lr/08-byok-policy into integration/legacy-retire.

Lane / contract

Lane 08, contract (c) (lane-8 policy fields), (f) n/a. Owner sign-offs for edits to other lanes' files:

  • lane 6: utils/batch_pipeline/admission.py + tests/unit/test_batch_pipeline_admission.py (bus 10-19 14:08Z).
  • config/policy/batch.py (Sol/E1, S4): additive contract (c) fields Sol was asked to add in E1: batch pipeline policy snapshot #22448 (lane 6 plan, lead relay); posted to lead as PROCEED-unless-objection 13:56Z, no objection.
  • role_policy.json (E1 golden): changes only by the three new fields and policy_id.

Product invariants affected

  • INV-DATA-1: path match only, inherited from integration/main merges; this PR's own diff does not touch its locked paths.
    This change does not alter the Firebase/Firestore project or serving endpoints.

Lead + Sol conditions (15:52Z)

  1. policy_id stability: the route fields enter the hash only when non-default, so a pre-lane 8: STT route in the admission policy; BYOK funded once; C8 sim goldens #22536 row recomputes its stored id. test_a_pre_field_row_keeps_its_stored_policy_id_and_decisions pins a verbatim 4f43b2d-stamped row and its literal id; default-route policies hash exactly like the old shape (parametrized). role_policy.json now changes only by the three default-valued keys (no policy_id change).
  2. Old snapshot resolves the same: the same test compares every pre-existing field of from_dict(old_row) to the frozen old reader's result.
  3. Rollback safety: tests/unit/fixtures/pre_lane8_batch_unit_policy.py freezes the 4f43b2d PolicyPart + BatchUnitPolicy (identical on integration a5cee32). It reads rows lane 8: STT route in the admission policy; BYOK funded once; C8 sim goldens #22536 writes, ignores the new keys, keeps the admission decisions and recomputes the same id for default-route rows.
  4. Guard: the three fields have no env source. Intake stamps them from resolve_route(language, byok) (stored language plus the request's BYOK header). So nothing is added to the guard's owned-key set.

Verification

Unit layer, m5, serial through omi-heavy, at bb3541b on integration a5cee32:
test_batch_provider_stt 78 (incl. route-field validation, intake stamp x6, lane 6's e2e: real intake -> real admit -> pull -> authorize with enforcement on and sync_allowed=False: BYOK allowed and gate not called; non-BYOK control held 60s; the e2e fails against the old binding read), test_batch_pipeline_admission 17, test_pipeline_characterization 20, test_batch_unit_policy 59 (incl. env/resolution guard), test_batch_stage_policy 18, pipeline_sim/scenarios/revision + batch_pipeline_intake + cap_hold_batch_admission + record_admission_review_fixes + legacy_dark 136 (legacy_dark's counter test is order-polluted only in a combined multi-file run; 43/43 alone).
Not run locally: full suite (CI / m1).

Behaviour

  • At legacy_sync on nothing routes differently; the only behaviour change is that BYOK GPU units are no longer re-held by the keyless dispatch re-check (David 10-19: BYOK routes like everyone). Non-BYOK units keep today's re-check.
  • No draining anywhere; the ladder-budget debit precondition (lane 6) is unchanged.

Rollback

Revert the commit. Stored rows with the new fields stay readable by the pre-PR code (from_dict ignores unknown fields).

Failure-Class: none
Line-Count-Exception: backend/routers/sync.py | 3820 -> 3857 | lane 08: not touched by this PR; growth comes from integration vs main base

🤖 Generated with Claude Code

Git-on-my-level and others added 2 commits October 19, 2026 22:01
…d once; C8 sim goldens

- BatchUnitPolicy gains contract (c)'s lane-8 fields stt_route / provider_reason /
  provider_service (defaults parakeet/none/none, closed validation; a malformed
  stored route reads as the default, i.e. no BYOK funding claim).
- intake.accept_upload stamps the route it actually takes (provider units: the
  provider route; Parakeet units keep only the BYOK funding decision).
- admission.admitted_as_byok reads job['policy'] (E1 never writes policy into
  projection_binding), so a BYOK GPU unit is no longer re-held by the keyless
  dispatch re-check. Lane 6 signed off (bus 10-19 14:08Z).
- pipeline_sim runs the real C8 route, admission enqueue hook and
  ProviderSttStage (SimConfig language/byok/legacy_sync); GOLDEN_CONFIGS
  provider_stt_{ja,unsupported,byok} replace the hand-authored pending traces
  and the strict xfail. role_policy golden changes only by the three new
  fields and policy_id.
- Lane 6's end-to-end test: real intake -> real admit -> pull -> authorize.

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-10-19T15:40:46.678782Z b3fb3ed 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.

Git-on-my-level and others added 2 commits October 19, 2026 23:45
… the STT route fields

The route fields enter BatchUnitPolicy's identity only when non-default, so a
row stamped before #22536 recomputes its stored policy_id and default-route
policies hash exactly like the 4f43b2d shape. A frozen 4f43b2d reader fixture
proves a revert ignores the new keys and keeps admission decisions.
(Lead + Sol conditions on #22536.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit 3f2a251 into integration/legacy-retire Oct 19, 2026
23 checks passed
@Git-on-my-level
Git-on-my-level deleted the lr/08-byok-policy branch October 19, 2026 17:41
Git-on-my-level added a commit that referenced this pull request Oct 20, 2026
…2842

Main #22842 (fresh uploads within 2 min) added fresh_capture to final jobs and
moves admission priority 0 -> 1, and regenerated main's goldens. Integration's
provider_stt_{byok,ja,unsupported} goldens (lane 8, #22536) predate it. The diff
is only those two fields (21 priority 0->1, 7 fresh_capture), the same pattern
as main's own regeneration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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