{"record":{"id":"ab1ba060c7519ab2","repo":"nexu-io/open-design","slug":"job-manifest-not-found-path-ab1ba0","errorCode":null,"errorMessage":"job manifest not found: {path}","messagePattern":"job manifest not found: (.+?)","errorType":"exception","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"skills/hatch-pet/scripts/pet_job_status.py","lineNumber":14,"sourceCode":"#!/usr/bin/env python3\n\"\"\"Show ready and pending $imagegen jobs for a Codex pet run.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nfrom pathlib import Path\n\n\ndef load_manifest(run_dir: Path) -> dict[str, object]:\n    path = run_dir / \"imagegen-jobs.json\"\n    if not path.exists():\n        raise SystemExit(f\"job manifest not found: {path}\")\n    return json.loads(path.read_text(encoding=\"utf-8\"))\n\n\ndef jobs(manifest: dict[str, object]) -> list[dict[str, object]]:\n    raw = manifest.get(\"jobs\")\n    if not isinstance(raw, list):\n        raise SystemExit(\"invalid imagegen-jobs.json: jobs must be a list\")\n    return [job for job in raw if isinstance(job, dict)]\n\n\ndef completed_ids(manifest: dict[str, object]) -> set[str]:\n    return {\n        str(job[\"id\"])\n        for job in jobs(manifest)\n        if job.get(\"status\") == \"complete\" and isinstance(job.get(\"id\"), str)\n    }\n\n","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/skills/hatch-pet/scripts/pet_job_status.py#L1-L32","documentation":"Raised by load_manifest in pet_job_status.py when run_dir/imagegen-jobs.json does not exist. The status tool reads that manifest to compute ready/blocked job counts, so without it there is nothing to report.","triggerScenarios":"Running pet_job_status.py against a directory that is not a pet run dir, or against a run dir that has not yet been initialized by prepare_pet_run.py.","commonSituations":"Typo in --run-dir; pointing at the parent of the run dir; running status before prepare_pet_run.py; the run dir was deleted/moved.","solutions":["Confirm --run-dir points at the directory that contains imagegen-jobs.json.","If no run dir exists yet, create one with prepare_pet_run.py first.","Check ls <run_dir>/imagegen-jobs.json actually exists.","Re-run pet_job_status.py with the correct path."],"exampleFix":"// before\npython pet_job_status.py --run-dir /tmp/pets\n# SystemExit: job manifest not found: /tmp/pets/imagegen-jobs.json\n\n// after\npython pet_job_status.py --run-dir /tmp/pets/sprout-20260101T000000Z","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef manifest_exists(run_dir: Path) -> bool:\n    return (run_dir / \"imagegen-jobs.json\").exists()","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always create the run dir with prepare_pet_run.py before querying status.","Confirm --run-dir contains imagegen-jobs.json before invoking pet_job_status.py.","Wrap status calls in a check that the manifest path exists."],"tags":["filesystem","manifest","cli","system-exit"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}