{"record":{"id":"7f6e564bb7447bd1","repo":"Hmbown/CodeWhale","slug":"configured-codewhale-binary-is-unavailable-or-does-not","errorCode":null,"errorMessage":"configured Codewhale binary is unavailable or does not report version {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/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/integrations/verifiers-codewhale/codewhale_harness/harness.py#L111-L147","documentation":"When binary_path is configured, setup() skips installation and instead runs '<binary> --version', requiring exit code 0 and the configured version string to appear in stdout/stderr. If the binary is missing, not executable, or reports a different version, setup() raises this RuntimeError so rollouts never run against the wrong binary.","triggerScenarios":"CodewhaleHarnessConfig(binary_path='/path/to/codewhale', version='0.9.1') where the path does not exist, lacks execute permission, is a different build, or its --version output lacks the exact '0.9.1' token, during setup().","commonSituations":"Pointing binary_path at a locally built candidate that is a different version than the pinned config.version; stale symlink; binary not yet built; forgot to rebuild after a version bump.","solutions":["Run '<your binary_path> --version' yourself and confirm it exits 0 and prints the configured version","Make the file executable (chmod +x) or fix the path if it does not exist","Rebuild/reinstall the local binary at the configured version, or set config.version to the version the binary actually reports","Remove binary_path and let setup() install the pinned release automatically"],"exampleFix":"// before\nCodewhaleHarnessConfig(binary_path=\"/tmp/build/codewhale\", version=\"0.9.1\")  # binary reports 0.9.0\n// after\nCodewhaleHarnessConfig(binary_path=\"/tmp/build/codewhale\", version=\"0.9.0\")  # matches actual build","handlingStrategy":"validation","validationCode":"import subprocess\nout = subprocess.run([cfg.binary_path, \"--version\"], capture_output=True, text=True)\nassert out.returncode == 0 and cfg.version in (out.stdout + out.stderr), \"binary/version mismatch\"","typeGuard":null,"tryCatchPattern":"try:\n    await harness.setup(runtime)\nexcept RuntimeError as e:\n    if \"unavailable or does not report version\" in str(e):\n        cfg.binary_path = None  # fall back to managed install\n    else:\n        raise","preventionTips":["Run '<binary> --version' in CI before the eval","Keep binary_path builds in lockstep with config.version","Make preinstalled binaries executable and reachable in the runtime"],"tags":["environment","versioning","binary"],"backgroundTag":"command-not-found","analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}