{"record":{"id":"113bbaa99f58debd","repo":"abhigyanpatwari/GitNexus","slug":"committed-benchmark-harness-is-not-a-single-bounde","errorCode":null,"errorMessage":"committed benchmark harness is not a single bounded tree","messagePattern":"committed benchmark harness is not a single bounded tree","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"eval/workflow_bench/oracle_assets.py","lineNumber":295,"sourceCode":"            \"-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():\n        raise ValueError(\"untracked benchmark harness data blocks oracle sanitization\")\n\n    _git_checked(\n        root,\n        [","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/oracle_assets.py#L277-L313","documentation":"Raised by sanitize_clone_for_hidden_oracles when `git ls-tree -d HEAD -- eval/workflow_bench` succeeds (ok=True) but its output is non-empty and not a single 40- or 64-char hexadecimal object id. The harness expects the committed benchmark harness to be a single, bounded tree object under that path; a malformed or multi-object response indicates the repository shape is not what the sanitizer is built to handle.","triggerScenarios":"ls-tree prints multiple lines (unexpected for -d on a single path), garbage/extra whitespace beyond a single SHA, an object id of unusual length, or output polluted by a git wrapper/alias.","commonSituations":"A custom git wrapper or alias that decorates output; a repository where eval/workflow_bench was committed in an unusual way (e.g. multiple mode entries); git version differences in ls-tree formatting; tampered git installation.","solutions":["Run the exact command manually: `git -C <clone> ls-tree -d --format=%(objectname) HEAD -- eval/workflow_bench` and inspect output — it must be empty or a single 40/64-char hex SHA.","Remove any git aliases, wrappers, or pager settings that alter ls-tree output.","Re-clone from source so the harness path is committed in the expected single-tree shape.","If the harness path should not be in HEAD at all, ensure ls-tree returns empty (no committed harness) rather than malformed output."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import re\nfrom eval.workflow_bench.oracle_assets import run_managed\n\ndef assert_single_bounded_tree(clone) -> None:\n    res = run_managed([\"git\", \"-C\", str(clone), \"ls-tree\", \"-d\", \"--format=%(objectname)\", \"HEAD\", \"--\", \"eval/workflow_bench\"], timeout=60, tail_bytes=1024)\n    out = res.stdout_tail.strip()\n    if out and not re.fullmatch(r\"[0-9a-fA-F]{40}|[0-9a-fA-F]{64}\", out):\n        raise ValueError(f\"unexpected ls-tree output: {out!r}\")","typeGuard":"def harness_tree_is_bounded(clone) -> bool:\n    import re\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    out = res.stdout_tail.strip()\n    return not out or bool(re.fullmatch(r\"[0-9a-fA-F]{40}|[0-9a-fA-F]{64}\", out))","tryCatchPattern":"try:\n    head = sanitize_clone_for_hidden_oracles(clone)\nexcept ValueError as exc:\n    if \"single bounded tree\" in str(exc):\n        raise SystemExit(\"ls-tree output malformed; remove git aliases/wrappers and re-clone\") from exc\n    raise","preventionTips":["Avoid git aliases, pagers, or wrapper scripts that alter ls-tree output.","Re-clone from source so the harness path is committed in a single tree.","Manually run the exact ls-tree command to verify clean single-line output."],"tags":["python","benchmark","oracle","security","git","sanitization","validation"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}