{"record":{"id":"71c69d882ae921a7","repo":"abhigyanpatwari/GitNexus","slug":"sanitized-graph-snapshot-preparation-failed-grap","errorCode":null,"errorMessage":"sanitized graph snapshot preparation failed: {graph_snapshot_error}","messagePattern":"sanitized graph snapshot preparation failed: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/runner.py","lineNumber":1068,"sourceCode":"                    graph_snapshots[graph_key] = graph_snapshot\n            except (ManagedProcessError, OSError, SandboxError, RuntimeError, ValueError) as exc:\n                graph_snapshot_error = exc\n                graph_snapshot_errors[graph_key] = exc\n            per_arm: dict[str, list[dict[str, Any]]] = {a: [] for a in args.arms}\n            for run_idx in range(args.runs):\n                if outage_tripped:\n                    break\n                for arm in args.arms:\n                    if outage_tripped:\n                        break\n                    worktree: Path | None = None\n                    record: dict[str, Any] | None = None\n                    cleanup_error: OSError | None = None\n                    try:\n                        if asset_snapshot_error is not None:\n                            raise RuntimeError(f\"task asset snapshot preparation failed: {asset_snapshot_error}\")\n                        if graph_snapshot_error is not None:\n                            raise RuntimeError(f\"sanitized graph snapshot preparation failed: {graph_snapshot_error}\")\n                        if graph_snapshot is None:\n                            raise RuntimeError(\"sanitized graph snapshot is unavailable\")\n                        if asset_snapshot is None:\n                            try:\n                                asset_snapshot = task_asset_cache.prepare(\n                                    task,\n                                    repo=repo,\n                                    resolved_sha=task_sha,\n                                    expected_dependency_binding=task_binding,\n                                )\n                            except (OSError, SandboxError, ValueError) as exc:\n                                asset_snapshot_error = exc\n                                raise\n                        worktree = make_worktree(repo, task_sha, Path(trees))\n                        sanitized_head = sanitize_clone_for_hidden_oracles(worktree)\n                        graph_snapshot.materialize(worktree, sanitized_head=sanitized_head)\n                        dependency_mounts = stage_task_assets(\n                            task,","sourceCodeStart":1050,"sourceCodeEnd":1086,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/runner.py#L1050-L1086","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before — graph snapshot prep failed (e.g. corrupt index metadata)\ngraph_snapshot_error = SandboxError('benchmark index metadata is malformed: ...')\n// after — rebuild the index, drop cached failure, re-prepare\nnode .gitnexus/run.cjs analyze --index-only","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from .proposer_sandbox import SandboxError\n\ntry:\n    graph_snapshot = graph_cache.prepare(task, repo=repo, resolved_sha=task_sha)\nexcept (OSError, SandboxError, ValueError) as exc:\n    graph_snapshot_error = exc\n    log.error('graph snapshot prepare failed: %s', exc)","preventionTips":["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."],"tags":["runner","graph-snapshot","snapshot","error-propagation","gitnexus"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}