{"record":{"id":"e9e86904ba6e929f","repo":"abhigyanpatwari/GitNexus","slug":"cannot-inspect-the-clone-for-committed-benchmark-h","errorCode":null,"errorMessage":"cannot inspect the clone for committed benchmark harness data","messagePattern":"cannot inspect the clone for committed benchmark harness data","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"eval/workflow_bench/oracle_assets.py","lineNumber":290,"sourceCode":"        raise ValueError(\"clone HEAD is not an immutable commit\")\n\n    hidden_tree_result = run_managed(\n        [\n            \"git\",\n            \"-C\",\n            str(root),\n            \"ls-tree\",\n            \"-d\",\n            \"--format=%(objectname)\",\n            \"HEAD\",\n            \"--\",\n            HIDDEN_HARNESS_PATH.as_posix(),\n        ],\n        timeout=60,\n        tail_bytes=1024,\n    )\n    if not hidden_tree_result.ok:\n        raise ValueError(\"cannot inspect the clone for committed benchmark harness data\")\n    hidden_tree = hidden_tree_result.stdout_tail.strip()\n    if hidden_tree and (\n        len(hidden_tree) not in {40, 64} or any(character not in \"0123456789abcdefABCDEF\" for character in hidden_tree)\n    ):\n        raise ValueError(\"committed benchmark harness is not a single bounded tree\")\n\n    current = root.joinpath(*HIDDEN_HARNESS_PATH.parts)\n    if hidden_tree:\n        parent = root\n        for part in HIDDEN_HARNESS_PATH.parts:\n            parent /= part\n            try:\n                metadata = parent.lstat()\n            except OSError as exc:\n                raise ValueError(\"committed benchmark harness is missing from the clone checkout\") from exc\n            if stat.S_ISLNK(metadata.st_mode) or not stat.S_ISDIR(metadata.st_mode):\n                raise ValueError(\"benchmark harness checkout must contain only real directories\")\n    elif current.exists() or current.is_symlink():","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/oracle_assets.py#L272-L308","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"from eval.workflow_bench.oracle_assets import run_managed\n\ndef can_inspect_harness(clone) -> bool:\n    res = run_managed([\"git\", \"-C\", str(clone), \"ls-tree\", \"-d\", \"--format=%(objectname)\", \"HEAD\", \"--\", \"eval/workflow_bench\"], timeout=60, tail_bytes=1024)\n    return res.ok","typeGuard":"def clone_ls_tree_ok(clone) -> bool:\n    from eval.workflow_bench.oracle_assets import run_managed\n    res = run_managed([\"git\", \"-C\", str(clone), \"ls-tree\", \"-d\", \"--format=%(objectname)\", \"HEAD\", \"--\", \"eval/workflow_bench\"], timeout=60, tail_bytes=1024)\n    return res.ok","tryCatchPattern":"try:\n    head = sanitize_clone_for_hidden_oracles(clone)\nexcept ValueError as exc:\n    if \"cannot inspect the clone\" in str(exc):\n        raise SystemExit(\"git ls-tree failed; run `git fsck --full` and re-clone\") from exc\n    raise","preventionTips":["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."],"tags":["python","benchmark","oracle","security","git","sanitization","corruption"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}