From c01e61c4dde6ac7a61a8becf2adba12845c6d713 Mon Sep 17 00:00:00 2001 From: Marius Ciepluch <11855163+norandom@users.noreply.github.com> Date: Tue, 13 Oct 2026 23:18:44 +0200 Subject: [PATCH] fix(bench): the pilot hunter arm undoes an inherited sparse checkout before it reads a hotspot The training clones are sparse-checkout and a worktree inherits it; without this the hunter arm raises unreadable_hotspot on every change of the access-control pool. Same helper and checkout proof as the hunt runner. Co-Authored-By: Claude Fable 5.1 --- benchmarks/valid/hunter_arm.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/benchmarks/valid/hunter_arm.py b/benchmarks/valid/hunter_arm.py index beb0080..ae2e6ff 100644 --- a/benchmarks/valid/hunter_arm.py +++ b/benchmarks/valid/hunter_arm.py @@ -14,6 +14,7 @@ from pathlib import Path from openultrasast import tool_hunter from openultrasast.complexity.map import Hotspot from openultrasast.config import load_config +from openultrasast.hunt.runner import _full_checkout as full_checkout from openultrasast.hunter_tools import clamp_repo_path from openultrasast.learn.program import ANSWER_FORMAT, Caller, Prompt, classify from openultrasast.model.endpoint import resolve_models @@ -204,6 +205,10 @@ def _hunt_change(change, repos, *, client, model, max_steps, no_classify=False): try: git.run("-c", "core.hooksPath=/dev/null", "worktree", "add", "--detach", str(root), change["head"]) added = True + try: + full_checkout(root) # training clones are sparse-checkout; the worktree inherits it + except RuntimeError: + raise InstrumentFailure("checkout_incomplete") from None if local_git(root).run("rev-parse", "HEAD").strip() != change["head"]: raise InstrumentFailure("head_mismatch") instrument["head_verified"] = True