Add typed Python interop contracts
Objective
Create shared TypeScript interfaces for JSON emitted by Python pipeline steps.
Why this matters
JS/Python boundaries currently rely on implicit shape assumptions.
Typed contracts reduce silent integration failures.
Parallelization metadata
Track
scripts
Depends on
Safe to run in parallel with
- pipeline node issues
- remotion utility issues
Merge risk
Files in scope
Primary:
scripts/types/python-interop.ts
Required implementation
1. Add interfaces for key Python outputs
At minimum include:
DiarizationSegment
AlignmentResult
TranscriberToken
2. Use real current output shapes
Mirror current emitted JSON.
3. Keep additive
No broad script migration yet.
Constraints
- no runtime validation yet
Handoff contract
Future script migrations should import these instead of inventing local types.
Acceptance criteria
Functional
Integration checks
Verification commands
tsc --noEmit
Expected result:
Explicitly out of scope
- schema validation
- Python code changes
Suggested branch
refactor/s6-python-interop
Suggested commit slug
phase-3-step-4-python-interop-types
Add typed Python interop contracts
Objective
Create shared TypeScript interfaces for JSON emitted by Python pipeline steps.
Why this matters
JS/Python boundaries currently rely on implicit shape assumptions.
Typed contracts reduce silent integration failures.
Parallelization metadata
Track
scriptsDepends on
Safe to run in parallel with
Merge risk
Files in scope
Primary:
scripts/types/python-interop.tsRequired implementation
1. Add interfaces for key Python outputs
At minimum include:
DiarizationSegmentAlignmentResultTranscriberToken2. Use real current output shapes
Mirror current emitted JSON.
3. Keep additive
No broad script migration yet.
Constraints
Handoff contract
Future script migrations should import these instead of inventing local types.
Acceptance criteria
Functional
Integration checks
Verification commands
tsc --noEmitExpected result:
Explicitly out of scope
Suggested branch
refactor/s6-python-interopSuggested commit slug
phase-3-step-4-python-interop-types