{"record":{"id":"294b72ad24e08581","repo":"github/spec-kit","slug":"corrupt-records-file-component-kind-must-be-one","errorCode":null,"errorMessage":"Corrupt records file: component 'kind' must be one of {list(COMPONENT_KINDS)}, got {kind or '<missing>'!r}.","messagePattern":"Corrupt records file: component 'kind' must be one of (.+?), got (.+?)\\.","errorType":"exception","errorClass":"BundlerError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/bundler/models/records.py","lineNumber":207,"sourceCode":"    data: dict[str, Any] = {\"kind\": ref.kind, \"id\": ref.id}\n    if ref.version is not None:\n        data[\"version\"] = ref.version\n    if ref.source is not None:\n        data[\"source\"] = ref.source\n    if ref.priority is not None:\n        data[\"priority\"] = ref.priority\n    if ref.strategy is not None:\n        data[\"strategy\"] = ref.strategy\n    return data\n\n\ndef _component_from_dict(data: Any) -> ComponentRef:\n    if not isinstance(data, dict):\n        raise BundlerError(\"Each contributed component must be a mapping.\")\n    kind = str(data.get(\"kind\", \"\")).strip()\n    cid = str(data.get(\"id\", \"\")).strip()\n    if kind not in COMPONENT_KINDS:\n        raise BundlerError(\n            f\"Corrupt records file: component 'kind' must be one of \"\n            f\"{list(COMPONENT_KINDS)}, got {kind or '<missing>'!r}.\"\n        )\n    if not cid:\n        raise BundlerError(\n            \"Corrupt records file: a contributed component is missing its 'id'.\"\n        )\n    return ComponentRef(\n        kind=kind,\n        id=cid,\n        version=(str(data[\"version\"]) if data.get(\"version\") else None),\n        source=(str(data[\"source\"]) if data.get(\"source\") else None),\n        priority=_parse_priority(data.get(\"priority\")),\n        strategy=(str(data[\"strategy\"]) if data.get(\"strategy\") else None),\n    )\n\n\ndef _parse_priority(raw: Any) -> int | None:","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/bundler/models/records.py#L189-L225","documentation":"Error \"Corrupt records file: component 'kind' must be one of {list(COMPONENT_KINDS)}, got {kind or '<missing>'!r}.\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/bundler/models/records.py:207 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the component 'kind' in the records file to one of the supported COMPONENT_KINDS values, or reinstall the bundle to regenerate valid records."],"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"}