llm-bench

"""Hard-tier bug fixes for agentic-fix: one module per item, a small project whose failing test
needs reading across files to explain. The model sees the failing test output, explores with
read-only tools (list_files, read_file, search) and calls submit_fix once with the complete new
contents of ONE file. Module attributes:

  ITEM_ID   unique, "<lang>-<name>"
  LANG      go | rust | ts | python | sh | sql | swift (prompt wording + category hard/<LANG>)
  TOOL      binary that must be on PATH (go, cargo, bun, python3, bash, sqlite3, swift); missing ->
            the attempt is infra, never a fail
  MAC_ONLY  optional; True for items that only run on macOS (Swift)
  PROJECT   {path: content}: every file the model can list, read and search, tests included
  HIDDEN    tuple of PROJECT paths (the tests) restored as written before grading, so rewriting a
            test cannot pass
  FIX       {path: content}: the reference fix, exactly one file
  TEST_CMD  argv run in the materialized project; its output is the failing signal shown first
  PASS_RE   regex over TEST_CMD output; group 1 names a passing test
  TESTS     names that must all match PASS_RE (and TEST_CMD must exit 0)
  WRONG     optional [{path: content}, ...]: plausible single-file fixes that must fail the gate

Rules: no comment or name may point at the bug (no "BUG", "FIXME", "wrong"); the fix is one file and
the explanation needs at least two; the project is stdlib-only and builds offline.
"""
import importlib
import os


def load():
    here = os.path.dirname(os.path.abspath(__file__))
    mods = sorted(f[:-3] for f in os.listdir(here) if f.endswith(".py") and not f.startswith("_"))
    return [importlib.import_module("bench.tasks.fix_hard." + m) for m in mods]