{"record":{"id":"948110ae4ee6c7db","repo":"nexu-io/open-design","slug":"row-prompt-not-found-prompt-path","errorCode":null,"errorMessage":"row prompt not found: {prompt_path}","messagePattern":"row prompt not found: (.+?)","errorType":"exception","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"skills/hatch-pet/scripts/queue_pet_repairs.py","lineNumber":46,"sourceCode":"        if not isinstance(row, dict) or not isinstance(row.get(\"state\"), str):\n            continue\n        errors = row.get(\"errors\") if isinstance(row.get(\"errors\"), list) else []\n        warnings = row.get(\"warnings\") if isinstance(row.get(\"warnings\"), list) else []\n        if errors or (repair_on_warnings and warnings):\n            repairs.append(\n                {\n                    \"state\": row[\"state\"],\n                    \"reason\": \"; \".join(str(item) for item in [*errors, *warnings])\n                    or \"the row did not pass visual QA\",\n                }\n            )\n    return repairs\n\n\ndef append_repair_note(run_dir: Path, state: str, attempt: int, reason: str) -> None:\n    prompt_path = run_dir / \"prompts\" / \"rows\" / f\"{state}.md\"\n    if not prompt_path.exists():\n        raise SystemExit(f\"row prompt not found: {prompt_path}\")\n    existing = prompt_path.read_text(encoding=\"utf-8\")\n    note = f\"\"\"\n\nRepair attempt {attempt}:\n- The previous `{state}` strip failed QA: {reason}\n- Regenerate the entire row, not just one pose.\n- Fill every requested frame slot with one complete centered full-body pet pose.\n- Keep large gaps of pure chroma key only between slots; do not leave a requested slot empty.\n- Avoid pose overlap, clipping, edge slivers, extra partial sprites, and detached fragments from neighboring poses.\n- Use the canonical base image and any original references listed in `imagegen-jobs.json` as grounding inputs.\n- Do not redesign the pet. Keep the exact same head shape, face design, markings, body proportions, palette, outline weight, materials, and props as the approved base pet.\n- If the contact sheet shows identity drift, repair only this row while preserving the canonical base identity.\n\"\"\"\n    prompt_path.write_text(existing.rstrip() + note.rstrip() + \"\\n\", encoding=\"utf-8\")\n\n\ndef job_list(manifest: dict[str, object]) -> list[dict[str, object]]:\n    jobs = manifest.get(\"jobs\")","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/skills/hatch-pet/scripts/queue_pet_repairs.py#L28-L64","documentation":"Raised by append_repair_note() in queue_pet_repairs.py when run_dir/prompts/rows/{state}.md does not exist. Repair queuing appends a structured 'Repair attempt N' brief to the row's prompt file, so a missing prompt file means the run was never fully prepared or the state id does not match any prompt.","triggerScenarios":"The repair review references a state (e.g. 'jump') whose prompt file was not generated; someone deleted prompts/rows/; the state string casing/spelling differs from the generated filename.","commonSituations":"Prepare step was interrupted after writing the manifest but before writing row prompts; row set was edited in the manifest after prepare; cross-platform case-sensitivity mismatch on the state id.","solutions":["Re-run prepare_pet_run.py --force so every prompts/rows/<state>.md is regenerated.","Check the exact state string in review.json matches a filename under run_dir/prompts/rows/.","If only one prompt is missing, copy a sibling prompt and rename it to the missing state as a stopgap, then re-run prepare.","Verify the row's state id in imagegen-jobs.json matches the review's state field."],"exampleFix":"# before: review references state='leap' but file is run.png\n# after: align review state to 'run' or regenerate the 'leap' prompt via prepare","handlingStrategy":"validation","validationCode":"from pathlib import Path\nprompt_path = run_dir / \"prompts\" / \"rows\" / f\"{state}.md\"\nif not prompt_path.exists():\n    raise SystemExit(f\"missing {prompt_path}; re-run prepare_pet_run.py --force\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always prepare before repair; never delete prompts/rows/ manually.","Keep state ids lowercase-kebab and identical between manifest, prompts, and review.","On case-sensitive filesystems, treat state ids as case-sensitive filenames."],"tags":["filesystem","cli","hatch-pet","validation"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}