Scope#
WS07-008 adds deterministic per-shot cost and latency forecasting to sequence
continuity orchestration so production teams can plan schedule and spend before
execution.
Research and Existing Implementation Alignment#
- Aligned forecasting assumptions with existing pay-per-second cost handling in
generation-api (
ISIS_COST_RATE_*_USD_PER_SECONDand runtime cost backfill patterns). - Integrated directly into sequence orchestration because that is where shot ordering, shot metadata, and continuity planning are already resolved.
- Preserved deterministic outputs to keep planning reproducible for timeline and budget scheduling tools.
Deliverables#
- Extended sequence orchestration request contracts:
- Added
forecastingrequest config with provider/rate-card/performance knobs.
- Added per-shot forecast contracts:
ShotCostLatencyForecastwith confidence, duration source, complexity multiplier, processing/queue/latency (P50/P95), and estimated USD cost.SequenceCostLatencyForecastaggregate totals + assumptions.
- Added forecast output on orchestration results:
SequenceOrchestrationResult.forecastSequenceShotResult.forecast
- Implemented deterministic forecast engine:
- Duration resolution from shot/shared parameters and metadata.
- Complexity multipliers from resolution, sampling steps, controls, keyframe-sample count, and render-pass count.
- Processing and queue latency estimation with configurable heuristics.
- Cost estimation from provider USD/second rate cards.
- Added tests:
- Forecast generation with custom provider rate-card assumptions.
- Forecast disable behavior.
- Validation that forecast is present on standard sequence runs.
Verification Commands#
bash
pnpm --filter @isis/workflows exec vitest run src/consistency/sequence-orchestration.spec.ts src/workflows.spec.ts
node scripts/isis/validate-v2-compliance-gate.mjs