abhigyanpatwari/GitNexus · error · ValueError
{label} is unavailable: {path}: {exc}
Error message
{label} is unavailable: {path}: {exc} What it means
Thrown by _require_real_directory() in eval/workflow_bench/evolution.py when path.lstat() raises OSError: the path does not exist, is not reachable, or permission was denied. The label identifies which logical input failed (e.g. 'candidate overlay directory'). The original OSError is chained via 'from exc'.
Source
Thrown at eval/workflow_bench/evolution.py:69
"is invisible to them and systematically flatters subagent-heavy "
"candidates. Prefer cost_usd (the only CLI-reported field that includes "
"subagents), or sum usage from the digest-bound transcript_artifacts in "
"each run output, deduplicating events "
"that share one message.id."
)
EVIDENCE_MAX_AGE_DAYS = 90
MAX_CANDIDATE_OVERLAY_BYTES = 4 * 1024 * 1024
MAX_SKILL_FINGERPRINT_BYTES = 4 * 1024 * 1024
MAX_CANDIDATE_ENTRIES = 256
MAX_CANDIDATE_FILES = 64
MAX_CANDIDATE_PATH_BYTES = 512
def _require_real_directory(path: Path, *, label: str) -> None:
try:
metadata = path.lstat()
except OSError as exc:
raise ValueError(f"{label} is unavailable: {path}: {exc}") from exc
if stat.S_ISLNK(metadata.st_mode) or not stat.S_ISDIR(metadata.st_mode):
raise ValueError(f"{label} must be a real non-symlink directory: {path}")
def _require_directory_chain(root: Path, relative: Path, *, label: str) -> None:
"""Validate each lexical directory without erasing links via resolve()."""
_require_real_directory(root, label=label)
current = root
for part in relative.parts:
if part in {"", ".", ".."}:
raise ValueError(f"{label} contains an unsafe path component: {relative}")
current /= part
_require_real_directory(current, label=label)
def _bounded_regular_bytes(path: Path, *, limit: int, label: str) -> bytes:
"""Read one bounded regular file without following its leaf link."""View on GitHub (pinned to d540b00184)
Solutions
- Verify the path exists and is readable before invoking the bench: `test -d <path>` in shell, or Path.exists() in Python.
- Check the OSError detail in the message (ENOENT vs EACCES) — fix the typo or chmod/chown the directory.
- Ensure the artifact/overlay is staged to that exact absolute path before the workflow_bench run.
- If the path comes from a variable, assert it is non-empty and absolute before use.
Example fix
# before
overlay = Path(os.environ['OVERLAY']) # unset -> Path('')
candidate_overlay_payload(overlay)
# ValueError: candidate overlay directory is unavailable: : [Errno 2] No such file...
# after
overlay = Path(os.environ['OVERLAY'])
assert overlay.is_dir(), f'overlay missing: {overlay}'
candidate_overlay_payload(overlay) Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def ensure_dir(p: Path, label: str) -> None:
if not p.exists():
raise SystemExit(f'{label} missing: {p}')
if not p.is_dir():
raise SystemExit(f'{label} is not a directory: {p}')
# call before candidate_overlay_payload / _require_real_directory Type guard
def is_unavailable_value_error(exc: ValueError) -> bool:
return 'is unavailable:' in str(exc) Try / catch
try:
candidate_overlay_payload(overlay)
except ValueError as e:
if is_unavailable_value_error(e):
logger.error('Overlay path missing/unreadable: %s', e); raise
raise Prevention
- Assert the overlay path exists and is readable before invoking the bench.
- Stage the overlay to a deterministic absolute path.
- Fail fast on empty path variables at config time.
When it happens
Trigger: candidate_overlay_payload() / _require_directory_chain() walking an overlay whose root or an intermediate directory does not exist or is inaccessible. Example: passing --overlay /tmp/missing where /tmp/missing was never created; permission denied reading a parent directory.
Common situations: Overlay path typo; CI artifact not downloaded before the run; permissions on the runner block access; broken parent symlink resolved to a missing target; path constructed dynamically and the variable was empty.
Related errors
- {label} must be a real non-symlink directory: {path}
- {label} is unreadable: {path}: {exc}
- {label} must be a regular non-symlink file: {path}
- {label} contains an unsafe path component: {relative}
- {label} exceeds the bounded evidence limit
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/103e72e1b4703570.
Report an issue: GitHub.