{"record":{"id":"d11e5fb77e56be6f","repo":"abhigyanpatwari/GitNexus","slug":"oracle-root-is-unavailable-lexical","errorCode":null,"errorMessage":"oracle root is unavailable: {lexical}","messagePattern":"oracle root is unavailable: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/oracle_assets.py","lineNumber":122,"sourceCode":"        if not isinstance(declaration, dict) or set(declaration) != {\"source\", \"target\"}:\n            raise ValueError(f\"task {task_id} oracle file {index} requires exactly source and target\")\n        source = _bounded_relative_path(declaration.get(\"source\"), label=f\"task {task_id} oracle source\")\n        target = _bounded_relative_path(declaration.get(\"target\"), label=f\"task {task_id} oracle target\")\n        if source.as_posix() in sources:\n            raise ValueError(f\"task {task_id} oracle source is duplicated: {source}\")\n        if target.as_posix() in targets:\n            raise ValueError(f\"task {task_id} oracle target is duplicated: {target}\")\n        sources.add(source.as_posix())\n        targets.add(target.as_posix())\n\n\ndef _real_oracle_root(root: Path) -> Path:\n    lexical = root.expanduser().absolute()\n    try:\n        metadata = lexical.lstat()\n        resolved = lexical.resolve(strict=True)\n    except OSError as exc:\n        raise ValueError(f\"oracle root is unavailable: {lexical}\") from exc\n    if stat.S_ISLNK(metadata.st_mode) or not stat.S_ISDIR(metadata.st_mode) or resolved != lexical:\n        raise ValueError(f\"oracle root must be a real non-symlink directory: {lexical}\")\n    return lexical\n\n\ndef _read_oracle_file(root: Path, relative: PurePosixPath) -> bytes:\n    current = root\n    for part in relative.parts[:-1]:\n        current /= part\n        try:\n            metadata = current.lstat()\n        except OSError as exc:\n            raise ValueError(f\"oracle parent is unreadable: {relative}\") from exc\n        if stat.S_ISLNK(metadata.st_mode) or not stat.S_ISDIR(metadata.st_mode):\n            raise ValueError(f\"oracle parents must be real directories: {relative}\")\n\n    path = root.joinpath(*relative.parts)\n    try:","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/oracle_assets.py#L104-L140","documentation":"Raised by _real_oracle_root when lstat() or resolve(strict=True) on the oracle root path raises OSError — meaning the path does not exist, is not reachable, or cannot be resolved. This is a harness-internal guard run by capture_task_oracle before reading any oracle file. The message echoes the lexical absolute path that failed.","triggerScenarios":"Calling capture_task_oracle(task, root=<path>) where <path> does not exist; the default ORACLE_ROOT (eval/workflow_bench/oracles) is missing; the path is on an unmounted filesystem; permissions deny stat.","commonSituations":"Running the benchmark from a checkout that does not include the oracles directory; pointing GITNEXUS_BENCH_ORACLE_ROOT at a wrong or stale path; running in a container where the oracle volume is not mounted; the directory was deleted or never created.","solutions":["Verify the oracle root directory exists: ensure eval/workflow_bench/oracles is present, or your GITNEXUS_BENCH_ORACLE_ROOT value is correct.","Mount/copy the oracle assets directory into the runtime environment.","If using a custom root, pass an existing absolute directory to capture_task_oracle(root=...).","Check filesystem permissions allow lstat on every component of the path."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"from pathlib import Path\nfrom eval.workflow_bench.oracle_assets import ORACLE_ROOT\n\ndef ensure_root(root: Path = ORACLE_ROOT) -> Path:\n    lex = root.expanduser().absolute()\n    if not lex.exists():\n        raise FileNotFoundError(f\"oracle root does not exist: {lex}\")\n    return lex","typeGuard":"def oracle_root_exists(root) -> bool:\n    try:\n        Path(root).expanduser().absolute().lstat()\n        return True\n    except OSError:\n        return False","tryCatchPattern":"from pathlib import Path\ntry:\n    snap = capture_task_oracle(task, root=root)\nexcept ValueError as exc:\n    if \"oracle root is unavailable\" in str(exc):\n        raise SystemExit(f\"Oracle root missing/inaccessible: {exc}\") from exc\n    raise","preventionTips":["Pre-flight check that the oracle root directory exists before running the benchmark.","Set GITNEXUS_BENCH_ORACLE_ROOT explicitly in CI rather than relying on the default.","Mount oracle assets as a read-only volume in containers."],"tags":["python","benchmark","oracle","filesystem","environment"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}