{"record":{"id":"4e425f06a89a0164","repo":"Hmbown/CodeWhale","slug":"version-must-be-a-semantic-release-identifier","errorCode":null,"errorMessage":"version must be a semantic release identifier","messagePattern":"version must be a semantic release identifier","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"integrations/verifiers-codewhale/codewhale_harness/harness.py","lineNumber":98,"sourceCode":"    \"\"\"Preinstalled facade inside the runtime; useful for local candidate testing.\"\"\"\n\n    max_turns: int | None = None\n    \"\"\"Optional model-step ceiling; omitted rollouts are unlimited.\"\"\"\n\n    sandbox: Literal[\"auto\", \"read-only\", \"workspace-write\", \"external-sandbox\"] = (\n        \"auto\"\n    )\n    \"\"\"`auto` keeps subprocess runs workspace-bound and trusts isolated runtimes.\"\"\"\n\n\nclass CodewhaleHarness(Harness[CodewhaleHarnessConfig]):\n    APPENDS_SYSTEM_PROMPT = True\n    SUPPORTS_MCP = True\n    SUPPORTS_USER_SIM = False\n\n    def _validate_config(self) -> None:\n        if not _VERSION.fullmatch(self.config.version):\n            raise ValueError(\"version must be a semantic release identifier\")\n        if (\n            self.config.max_turns is not None\n            and not 1 <= self.config.max_turns <= 10_000\n        ):\n            raise ValueError(\"max_turns must be between 1 and 10000\")\n        invalid = [\n            tool\n            for tool in self.config.disabled_tools or []\n            if not _TOOL.fullmatch(tool)\n        ]\n        if invalid:\n            raise ValueError(\n                \"disabled_tools must use Codewhale catalog identifiers: \"\n                + \", \".join(repr(tool) for tool in invalid)\n            )\n\n    @property\n    def binary(self) -> str:","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/integrations/verifiers-codewhale/codewhale_harness/harness.py#L80-L116","documentation":"CodewhaleHarness._validate_config rejects a config.version that is not a plain semver release identifier (regex ^[0-9]+.[0-9]+.[0-9]+ with optional -prerelease/+build suffix). The library pins a specific Codewhale release for reproducible rollouts, so a non-semantic version string would produce a broken GitHub release download URL in _install_script.","triggerScenarios":"Passing CodewhaleHarnessConfig(version=...) with a value like 'v0.9.1', '0.9', 'latest', '0.9.1.0', or containing whitespace/typos, then calling setup() or launch().","commonSituations":"Copy-pasting a git tag including the 'v' prefix; using a channel name like 'stable'; typos or extra characters in the version string; assuming any non-empty string is accepted.","solutions":["Set config.version to a bare X.Y.Z semantic version, e.g. '0.9.1' instead of 'v0.9.1'","Remove any whitespace, 'v' prefix, or extra components from the version string","Use the harness default (version defaults to '0.9.1') unless a specific release is required"],"exampleFix":"// before\nCodewhaleHarnessConfig(version=\"v0.9.1\")\n// after\nCodewhaleHarnessConfig(version=\"0.9.1\")","handlingStrategy":"validation","validationCode":"import re\n_VERSION = re.compile(r\"^[0-9]+\\.[0-9]+\\.[0-9]+(?:[-+][0-9A-Za-z.-]+)?$\")\nassert _VERSION.fullmatch(cfg.version), f\"bad version: {cfg.version!r}\"","typeGuard":"def is_semver(v: str) -> bool:\n    return re.fullmatch(r\"[0-9]+\\.[0-9]+\\.[0-9]+(?:[-+][0-9A-Za-z.-]+)?\", v) is not None","tryCatchPattern":null,"preventionTips":["Strip a leading 'v' from git tags before assigning to config.version","Rely on the default version '0.9.1' unless pinning deliberately","Validate the version string in your config-loading code"],"tags":["validation","config","versioning"],"backgroundTag":"invalid-config-value","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"}