abhigyanpatwari/GitNexus · error · RuntimeError
sanitized graph snapshot preparation failed: {graph_snapshot
Error message
sanitized graph snapshot preparation failed: {graph_snapshot_error} What it means
Raised inside the per-arm run loop symmetrically to the asset case: an earlier attempt to prepare the sanitized graph snapshot failed and the exception was stored in graph_snapshot_error; subsequent arms re-raise it as a RuntimeError with context. The sanitized graph snapshot is the dependency-clean graph state the sandboxed session is allowed to see.
Source
Thrown at eval/workflow_bench/runner.py:1068
graph_snapshots[graph_key] = graph_snapshot
except (ManagedProcessError, OSError, SandboxError, RuntimeError, ValueError) as exc:
graph_snapshot_error = exc
graph_snapshot_errors[graph_key] = exc
per_arm: dict[str, list[dict[str, Any]]] = {a: [] for a in args.arms}
for run_idx in range(args.runs):
if outage_tripped:
break
for arm in args.arms:
if outage_tripped:
break
worktree: Path | None = None
record: dict[str, Any] | None = None
cleanup_error: OSError | None = None
try:
if asset_snapshot_error is not None:
raise RuntimeError(f"task asset snapshot preparation failed: {asset_snapshot_error}")
if graph_snapshot_error is not None:
raise RuntimeError(f"sanitized graph snapshot preparation failed: {graph_snapshot_error}")
if graph_snapshot is None:
raise RuntimeError("sanitized graph snapshot is unavailable")
if asset_snapshot is None:
try:
asset_snapshot = task_asset_cache.prepare(
task,
repo=repo,
resolved_sha=task_sha,
expected_dependency_binding=task_binding,
)
except (OSError, SandboxError, ValueError) as exc:
asset_snapshot_error = exc
raise
worktree = make_worktree(repo, task_sha, Path(trees))
sanitized_head = sanitize_clone_for_hidden_oracles(worktree)
graph_snapshot.materialize(worktree, sanitized_head=sanitized_head)
dependency_mounts = stage_task_assets(
task,View on GitHub (pinned to d540b00184)
Solutions
- Read the wrapped exception ({graph_snapshot_error}) to find the real underlying cause.
- Address that root cause (rebuild the index, fix metadata, free disk, fix permissions).
- Recreate the graph snapshot cache so preparation is retried cleanly.
- Confirm the resolved task SHA matches what the graph snapshot was built from.
Example fix
// before — graph snapshot prep failed (e.g. corrupt index metadata)
graph_snapshot_error = SandboxError('benchmark index metadata is malformed: ...')
// after — rebuild the index, drop cached failure, re-prepare
node .gitnexus/run.cjs analyze --index-only Defensive patterns
Strategy: try-catch
Try / catch
from .proposer_sandbox import SandboxError
try:
graph_snapshot = graph_cache.prepare(task, repo=repo, resolved_sha=task_sha)
except (OSError, SandboxError, ValueError) as exc:
graph_snapshot_error = exc
log.error('graph snapshot prepare failed: %s', exc) Prevention
- Keep the gitnexus index valid and complete (see errors 448-451).
- Ensure the resolved task SHA matches the prepared graph's SHA.
- Always read the wrapped {graph_snapshot_error} text — it names the real cause.
When it happens
Trigger: graph snapshot preparation raised on a prior iteration (graph_snapshot_error is set), so `if graph_snapshot_error is not None: raise RuntimeError(...)` fires before the next arm can run.
Common situations: The graph snapshot source is missing or unreadable; sanitization hit a path/type/JSON error on the index metadata; a transient FS error on the staging area; SHA mismatch between the worktree and the prepared graph.
Related errors
- sanitized graph snapshot is unavailable
- task asset snapshot preparation failed: {asset_snapshot_erro
- Failed to install Node.js: {result.get('output', '')}
- Failed to install gitnexus: {result.get('output', '')}
- gitnexus analyze failed: {output[-500:]}
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/71c69d882ae921a7.
Report an issue: GitHub.