What Validators Run During the Post-Render Self-Review Runtime in OpenMontage?

OpenMontage executes four production-grade validators during the post-render self-review runtime—an ffprobe technical probe, frame-extraction sanity check, audio spot-check, and promise-preservation verification—to guarantee every rendered video meets strict technical, quality, and provenance standards before delivery.

The post-render self-review runtime in OpenMontage serves as the final quality gate in the video composition pipeline. Implemented primarily in tools/video/video_compose.py, this mandatory validation stage ensures that artifacts generated by the rendering engine are technically sound, visually consistent, and cryptographically verifiable. According to the OpenMontage source code, the run_post_render_self_review function orchestrates a compact but comprehensive validation suite that prevents malformed or tampered videos from reaching downstream consumers.

The Four Validators Executed During Post-Render Self-Review

The run_post_render_self_review routine, located around line 1064 in tools/video/video_compose.py, sequentially invokes four distinct validation checks. Each validator targets a specific failure mode in video production, from container corruption to runtime forgery.

Technical Probe via ffprobe

The technical probe validator executes ffprobe to parse container metadata and verify stream integrity. According to the source code in tools/video/video_compose.py (lines 2311–2325), this check confirms the presence of video and audio streams, validates duration against expected values, inspects frame-rate and codec parameters, and flags any missing or malformed elementary streams. If ffprobe returns non-zero exit codes or detects unreadable packets, the validator logs a critical failure and halts the review process.

Frame-Extraction Sanity Check

Following metadata validation, the frame-extraction sanity check samples actual pixel data to detect decoding errors or visual corruption. As implemented in tools/video/video_compose.py (lines 2608–2630), this validator extracts a representative handful of frames using ffmpeg-based sampling and inspects them for expected dimensions, color fidelity, and black-frame detection. The check ensures that the video is not only structurally valid but also visually decodable and free from silent encoding failures that metadata inspection alone cannot catch.

Audio Spot-Check Validation

The audio spot-check validates that the rendered asset contains a functional audio stream with proper characteristics. Located at lines 2656–2670 in tools/video/video_compose.py, this validator uses ffprobe to confirm audio stream existence, validate channel count, and measure duration parity with the video track. It optionally performs a brief loudness inspection to detect blank or near-silent audio tracks that would indicate rendering pipeline failures.

Promise-Preservation Verification

Finally, the promise-preservation check ensures cryptographic provenance by verifying that the runtime recorded in the artifact matches the actual execution environment. According to lines 2293–2302 in tools/video/video_compose.py, this validator compares the final_review.checks.promise_preservation.render_runtime_used value against the current rendering runtime signature, preventing mismatched or forged outputs from passing quality gates. This check guarantees that the video was generated by the intended software version and configuration.

Runtime Integration and Report Generation

The validators integrate with OpenMontage's artifact system through the final_review schema defined in schemas/artifacts/render_report.schema.json. When run_post_render_self_review completes, it produces a structured report documenting each validator’s outcome, including specific failure codes and diagnostic metadata. Pipeline definitions such as pipeline_defs/animation.yaml consume this artifact, requiring self_review_completed: true and checks.passed: true before allowing downstream distribution or archival operations.

Implementing Custom Validations

Developers extending OpenMontage can invoke the self-review routine programmatically to validate custom render workflows. The function accepts a video path and returns a validation object suitable for schema-compliant reporting.

from tools.video.video_compose import run_post_render_self_review

# Validate a rendered video file

review = run_post_render_self_review(output_path="/renders/final_v2.mp4")

if review.checks.passed:
    print("All post-render validators passed")
else:
    for issue in review.checks.issues:
        print(f"Validation failure: {issue}")

To inspect the generated report structure:

import json

with open("render_report.json") as f:
    report = json.load(f)

final_review = report["artifacts"]["final_review"]
print(json.dumps(final_review, indent=2))

Summary

  • OpenMontage implements four mandatory validators during the post-render self-review runtime: ffprobe technical probe, frame-extraction sanity check, audio spot-check, and promise-preservation verification.
  • The validation logic resides in tools/video/video_compose.py, specifically within the run_post_render_self_review function (around line 1064).
  • Each validator targets distinct failure modes: container corruption (ffprobe metadata), visual decoding errors (frame sampling), audio integrity (stream analysis), and runtime provenance (cryptographic verification).
  • Results are stored in the final_review artifact defined by schemas/artifacts/render_report.schema.json, which downstream pipelines require for release authorization.

Frequently Asked Questions

What triggers the post-render self-review runtime in OpenMontage?

The post-render self-review runtime triggers automatically upon completion of the video composition phase, or manually via the run_post_render_self_review function in tools/video/video_compose.py. Pipeline definitions in pipeline_defs/animation.yaml enforce this check by gating downstream steps on the self_review_completed status flag.

How does the frame-extraction validator detect corrupt videos?

The validator extracts sample frames using ffmpeg-based operations and analyzes pixel data for dimensional accuracy, color validity, and black-frame artifacts. As implemented in lines 2608–2630 of tools/video/video_compose.py, it catches decoding failures that structural metadata inspection misses.

Can I disable specific validators in the self-review process?

The OpenMontage source code implements these validators as mandatory quality gates within run_post_render_self_review. While you can fork tools/video/video_compose.py to modify validation logic, the default schema in schemas/artifacts/render_report.schema.json expects all four check results for compliance with pipeline requirements such as those in pipeline_defs/animation.yaml.

What happens if the promise-preservation check fails?

A failed promise-preservation check (lines 2293–2302 in tools/video/video_compose.py) indicates a mismatch between the recorded runtime signature and the actual execution environment. The validator marks the final_review artifact with a provenance failure, causing pipeline stages to reject the render and preventing potential tampering or version-skewed outputs from entering production.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →