{"record":{"id":"84d7dc42abb40187","repo":"github/spec-kit","slug":"invalid-version-pack-version","errorCode":null,"errorMessage":"Invalid version: {pack['version']}","messagePattern":"Invalid version: (.+?)","errorType":"validation","errorClass":"PresetValidationError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/presets/__init__.py","lineNumber":358,"sourceCode":"                raise PresetValidationError(f\"Missing preset.{field}\")\n            if not isinstance(pack[field], str):\n                raise PresetValidationError(\n                    f\"Invalid preset.{field}: expected a string, \"\n                    f\"got {type(pack[field]).__name__}\"\n                )\n\n        # Validate pack ID format\n        if not re.match(r'^[a-z0-9-]+$', pack[\"id\"]):\n            raise PresetValidationError(\n                f\"Invalid preset ID '{pack['id']}': \"\n                \"must be lowercase alphanumeric with hyphens only\"\n            )\n\n        # Validate semantic version\n        try:\n            pkg_version.Version(pack[\"version\"])\n        except pkg_version.InvalidVersion:\n            raise PresetValidationError(f\"Invalid version: {pack['version']}\")\n\n        # Validate requires section\n        requires = self.data[\"requires\"]\n        if \"speckit_version\" not in requires:\n            raise PresetValidationError(\"Missing requires.speckit_version\")\n        # Presence alone is not enough: check_compatibility() feeds this value to\n        # ``SpecifierSet(required)``, guarded only by ``except InvalidSpecifier``,\n        # which a non-string escapes two different ways. A float/int/bool/None\n        # raises TypeError from the constructor, while a list or dict is an\n        # *iterable*, so SpecifierSet accepts it and the failure surfaces much\n        # later as ``AttributeError: 'str' object has no attribute 'filter'`` from\n        # inside .contains(). Neither is a PresetCompatibilityError, so both\n        # bypass the CLI's \"Compatibility Error\" handler and exit 1 with a raw\n        # traceback naming no field. An unquoted ``speckit_version: 1.0`` is an\n        # easy YAML slip. Mirrors the sibling IntegrationDescriptor, which already\n        # requires a non-empty string here.\n        if (\n            not isinstance(requires[\"speckit_version\"], str)","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/presets/__init__.py#L340-L376","documentation":"Error \"Invalid version: {pack['version']}\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/presets/__init__.py:358 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set preset version to a valid semantic version string."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}