{"record":{"id":"d745550b3d5daae5","repo":"github/spec-kit","slug":"unsupported-schema-version-self-data-schema-ver","errorCode":null,"errorMessage":"Unsupported schema version: {self.data['schema_version']} (expected {self.SCHEMA_VERSION})","messagePattern":"Unsupported schema version: (.+?) \\(expected (.+?)\\)","errorType":"validation","errorClass":"ValidationError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/extensions/__init__.py","lineNumber":271,"sourceCode":"            )\n        except OSError as e:\n            raise ValidationError(f\"Could not read manifest {path}: {e}\")\n        if not isinstance(data, dict):\n            raise ValidationError(\n                f\"Manifest must be a YAML mapping, got {type(data).__name__}: {path}\"\n            )\n        return data\n\n    def _validate(self):\n        \"\"\"Validate manifest structure and required fields.\"\"\"\n        # Check required top-level fields\n        for field in self.REQUIRED_FIELDS:\n            if field not in self.data:\n                raise ValidationError(f\"Missing required field: {field}\")\n\n        # Validate schema version\n        if self.data[\"schema_version\"] != self.SCHEMA_VERSION:\n            raise ValidationError(\n                f\"Unsupported schema version: {self.data['schema_version']} \"\n                f\"(expected {self.SCHEMA_VERSION})\"\n            )\n\n        # The REQUIRED_FIELDS loop above only checks key PRESENCE, so a section\n        # that is written but left empty (``provides:`` -> None) or given the\n        # wrong shape (``provides: []``) passes it and then fails on first use:\n        # ``field not in None`` raises TypeError and ``None.get(...)`` raises\n        # AttributeError. Neither is a ValidationError, so both escape the\n        # callers that already handle malformed manifests -- list_installed()'s\n        # \"Corrupted extension\" fallback catches ValidationError only, so one bad\n        # extension made ``specify extension list`` exit 1 with a raw\n        # AttributeError instead of listing the rest. Guard each required\n        # section's shape, mirroring the nested guards below (\"Invalid\n        # provides.commands: expected a list\", \"Invalid hooks: expected a\n        # mapping\") and _load_yaml's document-root check.\n\n        # Validate extension metadata","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/extensions/__init__.py#L253-L289","documentation":"Manifest declares a schema_version that does not equal the SCHEMA_VERSION this installed specify_cli supports. The check is strict equality, so both older and newer versions are rejected; the message shows found vs expected.","triggerScenarios":"Manifest has `schema_version: 1` while the installed CLI expects 2, or `schema_version: 3` from a newer Specify release; _validate() compares self.data['schema_version'] != self.SCHEMA_VERSION and raises.","commonSituations":"Using an extension authored for a different Spec Kit release; upgrading/downgrading the specify CLI without refreshing installed extensions; hand-writing manifests and guessing the version number.","solutions":["Set schema_version in the manifest to exactly the expected value shown in the error.","Update the extension from its source (it may have a version for your CLI release) or update the CLI to match the extension.","Check the CHANGELOG/release notes for breaking manifest schema changes before hand-editing."],"exampleFix":"# before\nschema_version: 1\nextension:\n  id: my-ext\n\n# after\nschema_version: 2\nextension:\n  id: my-ext","handlingStrategy":"validation","validationCode":"from specify_cli.extensions import ExtensionManifest  # SCHEMA_VERSION constant\nif data.get(\"schema_version\") != ExtensionManifest.SCHEMA_VERSION:\n    raise SystemExit(f\"set schema_version to {ExtensionManifest.SCHEMA_VERSION}\")","typeGuard":null,"tryCatchPattern":"except ValidationError as e:\n    if \"Unsupported schema version\" in str(e):\n        pin_or_upgrade_cli_to_match_extension()","preventionTips":["Pin the specify CLI version your extensions were authored against.","After CLI upgrades, re-verify all installed extension manifests."],"tags":["manifest","schema-version","versioning","extensions"],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}