Skip to content

How do I batch-create review copies without accidentally overwriting approved renders?

Create and validate the complete input-to-output path map before starting a batch of review derivatives. Refuse existing outputs and keep approved masters outside the output directory. Record launch failures and nonzero exits for every planned item. A batch that skips a collision or leaves a partial file must not report that all review copies succeeded simply because the loop reached its end.

REVIEW AND HANDOFF: REPRODUCIBLE EVIDENCE PACKAGESAISwapLab team · Editorial methodPublished 3 min read
See the recorded exampleExplore 67 Image SkillsIndependent finishing · Check the actual file
Editorial worksheet excerpt: Preflight; Execution; Acceptance. See the complete table and sources below.
Editorial worksheet excerpt: Preflight; Execution; Acceptance. See the complete table and sources below.

Separate the evidence from the decision

This task is about local render orchestration, distinct from choosing a safe browser download filename. Filenames are human labels and can collide even when the source assets differ. Parallel jobs, reused prefixes and stale outputs create additional risks. The artifact is a preflight map plus a per-job outcome manifest. It is an external tool workflow, not a claim that AISwapLab supports unlimited local rendering or that generating another result is free.

Build the evidence

  1. 01

    Establish the input evidence

    List the explicitly approved input files and the transformation each derivative needs. Resolve output paths under a dedicated destination and check that no output equals an input or another job's destination. Use stable job IDs and retain full source identities in the manifest rather than relying only on truncated hashes or a shared name such as final. If the same input appears twice with different creative roles, record that deliberately instead of deduplicating it silently.

  2. 02

    Run a controlled diagnostic

    Run a preflight existence check and also enable the encoder's non-overwrite behavior. The latter guards against a file appearing after preflight; it does not replace a unique path plan or a single-owner output policy. Invoke tools with an argument list rather than building a shell string from filenames. Record the exact executable, arguments, working directory and exit status. Do not let a prompt for overwrite block an unattended batch indefinitely or let a shell expansion reinterpret a user-controlled filename.

  3. 03

    Verify the actual handoff

    After each successful process, inspect the output's presence, nonzero size, required streams and editorial endpoints. A nonempty file alone does not establish a completed valid render. Classify errors separately from canceled, not-started and passed jobs, and preserve partial files as failed artifacts rather than publishing them. Resume from the manifest with a deliberate new output or approved cleanup plan; do not automatically delete accepted content to make the second run look tidy.

A bounded example

Illustrative failure: two source folders both contain performance.mp4 and a batch sends both to performance-review.mp4. A naïve overwrite policy replaces the first approved derivative with the second. A unique preflight map rejects the conflict before encoding. A separate process can still fail halfway and leave bytes behind, so the outcome manifest needs more than existence checks. This is a documented orchestration pattern, not an executed production batch or paid generation test.

Local workflow example

Documentation Python runner only. No production batch or filesystem cleanup was executed; the example requires a larger manifest and acceptance layer.

python
import subprocess
from pathlib import Path
source, output = Path("approved.mp4"), Path("review/job-0001.mp4")
if source.resolve() == output.resolve() or output.exists():
    raise ValueError("Unsafe or existing output")
output.parent.mkdir(parents=True, exist_ok=True)
result = subprocess.run(["ffmpeg","-nostdin","-n","-i",str(source),
    "-map","0:V:0","-an","-c:v","libx264",str(output)], capture_output=True)
print({"exit_code": result.returncode, "output_exists":output.exists()})

Task evidence worksheet

StageEvidenceNot a pass
PreflightUnique approved path mapCollision silently skipped
ExecutionPer-job launch/exit recordLoop finished
AcceptanceComplete output checksPartial file merely exists

Acceptance evidence

  • Preflight every input/output mapping and reject collisions or input overwrites.
  • Keep -n and argument-list process invocation as additional safeguards.
  • Record every planned job and validate actual completed outputs before handoff.

Stop condition

Stop when output ownership is ambiguous, collisions remain or a tool requires interactive overwrite approval. Resolve the path map first. Do not silently skip failed jobs and call the package complete, and do not broaden a batch's source scan into unrelated folders merely to discover more files than the approved work list.

Sources

Review the result in context.

Compare the recorded example and its documented limitations.

See the recorded example