{"record":{"id":"efe79b510f468c52","repo":"Hmbown/CodeWhale","slug":"configured-codewhale-binary-is-unavailable-or-does","errorCode":null,"errorMessage":"configured Codewhale binary is unavailable or does not report version ${self.config.version}","messagePattern":"configured Codewhale binary is unavailable or does not report version (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"integrations/verifiers-codewhale/codewhale_harness/harness.py","lineNumber":129,"sourceCode":"                \"disabled_tools must use Codewhale catalog identifiers: \"\n                + \", \".join(repr(tool) for tool in invalid)\n            )\n\n    @property\n    def binary(self) -> str:\n        configured = (self.config.binary_path or \"\").strip()\n        return configured or DEFAULT_BINARY\n\n    async def setup(self, runtime: Runtime) -> None:\n        self._validate_config()\n        if self.config.binary_path:\n            logger.info(\"codewhale: verifying preinstalled %s\", self.binary)\n            result = await runtime.run([self.binary, \"--version\"], {})\n            version_text = f\"{result.stdout}\\n{result.stderr}\"\n            if result.exit_code != 0 or not _has_version(\n                version_text, self.config.version\n            ):\n                raise RuntimeError(\n                    \"configured Codewhale binary is unavailable or does not report \"\n                    f\"version {self.config.version}\"\n                )\n            return\n\n        logger.info(\"codewhale: ensuring Codewhale %s is installed\", self.config.version)\n        script = _install_script(self.config.version)\n        result = await runtime.run([\"sh\", \"-c\", script], {})\n        if result.exit_code != 0:\n            raise RuntimeError(\n                \"Codewhale install failed: \"\n                + (result.stderr or result.stdout).strip()[-500:]\n            )\n\n    async def launch(\n        self,\n        ctx: ModelContext,\n        trace: Trace,","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/integrations/verifiers-codewhale/codewhale_harness/harness.py#L111-L147","documentation":"When binary_path is configured, setup() executes [binary, '--version'] inside the runtime and requires exit code 0 plus the configured version appearing as a standalone token in the combined output — _has_version uses lookarounds, so '0.9.1' inside 'v0.9.12' does not count. This RuntimeError means the preinstalled facade is missing, not executable, crashed, or reports a release other than config.version.","triggerScenarios":"binary_path points outside the runtime filesystem or to a non-executable; the facade's --version exits non-zero; the installed build reports a different version than the pinned config.version.","commonSituations":"Local candidate testing where the facade was rebuilt but the config still pins the old release; container images that do not bake the preinstalled path; version drift after bumping config.version without rebuilding the image.","solutions":["Run the exact probe yourself: <binary_path> --version, and compare the printed token to config.version","Update config.version to the release the binary actually reports","Point binary_path at the absolute path of the tested executable","Drop binary_path to let setup() download and verify the pinned release instead"],"exampleFix":"# before\nconfig = CodewhaleHarnessConfig(version='0.9.1', binary_path='./build/codewhale')  # prints 0.9.0\n# after\nconfig = CodewhaleHarnessConfig(version='0.9.0', binary_path='./build/codewhale')","handlingStrategy":"validation","validationCode":"import re\n\ndef reports_version(output, version):\n    return re.search(rf'(?<![0-9A-Za-z.+-]){re.escape(version)}(?![0-9A-Za-z.+-])', output) is not None\n\nprobe = await runtime.run([binary_path, '--version'], {})\noutput = probe.stdout + '\\n' + probe.stderr\nok = probe.exit_code == 0 and reports_version(output, config.version)","typeGuard":null,"tryCatchPattern":"try:\n    await harness.setup(runtime)\nexcept RuntimeError as e:\n    if 'unavailable or does not report' in str(e):\n        adjust_version_pin_or_binary_path(e)  # re-probe, then fix config\n    raise","preventionTips":["Re-verify facades after every rebuild; the version pin is exact","Bake binaries into images at absolute paths","Keep config.version in lockstep with the facade's reported version"],"tags":["environment","binary","versioning","setup","harness"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}