abhigyanpatwari/GitNexus · critical · ValueError
cannot inspect the clone for committed benchmark harness dat
Error message
cannot inspect the clone for committed benchmark harness data
What it means
Raised by sanitize_clone_for_hidden_oracles when `git ls-tree -d --format=%(objectname) HEAD -- eval/workflow_bench` fails (the run_managed result has ok=False). This probe checks whether the hidden benchmark harness tree is committed in HEAD; if git cannot even run the inspection, the sanitizer refuses to proceed because it cannot determine what needs to be removed.
Source
Thrown at eval/workflow_bench/oracle_assets.py:290
raise ValueError("clone HEAD is not an immutable commit")
hidden_tree_result = run_managed(
[
"git",
"-C",
str(root),
"ls-tree",
"-d",
"--format=%(objectname)",
"HEAD",
"--",
HIDDEN_HARNESS_PATH.as_posix(),
],
timeout=60,
tail_bytes=1024,
)
if not hidden_tree_result.ok:
raise ValueError("cannot inspect the clone for committed benchmark harness data")
hidden_tree = hidden_tree_result.stdout_tail.strip()
if hidden_tree and (
len(hidden_tree) not in {40, 64} or any(character not in "0123456789abcdefABCDEF" for character in hidden_tree)
):
raise ValueError("committed benchmark harness is not a single bounded tree")
current = root.joinpath(*HIDDEN_HARNESS_PATH.parts)
if hidden_tree:
parent = root
for part in HIDDEN_HARNESS_PATH.parts:
parent /= part
try:
metadata = parent.lstat()
except OSError as exc:
raise ValueError("committed benchmark harness is missing from the clone checkout") from exc
if stat.S_ISLNK(metadata.st_mode) or not stat.S_ISDIR(metadata.st_mode):
raise ValueError("benchmark harness checkout must contain only real directories")
elif current.exists() or current.is_symlink():View on GitHub (pinned to d540b00184)
Solutions
- Run `git -C <clone> fsck --full` and repair any reported corruption.
- Re-clone from source to obtain a clean object database.
- Check for git hooks (core.hooksPath) that might fail read-only commands and disable them for the clone.
- Ensure the object store is on a healthy, writable-enough filesystem.
Defensive patterns
Strategy: try-catch
Validate before calling
from eval.workflow_bench.oracle_assets import run_managed
def can_inspect_harness(clone) -> bool:
res = run_managed(["git", "-C", str(clone), "ls-tree", "-d", "--format=%(objectname)", "HEAD", "--", "eval/workflow_bench"], timeout=60, tail_bytes=1024)
return res.ok Type guard
def clone_ls_tree_ok(clone) -> bool:
from eval.workflow_bench.oracle_assets import run_managed
res = run_managed(["git", "-C", str(clone), "ls-tree", "-d", "--format=%(objectname)", "HEAD", "--", "eval/workflow_bench"], timeout=60, tail_bytes=1024)
return res.ok Try / catch
try:
head = sanitize_clone_for_hidden_oracles(clone)
except ValueError as exc:
if "cannot inspect the clone" in str(exc):
raise SystemExit("git ls-tree failed; run `git fsck --full` and re-clone") from exc
raise Prevention
- Run `git fsck --full` on the clone before sanitizing.
- Disable hooks (core.hooksPath=/dev/null) for the disposable clone.
- Re-clone if the object store shows any corruption.
When it happens
Trigger: The ls-tree invocation returns non-zero — e.g. the index/HEAD is in a bad state, a git subcommand crashed, the repository object database is corrupt, or a git hook/permission issue interferes with ls-tree.
Common situations: Repository corruption (run `git fsck --full`); a broken shallow clone; git hooks that reject read operations; filesystem errors on the object store; disk-full conditions during git operations.
Related errors
- oracle sanitization requires a self-contained clone: {root}
- oracle sanitization requires a real self-contained clone: {r
- clone HEAD is not an immutable commit
- committed benchmark harness is not a single bounded tree
- oracle root must be a real non-symlink directory: {lexical}
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/e9e86904ba6e929f.
Report an issue: GitHub.