{"record":{"id":"cb9ddea33f41051c","repo":"HKUDS/Vibe-Trading","slug":"manifest-file-manifest-path-is-missing-or-unread","errorCode":null,"errorMessage":"manifest file {manifest_path} is missing or unreadable ({exc.strerror or 'I/O error'})","messagePattern":"manifest file (.+?) is missing or unreadable \\((.+?)\\)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"agent/src/tools/strategy_discovery_tool.py","lineNumber":467,"sourceCode":"            way.\n    \"\"\"\n    manifest_path = Path(str(path)).expanduser()\n    try:\n        resolved_manifest = manifest_path.resolve()\n    except (OSError, RuntimeError) as exc:\n        raise ValueError(\n            f\"manifest path {manifest_path} could not be resolved: {exc}\"\n        ) from exc\n    if not _manifest_path_allowed(resolved_manifest):\n        raise ValueError(\n            f\"manifest path {manifest_path} is outside the runtime root and \"\n            \"the allowed run roots; place the manifest under one of them \"\n            \"(e.g. next to the runs it lists)\"\n        )\n    try:\n        raw = manifest_path.read_text(encoding=\"utf-8\")\n    except OSError as exc:\n        raise ValueError(\n            f\"manifest file {manifest_path} is missing or unreadable \"\n            f\"({exc.strerror or 'I/O error'})\"\n        ) from exc\n    try:\n        parsed = json.loads(raw)\n    except json.JSONDecodeError as exc:\n        raise ValueError(\n            f\"manifest file {manifest_path} is not valid JSON: {exc.msg} \"\n            f\"at line {exc.lineno} column {exc.colno}\"\n        ) from exc\n    if isinstance(parsed, list):\n        return parsed\n    if isinstance(parsed, dict):\n        runs = parsed.get(\"runs\")\n        if not isinstance(runs, list):\n            raise ValueError(\n                f\"manifest file {manifest_path} must be a JSON object with a \"\n                \"'runs' array or a bare JSON array of run specs\"","sourceCodeStart":449,"sourceCodeEnd":485,"githubUrl":"https://github.com/HKUDS/Vibe-Trading/blob/80ffdda44c5c4db0dd84d70e051cca591cea67df/agent/src/tools/strategy_discovery_tool.py#L449-L485","documentation":"Once the manifest path passes the allowlist check, load_manifest reads the file with read_text(encoding='utf-8'); an OSError (file missing, no read permission, generic I/O error) is wrapped into ValueError including strerror. This means the path was acceptable but the file couldn't be opened/read.","triggerScenarios":"Manifest file deleted between listing and loading; wrong filename/extension (manifest.json vs manifest.jsonl); insufficient file permissions (mode 600 owned by another user); unreadable mount.","commonSituations":"CI artifacts not checked out; race with a cleanup job removing run dirs; permission mismatch when the agent runs as a different user than the one who wrote the manifest.","solutions":["Verify the file exists and is readable: ls -l <path> and cat <path> from the same user running the tool","Fix permissions (chmod a+r) or ownership if needed","Correct the path/filename to point at the actual manifest file"],"exampleFix":"# before\ncore(manifest_path=\"runs/manifest.json\")  # actual file is manifest_v2.json\n# after\ncore(manifest_path=\"runs/manifest_v2.json\")","handlingStrategy":"validation","validationCode":"from pathlib import Path\np = Path(manifest_path)\nif not p.is_file() or not p.stat().st_mode & 0o004:\n    raise FileNotFoundError(f\"manifest missing or unreadable: {p}\")\ncore(manifest_path=manifest_path, ...)","typeGuard":null,"tryCatchPattern":"except ValueError as e: if 'missing or unreadable' in str(e): prompt user to check the path/permissions","preventionTips":["Check existence and read permission before refresh","Beware races with cleanup jobs deleting run dirs"],"tags":["strategy-discovery","manifest","file-not-found","permissions"],"backgroundTag":"file-read-failed","analyzedSha":"80ffdda44c5c4db0dd84d70e051cca591cea67df","analyzedAt":"2026-08-28T12:46:38.989Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}