abhigyanpatwari/GitNexus · error · ValueError
pinned task commit is unavailable for {task['id']}: {resolve
Error message
pinned task commit is unavailable for {task['id']}: {resolved_sha} What it means
Raised by resolve_task_bindings after `git cat-file -e <sha>^{commit}` fails (run_managed returns not ok) — the pinned/resolved commit object is not present in the local repo object store (runner_tasks.py:139-144). This guards against pins that point at SHAs the checkout doesn't actually have.
Source
Thrown at eval/workflow_bench/runner_tasks.py:144
str(repo_identity),
"rev-parse",
f"{task.get('ref', 'HEAD')}^{{commit}}",
],
timeout=60,
).stdout_tail.strip()
else:
supplied = expected[index]
if not isinstance(supplied, dict):
raise ValueError(f"task binding {index} must be an object")
resolved_sha = str(supplied.get("resolved_sha", ""))
if not re.fullmatch(r"[0-9a-fA-F]{40,64}", resolved_sha):
raise ValueError(f"task {task['id']} did not resolve to an immutable commit")
exists = run_managed(
["git", "-C", str(repo_identity), "cat-file", "-e", f"{resolved_sha}^{{commit}}"],
timeout=60,
)
if not exists.ok:
raise ValueError(f"pinned task commit is unavailable for {task['id']}: {resolved_sha}")
if task_asset_cache is None:
dependency_binding = capture_task_dependency_binding(
task,
repo=repo_identity,
resolved_sha=resolved_sha.lower(),
)
else:
dependency_binding = task_asset_cache.prepare(
task,
repo=repo_identity,
resolved_sha=resolved_sha.lower(),
).dependency_binding
definition = _task_definition_binding(
task,
repo_identity,
oracle_snapshot,
dependency_binding,
)View on GitHub (pinned to d540b00184)
Solutions
- Fetch the object: `git -C <repo> fetch --depth=1 origin <sha>` (or fetch the branch/tags).
- If the SHA is genuinely gone, regenerate the pin from a current commit.
- Avoid shallow clones for benchmark repos, or deepen them.
Defensive patterns
Strategy: try-catch
Validate before calling
import subprocess
probe = subprocess.run(["git", "-C", repo, "cat-file", "-e", f"{sha}^{{commit}}"])
if probe.returncode != 0:
raise SystemExit(f"commit {sha} not present in {repo}; fetch it first") Try / catch
try:
bindings = resolve_task_bindings(tasks, expected)
except ValueError as exc:
if "unavailable for" in str(exc):
subprocess.check_call(["git", "-C", repo, "fetch", "--depth=1", "origin", sha])
bindings = resolve_task_bindings(tasks, expected)
else:
raise Prevention
- Avoid shallow clones for benchmark repos, or run `git fetch --unshallow`.
- Fetch the exact pinned SHA before resolving: `git fetch origin <sha>`.
- Regenerate pins when upstream history is rewritten by force-push.
When it happens
Trigger: A pin referencing a SHA from a different fork/branch never fetched; a shallow clone missing the object; the repo was re-cloned and the commit no longer reachable; a garbage-collected object.
Common situations: Reusing a bindings JSON across repos; shallow clones in CI; a force-push that rewrote history away from the pinned SHA.
Related errors
- task {task['id']} did not resolve to an immutable commit
- candidate overlay is byte-identical to the incumbent skills
- committed benchmark harness is missing from the clone checko
- benchmark harness checkout must contain only real directorie
- clone has more than {MAX_CLONE_REFS} references; refusing in
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/71943dd65fb284d5.
Report an issue: GitHub.