Pipeline Calibration
Deterministic pre-flight benchmark evaluating storage, schema, compiler, models, and WebCodecs.
The Pipeline Calibration engine (services/calibration/pipelineCalibration.ts) in Serelius Flow Video provides end-to-end deterministic diagnostics before running generation batches. It validates browser runtime subsystems, prompt compilation, local database integrity, and Google Flow API constraints to eliminate runtime failures and protect workspace credits.
1. Interface Integration
Calibration is directly accessible from the main interface and through automated pre-flight checks:
- Header Calibration Button: Located in the top bar adjacent to SETTINGS. Clicking CALIBRATION opens the ENTERPRISE PIPELINE CALIBRATION modal, running an immediate diagnostic benchmark or allowing manual triggers via EXECUTE FULL CALIBRATION.
- Automated Pre-Flight Toggle: Configured under SETTINGS > AUTOMATION via PRE-FLIGHT CALIBRATION (
YES/NO). When enabled, clicking START executes the benchmark before launching automated batches, surfacing warnings or blocking errors with a direct VIEW CALIBRATION shortcut.
2. The 5 Deterministic Verification Pillars
The diagnostic engine evaluates five operational layers without consuming AI generation credits:
| Pillar | Subsystem | Verification Scope | Target Checks & Fallbacks |
|---|---|---|---|
| Storage | IndexedDB | SERELIFLOW_VIDEOS_DB | Verifies active database connection and transactional integrity across project_metadata, media_blobs, and app_meta stores. Emits a warning (WARN) if sandboxing forces a fallback to localStorage. |
| Schema | Script Structure | Scene Matrix & Characters | Validates canonical character registry, sequential scene indexing, and flags previously failed scenes (ERRO) requiring manual creator review. |
| Compiler | Prompt Engine | Real-Time Test Compilation | Compiles sample test scenes validating framing tags (CENTER, LEFT, RIGHT), aspect ratios (16:9, 9:16), visual styles, and acoustic consistency locks (ACOUSTIC & VOICE CONSISTENCY LOCK). |
| Models | Flow Catalog | Model Compatibility & Resolution | Validates active image models (Nano Banana Pro, Nano Banana 2.1, Nano Banana 2 Lite) and video models (Omni 1.1 Flash, Veo 3.1). Enforces 720p constraints for Veo 3.1 with auto-adjust warnings (WARN). |
| Video | Media Processing | WebCodecs & Hardware Acceleration | Initializes @mediabunny/ac3 and @mediabunny/mp3-encoder, confirming hardware acceleration readiness for burned subtitles, optical transitions, and audio remuxing. |
interface CalibrationResult {
status: "PASS" | "WARN" | "FAIL";
totalLatencyMs: number;
pillars: {
storage: { status: string; latencyMs: number; message?: string };
schema: { status: string; latencyMs: number; message?: string };
compiler: { status: string; latencyMs: number; message?: string };
models: { status: string; latencyMs: number; message?: string };
video: { status: string; latencyMs: number; message?: string };
};
}
3. Calibration Results and Severities
The calibration suite records individual subsystem latencies and returns an overall health status in tens of milliseconds:
| Status | Color Badge | Operational Meaning | Action Required |
|---|---|---|---|
| PASS | Green | All five subsystems are 100% operational. | Ready for automatic or manual generation. |
| WARN | Amber | Pipeline is functional with non-blocking constraints or fallbacks active. | Review notices (such as enforced 720p resolution or localStorage mode). |
| FAIL | Red | Critical blocker detected in schemas, models, or runtime environment. | Correct structural errors or missing models before spending credits. |
Ready to build and launch your SaaS?
Get 100% full source code ownership, no proprietary wrappers, with architecture ready for millions of requests on Cloudflare.