{"record":{"id":"bd32149920882889","repo":"nexu-io/open-design","slug":"job-job-get-id-does-not-list-input-images-gr","errorCode":null,"errorMessage":"job {job.get('id')} does not list input_images; grounded row jobs must attach references","messagePattern":"job (.+?) does not list input_images; grounded row jobs must attach references","errorType":"exception","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"skills/hatch-pet/scripts/record_imagegen_result.py","lineNumber":112,"sourceCode":"            \"source image is inside the pet run directory; record the original \"\n            \"$imagegen output from $CODEX_HOME/generated_images/.../ig_*.png instead\"\n        )\n    generated_root = default_generated_images_root()\n    if not is_relative_to(source, generated_root) or not source.name.startswith(\"ig_\"):\n        raise SystemExit(\n            \"source image does not look like a built-in $imagegen output; expected \"\n            f\"{generated_root}/.../ig_*.png. Do not ingest locally drawn or \"\n            \"post-processed row strips as visual job outputs.\"\n        )\n    return \"built-in-imagegen\"\n\n\ndef validate_required_grounding(job: dict[str, object], run_dir: Path) -> None:\n    if job.get(\"allow_prompt_only_generation\") is not False:\n        return\n    inputs = job.get(\"input_images\")\n    if not isinstance(inputs, list) or not inputs:\n        raise SystemExit(\n            f\"job {job.get('id')} does not list input_images; grounded row jobs must attach references\"\n        )\n    missing = []\n    for item in inputs:\n        if not isinstance(item, dict) or not isinstance(item.get(\"path\"), str):\n            raise SystemExit(f\"job {job.get('id')} has an invalid input image entry\")\n        path = run_dir / item[\"path\"]\n        if not path.is_file():\n            missing.append(str(path))\n    if missing:\n        raise SystemExit(\n            f\"job {job.get('id')} is missing required grounding image(s): \"\n            + \", \".join(missing)\n        )\n\n\ndef update_base_canonical_reference(\n    *,","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/skills/hatch-pet/scripts/record_imagegen_result.py#L94-L130","documentation":"Raised by validate_required_grounding() in record_imagegen_result.py for a grounded job (one with allow_prompt_only_generation is False) whose input_images is missing or empty. Grounded row jobs must reference the canonical base/references so the model cannot drift; recording a result without those references attached is rejected.","triggerScenarios":"A row job was defined with 'allow_prompt_only_generation': false but no input_images list; input_images was set to [] or omitted; the manifest was edited to remove grounding references.","commonSituations":"Manually toggling a job to grounded without attaching references; prepare step that should have populated input_images ran against a broken reference set.","solutions":["Add input_images (a non-empty list of {path: ...} entries) to the job in imagegen-jobs.json.","Set allow_prompt_only_generation to true if the job is genuinely prompt-only.","Re-run prepare_pet_run.py --force so grounding references are attached correctly.","Verify the reference files pointed to by input_images exist under run_dir."],"exampleFix":"// before\n{\"id\":\"idle\",\"allow_prompt_only_generation\":false}\n// after\n{\"id\":\"idle\",\"allow_prompt_only_generation\":false,\"input_images\":[{\"path\":\"references/canonical-base.png\"}]}","handlingStrategy":"validation","validationCode":"if job.get(\"allow_prompt_only_generation\") is False:\n    inputs = job.get(\"input_images\")\n    if not isinstance(inputs, list) or not inputs:\n        raise SystemExit(f\"grounded job {job.get('id')} needs non-empty input_images\")","typeGuard":"def is_grounded(job: dict) -> bool:\n    return job.get(\"allow_prompt_only_generation\") is False","tryCatchPattern":null,"preventionTips":["Let prepare_pet_run.py populate input_images; do not toggle grounded flags by hand.","If a job is truly prompt-only, leave allow_prompt_only_generation unset/true.","Add a CI check that every grounded job has input_images."],"tags":["data-validation","cli","hatch-pet","schema"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}