nexu-io/open-design · error · SystemExit
running-left mirrored output is missing: {output}
Error message
running-left mirrored output is missing: {output} What it means
Raised by validate_mirror_hash in finalize_pet_run.py after the running-left mirror job passed source/hash checks but the resolved output_path does not exist on disk. The deterministic-mirror provenance path requires a real decoded/running-left.png produced by derive_running_left_from_running_right.py, and finalize refuses to proceed without it.
Source
Thrown at skills/hatch-pet/scripts/finalize_pet_run.py:102
if job.get("derived_from") != "running-right":
raise SystemExit("running-left mirror job must derive from running-right")
decision = job.get("mirror_decision")
if not isinstance(decision, dict) or decision.get("approved") is not True:
raise SystemExit(
"running-left mirror job is missing an approved mirror_decision; "
"use derive_running_left_from_running_right.py after visual review"
)
expected_source_hash = job.get("source_sha256")
expected_output_hash = job.get("output_sha256")
if not isinstance(expected_source_hash, str) or not expected_source_hash:
raise SystemExit("running-left mirror job is missing source_sha256")
if not isinstance(expected_output_hash, str) or not expected_output_hash:
raise SystemExit("running-left mirror job is missing output_sha256")
if not source.is_file():
raise SystemExit(f"running-left mirror source image no longer exists: {source}")
if not output.is_file():
raise SystemExit(f"running-left mirrored output is missing: {output}")
if source.name != "running-right.png" or source.parent.name != "decoded":
raise SystemExit("running-left mirror source must be decoded/running-right.png")
if output.name != "running-left.png" or output.parent.name != "decoded":
raise SystemExit("running-left mirror output must be decoded/running-left.png")
if file_sha256(source) != expected_source_hash:
raise SystemExit("running-left mirror source hash does not match imagegen-jobs.json")
if file_sha256(output) != expected_output_hash:
raise SystemExit(
"running-left mirrored output hash does not match imagegen-jobs.json; "
"rerun derive_running_left_from_running_right.py"
)
with Image.open(source) as source_image, Image.open(output) as output_image:
expected = ImageOps.mirror(source_image.convert("RGBA"))
actual = output_image.convert("RGBA")
if expected.size != actual.size or expected.tobytes() != actual.tobytes():
raise SystemExit(
"running-left mirrored output is not an exact horizontal mirror of running-right"
)View on GitHub (pinned to 5be4028344)
Solutions
- Run skills/hatch-pet/scripts/derive_running_left_from_running_right.py --run-dir <run_dir> to regenerate decoded/running-left.png from running-right.png.
- Inspect imagegen-jobs.json for the running-left job's output_path and confirm it resolves to <run_dir>/decoded/running-left.png.
- Re-run pet_job_status.py to confirm the running-left job is marked complete, then re-invoke finalize_pet_run.py.
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
run_dir = Path('run')
output = (run_dir / job['output_path']).resolve()
if not output.is_file():
raise RuntimeError(f'running-left output missing; run derive_running_left_from_running_right.py first: {output}') Prevention
- Always run derive_running_left_from_running_right.py before finalize_pet_run.py so decoded/running-left.png exists.
- Treat imagegen-jobs.json's output_path as the source of truth; do not move decoded files manually.
- Before finalize, assert every job's output_path resolves to an existing file.
When it happens
Trigger: A job whose source_provenance == 'deterministic-mirror' and job_id == 'running-left', where the on-disk file at job['output_path'] (resolved under run_dir) is missing, deleted, or never written by the derive script.
Common situations: Running finalize_pet_run.py before derive_running_left_from_running_right.py; someone manually deleted decoded/running-left.png; the output_path in imagegen-jobs.json points at a stale or renamed location after a cleanup of the decoded directory.
Related errors
- invalid brand id: ${id}
- source not found: {path}
- running-left mirror source image no longer exists: {source}
- running-left mirror source must be decoded/running-right.png
- running-left mirror output must be decoded/running-left.png
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/40b4b65695fbd1ac.
Report an issue: GitHub.