nexu-io/open-design · error · SystemExit

job manifest not found: {path}

Error message

job manifest not found: {path}

What it means

Raised by load_jobs() in record_imagegen_result.py when run_dir/imagegen-jobs.json does not exist. The recorder needs the manifest to find the job by --job-id, validate dependencies and grounding, and write the completion back, so a missing manifest is fatal before --source is even examined.

Source

Thrown at skills/hatch-pet/scripts/record_imagegen_result.py:21

from __future__ import annotations

import argparse
import hashlib
import json
import os
import shutil
from datetime import datetime, timezone
from pathlib import Path

from PIL import Image

CANONICAL_BASE_PATH = "references/canonical-base.png"


def load_jobs(path: Path) -> dict[str, object]:
    if not path.exists():
        raise SystemExit(f"job manifest not found: {path}")
    return json.loads(path.read_text(encoding="utf-8"))


def job_list(manifest: dict[str, object]) -> list[dict[str, object]]:
    jobs = manifest.get("jobs")
    if not isinstance(jobs, list):
        raise SystemExit("invalid imagegen-jobs.json: jobs must be a list")
    return [job for job in jobs if isinstance(job, dict)]


def find_job(manifest: dict[str, object], job_id: str) -> dict[str, object]:
    for job in job_list(manifest):
        if job.get("id") == job_id:
            return job
    raise SystemExit(f"unknown job id: {job_id}")


def image_metadata(path: Path) -> dict[str, object]:

View on GitHub (pinned to 5be4028344)

Solutions

  1. Run prepare_pet_run.py first so run_dir/imagegen-jobs.json exists.
  2. Verify the path: ls run_dir/imagegen-jobs.json.
  3. Confirm --run-dir resolves to the intended prepared run directory.
  4. Restore the manifest from version control or re-run prepare with --force if the run is disposable.

Example fix

# before
record_imagegen_result.py --run-dir /tmp/fenrir --job-id idle --source ig_001.png
# after (prepare first)
prepare_pet_run.py --pet-name Fenrir --reference fenrir.png --output-dir /tmp/fenrir
record_imagegen_result.py --run-dir /tmp/fenrir --job-id idle --source ig_001.png
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path
manifest_path = run_dir / "imagegen-jobs.json"
if not manifest_path.exists():
    raise SystemExit(f"{manifest_path} missing; run prepare_pet_run.py first")

Prevention

When it happens

Trigger: Calling record_imagegen_result.py against a run_dir that was never prepared; --run-dir typo; the manifest was deleted or moved after generation.

Common situations: Trying to record an imagegen output before prepare_pet_run.py created the run; pointing at an old/renamed run_dir; clean checkout missing the generated artifacts.

Related errors


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