{"record":{"id":"3a4b0e4823d7ce42","repo":"abhigyanpatwari/GitNexus","slug":"results-directory-is-unavailable-root-exc","errorCode":null,"errorMessage":"results directory is unavailable: {root}: {exc}","messagePattern":"results directory is unavailable: (.+?): (.+?)","errorType":"exception","errorClass":"SandboxError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/evolve.py","lineNumber":293,"sourceCode":"# ─── Proposer session ────────────────────────────────────────────────────────\n\n\ndef _bounded_regular_text(path: Path, limit: int = MAX_EVIDENCE_FILE_BYTES) -> str:\n    mode = path.lstat().st_mode\n    if path.is_symlink() or not stat.S_ISREG(mode):\n        raise SandboxError(f\"evidence source must be a regular non-symlink file: {path}\")\n    with path.open(\"rb\") as handle:\n        if path.stat().st_size > limit:\n            handle.seek(-limit, os.SEEK_END)\n        return handle.read(limit).decode(errors=\"replace\")\n\n\ndef _real_results_root(results_dir: Path) -> Path:\n    root = results_dir.expanduser().absolute()\n    try:\n        metadata = root.lstat()\n    except OSError as exc:\n        raise SandboxError(f\"results directory is unavailable: {root}: {exc}\") from exc\n    if stat.S_ISLNK(metadata.st_mode) or not stat.S_ISDIR(metadata.st_mode):\n        raise SandboxError(f\"results directory must be a real non-symlink directory: {root}\")\n    if root.resolve(strict=True) != root:\n        raise SandboxError(f\"results directory must not traverse symlinks: {root}\")\n    return root\n\n\ndef _results_artifact_path(root: Path, relative_value: str, *, transcript: bool) -> Path:\n    relative = PurePosixPath(relative_value)\n    expected_parts = 2 if transcript else 1\n    if (\n        relative.is_absolute()\n        or len(relative.parts) != expected_parts\n        or any(part in {\"\", \".\", \"..\"} for part in relative.parts)\n        or (transcript and relative.parts[0] != \"transcripts\")\n    ):\n        raise SandboxError(f\"unsafe results artifact path: {relative_value!r}\")\n    current = root","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/evolve.py#L275-L311","documentation":"_real_results_root lstat's the results directory; an OSError (ENOENT, EACCES, ELOOP, stale NFS handle) becomes SandboxError. The harness will not fall back to a default results dir — a missing root means there is no evidence to read, and silently skipping it would let the proposer run without ground truth.","triggerScenarios":"--results-dir points at a path that does not exist; the harness lacks read/execute permission on a parent; an NFS/FUSE mount is hung or stale; a typo in the path.","commonSituations":"First run before any results exist; results dir on an unmounted volume; CI running as a user without access to the results path; relative path resolved from the wrong cwd.","solutions":["Confirm the path exists and is stat-able: `ls -ld <results_dir>` as the same user the harness runs as.","Pass an absolute path; relative paths are resolved against the harness cwd, which may surprise you.","If this is genuinely the first generation, pass results_dir=None instead of a non-existent path."],"exampleFix":"# before\nproposer_evidence_entries(results_dir=Path(\"results/\"), ...)  # does not exist yet\n\n# after: first generation has no prior results\nproposer_evidence_entries(results_dir=None, ...)\n# or, for a real dir\nresults_dir = Path(\"/abs/path/to/results\").resolve()\nassert results_dir.is_dir(), results_dir","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef results_dir_available(path: Path) -> bool:\n    try:\n        path.expanduser().absolute().lstat()\n        return True\n    except OSError:\n        return False\n\n# pass None for first generation, else a stat-able dir\nif results_dir is not None and not results_dir_available(results_dir):\n    raise FileNotFoundError(f\"results dir missing/inaccessible: {results_dir}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass results_dir=None on the first generation instead of a non-existent path.","Always pass an absolute path; relative paths resolve against the harness cwd.","Verify `ls -ld <dir>` as the harness user before starting a generation."],"tags":["workflow-bench","sandbox","filesystem","results-dir","evidence"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}