{"record":{"id":"d2e0ace08dc45c9a","repo":"nexu-io/open-design","slug":"job-manifest-not-found-path","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/derive_running_left_from_running_right.py","lineNumber":18,"sourceCode":"#!/usr/bin/env python3\n\"\"\"Conditionally derive running-left by mirroring the approved running-right strip.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport hashlib\nimport json\nfrom datetime import datetime, timezone\nfrom pathlib import Path\n\nfrom PIL import Image, ImageOps\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 job_list(manifest: dict[str, object]) -> list[dict[str, object]]:\n    jobs = manifest.get(\"jobs\")\n    if not isinstance(jobs, list):\n        raise SystemExit(\"invalid imagegen-jobs.json: jobs must be a list\")\n    return [job for job in jobs if isinstance(job, dict)]\n\n\ndef find_job(manifest: dict[str, object], job_id: str) -> dict[str, object]:\n    for job in job_list(manifest):\n        if job.get(\"id\") == job_id:\n            return job\n    raise SystemExit(f\"unknown job id: {job_id}\")\n\n\ndef file_sha256(path: Path) -> str:","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/skills/hatch-pet/scripts/derive_running_left_from_running_right.py#L1-L36","documentation":"Thrown by load_manifest() in derive_running_left_from_running_right.py when the file <run-dir>/imagegen-jobs.json does not exist. The script needs the job manifest to find the running-right source and the running-left mirror policy, so a missing manifest is fatal before any work begins.","triggerScenarios":"Run derive_running_left_from_running_right.py --run-dir <dir> where <dir>/imagegen-jobs.json is absent (wrong directory, manifest not yet generated, typo in path).","commonSituations":"Pointing --run-dir at the parent of the actual run folder; running before the imagegen pipeline produced the manifest; the manifest was moved or deleted; relative path resolved against the wrong cwd.","solutions":["Confirm the run directory contains imagegen-jobs.json (ls <run-dir>/imagegen-jobs.json).","Re-run the imagegen job pipeline for this pet so the manifest is (re)created.","Use an absolute path for --run-dir to avoid cwd resolution ambiguity."],"exampleFix":"# before\npython derive_running_left_from_running_right.py --run-dir ./pets  # no manifest here\n# after\npython derive_running_left_from_running_right.py --run-dir /abs/pets/run-001","handlingStrategy":"validation","validationCode":"from pathlib import Path\ndef assert_manifest_exists(run_dir):\n    p = Path(run_dir) / \"imagegen-jobs.json\"\n    if not p.exists():\n        raise SystemExit(f\"manifest missing: {p}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use an absolute --run-dir path.","Run the imagegen pipeline first so the manifest is present."],"tags":["manifest","hatch-pet","filesystem-safety"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}