nexu-io/open-design · error · SystemExit
job {job.get('id')} has an invalid input image entry
Error message
job {job.get('id')} has an invalid input image entry What it means
Raised by validate_required_grounding() in record_imagegen_result.py when an entry inside a grounded job's input_images is not a dict, or its 'path' field is not a string. Each grounding entry must be an object with a string path so the recorder can resolve run_dir/<path> and confirm the file exists.
Source
Thrown at skills/hatch-pet/scripts/record_imagegen_result.py:118
"source image does not look like a built-in $imagegen output; expected "
f"{generated_root}/.../ig_*.png. Do not ingest locally drawn or "
"post-processed row strips as visual job outputs."
)
return "built-in-imagegen"
def validate_required_grounding(job: dict[str, object], run_dir: Path) -> None:
if job.get("allow_prompt_only_generation") is not False:
return
inputs = job.get("input_images")
if not isinstance(inputs, list) or not inputs:
raise SystemExit(
f"job {job.get('id')} does not list input_images; grounded row jobs must attach references"
)
missing = []
for item in inputs:
if not isinstance(item, dict) or not isinstance(item.get("path"), str):
raise SystemExit(f"job {job.get('id')} has an invalid input image entry")
path = run_dir / item["path"]
if not path.is_file():
missing.append(str(path))
if missing:
raise SystemExit(
f"job {job.get('id')} is missing required grounding image(s): "
+ ", ".join(missing)
)
def update_base_canonical_reference(
*,
run_dir: Path,
output: Path,
manifest: dict[str, object],
job: dict[str, object],
metadata: dict[str, object],
) -> None:View on GitHub (pinned to 5be4028344)
Solutions
- Wrap each entry as an object: {"path": "references/canonical-base.png"}.
- Validate: jq '.jobs[] | select(.allow_prompt_only_generation==false) | .input_images[] | .path | type' imagegen-jobs.json.
- Re-run prepare_pet_run.py --force to regenerate well-formed input_images.
- Remove malformed entries that are not real grounding references.
Example fix
// before: "input_images": ["references/canonical-base.png"]
// after: "input_images": [{"path":"references/canonical-base.png"}] Defensive patterns
Strategy: type-guard
Validate before calling
for item in inputs:
if not isinstance(item, dict) or not isinstance(item.get("path"), str):
raise SystemExit(f"job {job.get('id')} has a malformed input_images entry: {item!r}") Type guard
def is_valid_input_entry(item: object) -> bool:
return isinstance(item, dict) and isinstance(item.get("path"), str) Prevention
- Use the {"path": ...} object form for every input_images entry.
- Validate the manifest with jsonschema before recording.
- Avoid editing input_images by hand.
When it happens
Trigger: input_images contains a bare string path instead of an object; an entry is missing the 'path' key; an entry is null or a number from a hand-edit.
Common situations: Manual schema drift ('I'll just put the path string'); copy-paste from a different manifest format; bad JSON merge.
Related errors
- review does not contain row-level results
- invalid imagegen-jobs.json: jobs must be a list
- unknown row job id: {state}
- invalid imagegen-jobs.json: jobs must be a list
- unknown job id: {job_id}
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/2b8acc2e27177e26.
Report an issue: GitHub.