rereel validate
Static checks for a bundle. It does not need FFmpeg or network access, and without --check-media it does not need any media on disk, which makes it safe for CI and pre-commit hooks.
Synopsis
Section titled “Synopsis”rereel validate <reel_dir> [--check-media]What it does
Section titled “What it does”rereel.jsonmust exist (SPEC_MISSING) and parse (SPEC_INVALID). If either check fails, validation stops here.schemaVersionmust be1(SCHEMA_VERSION).video.width,video.height,video.fpsmust be positive numbers (VIDEO_SPEC_INVALID).- Lockfile (
lockFile, defaultrereel.lock.json) must exist (LOCK_MISSING) and parse (LOCK_INVALID). - Media references are collected:
- For
kindother thancomposite_merge:props.json(propsFile) must exist (PROPS_MISSING) and parse (PROPS_INVALID). All strings ending in a media extension (excludinghttp(s)://,data:, and anything underoutput/layoutReport/logkeys) are collected. - For
composite_merge:partsmust be non-empty (PARTS_MISSING).mediaparts contributemediaPath.chapterparts must have<reelDir>/rereel.jsonon disk (CHAPTER_MISSING).
- For
- Mix plan (only when
audioModeismix_plan): a missing file is a warning (MIX_PLAN_MISSING, sincebuildcan derive one from props). An unparseable file isMIX_PLAN_INVALID. Media references are collected, and eachnarration[i]is checked: negativestart_secorsrc_start_sec→NEGATIVE_TIME, andduration_sec <= 0→INVALID_DURATION. - Each reference: starting with
/→ABSOLUTE_PATH. Neither a lock key nor present at<reel_dir>/<ref>→UNLOCKED_ASSET. - Each lock item:
source: "storage"withouturi→MISSING_URI.vfr: true→ warningVFR_MEDIA. With--check-media, storage items must exist on disk (MEDIA_NOT_HYDRATED) and match their SHA-256 (MEDIA_SHA_MISMATCH).
valid is true when there are zero errors. Warnings do not affect validity.
Options
Section titled “Options”| Flag | Type | Default | Description |
|---|---|---|---|
<reel_dir> |
path (positional) | — (required) | Bundle directory. |
--check-media |
flag | off | Also verify that every storage item is hydrated and its SHA-256 matches. |
--storage-config |
path | — | Accepted (global) but unused by validation itself. |
Issue codes
Section titled “Issue codes”| Code | Level | Path example |
|---|---|---|
SPEC_MISSING |
error | rereel.json |
SPEC_INVALID |
error | rereel.json |
SCHEMA_VERSION |
error | rereel.json.schemaVersion |
VIDEO_SPEC_INVALID |
error | rereel.json.video |
LOCK_MISSING / LOCK_INVALID |
error | rereel.lock.json |
PROPS_MISSING / PROPS_INVALID |
error | props.json |
PARTS_MISSING |
error | rereel.json.parts |
CHAPTER_MISSING |
error | rereel.json.parts[0].reelDir |
MIX_PLAN_MISSING |
warning | mix_plan.json |
MIX_PLAN_INVALID |
error | mix_plan.json |
NEGATIVE_TIME / INVALID_DURATION |
error | mix_plan.json.narration[2] |
ABSOLUTE_PATH |
error | props.json.scenes[0].image_path |
UNLOCKED_ASSET |
error | props.json.scenes[1].image_path |
MISSING_URI |
error | rereel.lock.json.items["media/bg_1a2b3c4d.png"] |
VFR_MEDIA |
warning | rereel.lock.json.items["media/clip_9f8e7d6c.mp4"] |
MEDIA_NOT_HYDRATED / MEDIA_SHA_MISMATCH |
error | media/bg_1a2b3c4d.png |
Output
Section titled “Output”{ "valid": false, "reelDir": "/abs/path/reels/ep01", "errors": [ { "level": "error", "code": "UNLOCKED_ASSET", "path": "props.json.scenes[1].image_path", "message": "Asset \"raw/new_shot.png\" is not in rereel.lock.json and not present on disk" } ], "warnings": []}Note that there is no status key on success. Validation problems are reported in the body, not as an error object.
Exit codes
Section titled “Exit codes”| Code | When |
|---|---|
0 |
valid: true (warnings allowed). |
1 |
valid: false. The full report is still printed. |
2 |
Missing <reel_dir> argument, or an unparseable storage config (loaded globally before the command runs). |
Examples
Section titled “Examples”rereel validate ./reels/ep01Gate a commit on full media integrity:
rereel validate ./reels/ep01 --check-media | jq -e '.valid'