Hmbown/CodeWhale · error · ValueError

version must be a semantic release identifier

Error message

version must be a semantic release identifier

What it means

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.

Solutions

  1. Set config.version to a bare X.Y.Z semantic version, e.g. '0.9.1' instead of 'v0.9.1'
  2. Remove any whitespace, 'v' prefix, or extra components from the version string
  3. Use the harness default (version defaults to '0.9.1') unless a specific release is required

Example fix

// before
CodewhaleHarnessConfig(version="v0.9.1")
// after
CodewhaleHarnessConfig(version="0.9.1")
Defensive patterns

Strategy: validation

Validate before calling

import re
_VERSION = re.compile(r"^[0-9]+\.[0-9]+\.[0-9]+(?:[-+][0-9A-Za-z.-]+)?$")
assert _VERSION.fullmatch(cfg.version), f"bad version: {cfg.version!r}"

Type guard

def is_semver(v: str) -> bool:
    return re.fullmatch(r"[0-9]+\.[0-9]+\.[0-9]+(?:[-+][0-9A-Za-z.-]+)?", v) is not None

Prevention

When it happens

Trigger: 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().

Common situations: 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.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15). Data as JSON: /api/errors/4e425f06a89a0164. Report an issue: GitHub.

Appendix: source

Thrown at integrations/verifiers-codewhale/codewhale_harness/harness.py:98

    """Preinstalled facade inside the runtime; useful for local candidate testing."""

    max_turns: int | None = None
    """Optional model-step ceiling; omitted rollouts are unlimited."""

    sandbox: Literal["auto", "read-only", "workspace-write", "external-sandbox"] = (
        "auto"
    )
    """`auto` keeps subprocess runs workspace-bound and trusts isolated runtimes."""


class CodewhaleHarness(Harness[CodewhaleHarnessConfig]):
    APPENDS_SYSTEM_PROMPT = True
    SUPPORTS_MCP = True
    SUPPORTS_USER_SIM = False

    def _validate_config(self) -> None:
        if not _VERSION.fullmatch(self.config.version):
            raise ValueError("version must be a semantic release identifier")
        if (
            self.config.max_turns is not None
            and not 1 <= self.config.max_turns <= 10_000
        ):
            raise ValueError("max_turns must be between 1 and 10000")
        invalid = [
            tool
            for tool in self.config.disabled_tools or []
            if not _TOOL.fullmatch(tool)
        ]
        if invalid:
            raise ValueError(
                "disabled_tools must use Codewhale catalog identifiers: "
                + ", ".join(repr(tool) for tool in invalid)
            )

    @property
    def binary(self) -> str:

View on GitHub (pinned to 433685b202)