{"record":{"id":"49a7675629848b0b","repo":"AlexsJones/llmfit","slug":"no-compiled-binary-found-checked-candidates","errorCode":null,"errorMessage":"No compiled binary found. Checked:\n  {candidates}\nRun 'make build' first.","messagePattern":"No compiled binary found\\. Checked:\n  (.+?)\nRun 'make build' first\\.","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"llmfit-python/hatch_build.py","lineNumber":133,"sourceCode":"            )\n        return bin_path\n\n    @staticmethod\n    def _find_local_binary(llmfit_root: Path) -> Path:\n        \"\"\"Find the locally compiled binary in default Cargo output locations.\n\n        Checks ``target/debug/`` first (from ``make build``), then\n        ``target/release/`` (from ``make release``).\n        \"\"\"\n        binary_name = \"llmfit.exe\" if sys.platform == \"win32\" else \"llmfit\"\n        candidates = [\n            llmfit_root / \"target\" / \"debug\" / binary_name,\n            llmfit_root / \"target\" / \"release\" / binary_name,\n        ]\n        for candidate in candidates:\n            if candidate.is_file():\n                return candidate\n        raise FileNotFoundError(\n            \"No compiled binary found. Checked:\\n\"\n            + \"\\n\".join(f\"  {c}\" for c in candidates)\n            + \"\\nRun 'make build' first.\",\n        )\n\n    @staticmethod\n    def _check_binary_version(bin_path: Path, expected_version: str) -> None:\n        \"\"\"Run the binary with ``--version`` and verify it matches the expected version.\n\n        Raises ``RuntimeError`` on a mismatch — this indicates a stale build.\n        \"\"\"\n        result = subprocess.run(\n            [str(bin_path), \"--version\"],\n            capture_output=True,\n            check=True,\n            text=True,\n            timeout=5,\n        )","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/AlexsJones/llmfit/blob/a9ac7ed91c1729cd93944bc1338e8313daaba8fa/llmfit-python/hatch_build.py#L115-L151","documentation":"For editable installs (uv sync, uv run, pip install -e), _find_local_binary() checks only <repo>/target/debug/<binary> and <repo>/target/release/<binary>. This FileNotFoundError lists both checked paths and fires when neither exists - the Rust crate has not been compiled yet, so there is no binary to wire into the environment.","triggerScenarios":"Fresh clone followed immediately by `uv sync` or `uv run --project llmfit-python pytest` without `cargo build`; running after `cargo clean` or `make clean`; building the workspace with a different target-dir or CARGO_TARGET_DIR env var so target/ is empty; building from a directory where the repo root (Path(self.root).parent) is not the Cargo workspace root.","commonSituations":"Onboarding: the README build order (make build first, then Python tooling) was skipped; CI cache of target/ invalidated; CARGO_TARGET_DIR set globally by a developer tool (e.g. sccache) so binaries land elsewhere.","solutions":["Run `make build` (or `cargo build`) at the repository root, then repeat `uv sync`.","Confirm `target/debug/llmfit` or `target/release/llmfit` now exists next to the Cargo workspace root.","Unset CARGO_TARGET_DIR (or point it at <repo>/target) so cargo uses the location the hook scans.","Rebuild after any `cargo clean` / `make clean` before invoking Python tooling."],"exampleFix":"# before\ngit clone <repo> && cd llmfit\nuv sync  # FileNotFoundError: No compiled binary found ... Run 'make build' first.\n\n# after\ngit clone <repo> && cd llmfit\nmake build   # cargo build -> target/debug/llmfit\nuv sync","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\nrepo = Path.cwd()  # repository root when running uv sync\nname = 'llmfit.exe' if __import__('sys').platform == 'win32' else 'llmfit'\nif not any((repo / 'target' / profile / name).is_file() for profile in ('debug', 'release')):\n    raise SystemExit('Run `make build` (cargo build) before `uv sync`')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Script onboarding as `make build && uv sync` so the cargo step always precedes the Python step.","Do not set CARGO_TARGET_DIR to a custom location; the hook only scans <repo>/target/.","Re-run make build after cargo clean or fresh clones.","Cache target/ in CI so cleanups do not force surprise rebuild failures."],"tags":["python","rust","build","editable-install","developer-setup"],"backgroundTag":"missing-build-artifact","analyzedSha":"a9ac7ed91c1729cd93944bc1338e8313daaba8fa","analyzedAt":"2026-08-16T19:19:11.438Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}