{"record":{"id":"677c59a1d641d42d","repo":"headroomlabs-ai/headroom","slug":"unsupported-bump-level-level","errorCode":null,"errorMessage":"Unsupported bump level: {level}","messagePattern":"Unsupported bump level: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"headroom/release_version.py","lineNumber":68,"sourceCode":"    major: int\n    minor: int\n    patch: int\n\n    @classmethod\n    def parse(cls, value: str) -> SemVer:\n        match = SEMVER_RE.match(value)\n        if not match:\n            raise ValueError(f\"Invalid semantic version: {value}\")\n        return cls(*(int(part) for part in match.groups()))\n\n    def bump(self, level: str) -> SemVer:\n        if level == \"major\":\n            return SemVer(self.major + 1, 0, 0)\n        if level == \"minor\":\n            return SemVer(self.major, self.minor + 1, 0)\n        if level == \"patch\":\n            return SemVer(self.major, self.minor, self.patch + 1)\n        raise ValueError(f\"Unsupported bump level: {level}\")\n\n    def __str__(self) -> str:\n        return f\"{self.major}.{self.minor}.{self.patch}\"\n\n\n@dataclass(frozen=True)\nclass ReleaseVersionInfo:\n    \"\"\"Workflow outputs for release version calculation.\"\"\"\n\n    version: str\n    npm_version: str\n    canonical: str\n    height: str\n    bump: str\n    previous_tag: str\n\n    def as_outputs(self) -> dict[str, str]:\n        return {","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/headroomlabs-ai/headroom/blob/322425c43bffde1ed0b64fecf3cf5951565dd82b/headroom/release_version.py#L50-L86","documentation":"Raised by SemVer.bump() when the level argument is anything other than 'major', 'minor', or 'patch'. The bump helper only implements the three standard increment strategies; anything else (including abbreviations or conventional-commit types like 'fix') is a programming error and fails fast.","triggerScenarios":"Calling version.bump('fix'), version.bump('MAJOR'), version.bump('pre'), or passing a conventional-commit type straight from a commit message into bump().","commonSituations":"Mapping conventional commit labels (feat/fix) directly to bump levels without translating to minor/patch; case sensitivity ('Major' fails); passing None or an empty string from an unset CI input.","solutions":["Translate conventional-commit types to bump levels: 'feat' -> 'minor', 'fix' -> 'patch', breaking change -> 'major'.","Use exactly the lowercase strings 'major', 'minor', or 'patch'.","Default unset CI inputs to 'patch' before calling bump()."],"exampleFix":"# before\nlevel = 'feat'\nnew_version = version.bump(level)\n\n# after\nlevel = {'feat': 'minor', 'fix': 'patch', 'break': 'major'}[commit_type]\nnew_version = version.bump(level)","handlingStrategy":"validation","validationCode":"BUMP_LEVELS = {'major', 'minor', 'patch'}\nCOMMIT_TO_BUMP = {'feat': 'minor', 'fix': 'patch', 'break': 'major'}\nlevel = COMMIT_TO_BUMP.get(commit_type, 'patch')\nassert level in BUMP_LEVELS","typeGuard":"def is_bump_level(level: str) -> bool:\n    return level in ('major', 'minor', 'patch')","tryCatchPattern":"try:\n    new_version = version.bump(level)\nexcept ValueError:\n    level = 'patch'  # or fail the release job explicitly\n    new_version = version.bump(level)","preventionTips":["Map conventional-commit types to bump levels explicitly; never pass them through.","Make the release level a required, validated CI input with allowed-values enum.","Cover bump level mapping with unit tests."],"tags":["versioning","release","validation"],"backgroundTag":null,"analyzedSha":"322425c43bffde1ed0b64fecf3cf5951565dd82b","analyzedAt":"2026-08-15T01:03:05.481Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}