{"record":{"id":"ab20b1719adf7261","repo":"abhigyanpatwari/GitNexus","slug":"task-asset-snapshot-preparation-failed-asset-sna","errorCode":null,"errorMessage":"task asset snapshot preparation failed: {asset_snapshot_error}","messagePattern":"task asset snapshot preparation failed: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/runner.py","lineNumber":1066,"sourceCode":"                        runtime_mounts=runtime_mounts,\n                    )\n                    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)","sourceCodeStart":1048,"sourceCodeEnd":1084,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/runner.py#L1048-L1084","documentation":"Raised inside the per-arm run loop: an earlier attempt to prepare the task asset snapshot failed (OSError/SandboxError/ValueError) and the stored exception was captured in asset_snapshot_error; on the next arm iteration the loop re-raises it wrapped as a RuntimeError so the failure is reported with context rather than silently skipped. Asset snapshot preparation materializes the immutable dependency bundle the sandbox mounts.","triggerScenarios":"task_asset_cache.prepare(...) raised OSError/SandboxError/ValueError on a previous iteration (asset_snapshot_error is set), so the guard `if asset_snapshot_error is not None: raise RuntimeError(...)` fires for subsequent arms before retrying.","commonSituations":"A task-declared asset path is missing, escapes the repo, or has a bad type (surfacing first as one of the _safe_repo_source/_prepare_clone_target errors); the dependency snapshot source is corrupt; a transient FS error (permissions, disk full) on the staging directory; the cache key/SHA mismatch yields a ValueError.","solutions":["Read the wrapped exception text ({asset_snapshot_error}) — it names the underlying SandboxError/OSError/ValueError that is the real cause.","Fix that root cause (missing asset, path traversal, wrong type, permission) using the guidance for the underlying error.","Clear or recreate the task asset cache so prepare retries cleanly.","Confirm the resolved SHA matches the SHA the snapshot was prepared for."],"exampleFix":"// before — asset source path wrong, prepare() failed once and was cached\nasset_snapshot_error = SandboxError('dependency does not exist: foo')\n// after — fix the path, drop the cached failure, re-prepare\n# correct task asset source, then clear cache so prepare() re-runs","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from .proposer_sandbox import SandboxError\n\ntry:\n    asset_snapshot = task_asset_cache.prepare(task, repo=repo, resolved_sha=task_sha, expected_dependency_binding=task_binding)\nexcept (OSError, SandboxError, ValueError) as exc:\n    # real cause is in exc; surface to the operator and skip the arm\n    asset_snapshot_error = exc\n    log.error('asset snapshot prepare failed: %s', exc)","preventionTips":["Pre-validate task asset paths/types before invoking the cache (see errors 440-445).","Run with a clean staging directory so transient FS errors do not poison the cached failure.","Always read the wrapped {asset_snapshot_error} text — it names the real cause."],"tags":["runner","task-assets","snapshot","error-propagation"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}