nexu-io/open-design · error · SystemExit

running-right decoded strip not found: {source}

Error message

running-right decoded strip not found: {source}

What it means

The manifest says running-right is complete, but the file <run_dir>/decoded/running-right.png does not exist on disk. The derive step needs the actual decoded PNG to mirror it, so a complete status with a missing file is treated as a corrupted/interrupted run.

Source

Thrown at skills/hatch-pet/scripts/derive_running_left_from_running_right.py:96

    if not args.decision_note.strip():
        raise SystemExit("--decision-note must explain why mirroring is appropriate")

    run_dir = Path(args.run_dir).expanduser().resolve()
    manifest_path = run_dir / "imagegen-jobs.json"
    manifest = load_manifest(run_dir)
    right_job = find_job(manifest, "running-right")
    left_job = find_job(manifest, "running-left")

    if right_job.get("status") != "complete":
        raise SystemExit("running-right must be complete before deriving running-left")
    mirror_policy = left_job.get("mirror_policy")
    if not isinstance(mirror_policy, dict) or mirror_policy.get("may_derive_from") != "running-right":
        raise SystemExit("running-left is not configured for conditional mirroring")

    source = run_dir / "decoded" / "running-right.png"
    output = run_dir / "decoded" / "running-left.png"
    if not source.is_file():
        raise SystemExit(f"running-right decoded strip not found: {source}")
    if output.exists() and not args.force:
        raise SystemExit(f"{output} already exists; pass --force to replace it")

    output.parent.mkdir(parents=True, exist_ok=True)
    with Image.open(source) as image:
        mirrored = ImageOps.mirror(image.convert("RGBA"))
        mirrored.save(output)

    left_job["status"] = "complete"
    left_job["source_path"] = manifest_relative(source, run_dir)
    left_job["source_provenance"] = "deterministic-mirror"
    left_job["derived_from"] = "running-right"
    left_job["source_sha256"] = file_sha256(source)
    left_job["output_sha256"] = file_sha256(output)
    left_job["completed_at"] = datetime.now(timezone.utc).isoformat()
    left_job["metadata"] = image_metadata(output)
    left_job["mirror_decision"] = {
        "approved": True,

View on GitHub (pinned to 5be4028344)

Solutions

  1. Verify the path: ls <run_dir>/decoded/running-right.png.
  2. If missing, re-run the decode/ingest step (record_imagegen_result.py) that writes decoded/running-right.png from the source ig_*.png.
  3. Confirm --run-dir resolves to the correct run directory.
  4. Re-run the derive script.
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path

run_dir = Path("<run_dir>")
source = run_dir / "decoded" / "running-right.png"
if not source.is_file():
    raise FileNotFoundError(f"decode/ingest did not produce {source}")

Prevention

When it happens

Trigger: Calling the derive script when <run_dir>/decoded/running-right.png is absent — deleted, never decoded, or --run-dir points at the wrong directory.

Common situations: Someone cleaned the decoded/ folder between ingest and derive; the decode step that writes decoded/*.png failed or was skipped; --run-dir points at a stale or copied run tree.

Related errors


AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12). Data as JSON: /api/errors/3a26e327d34ec71b. Report an issue: GitHub.