github/spec-kit · error · BundlerError

Corrupt records file: component 'kind' must be one of {list(

Error message

Corrupt records file: component 'kind' must be one of {list(COMPONENT_KINDS)}, got {kind or '<missing>'!r}.

What it means

Error "Corrupt records file: component 'kind' must be one of {list(COMPONENT_KINDS)}, got {kind or '<missing>'!r}." thrown in github/spec-kit.

Source

Thrown at src/specify_cli/bundler/models/records.py:207

    data: dict[str, Any] = {"kind": ref.kind, "id": ref.id}
    if ref.version is not None:
        data["version"] = ref.version
    if ref.source is not None:
        data["source"] = ref.source
    if ref.priority is not None:
        data["priority"] = ref.priority
    if ref.strategy is not None:
        data["strategy"] = ref.strategy
    return data


def _component_from_dict(data: Any) -> ComponentRef:
    if not isinstance(data, dict):
        raise BundlerError("Each contributed component must be a mapping.")
    kind = str(data.get("kind", "")).strip()
    cid = str(data.get("id", "")).strip()
    if kind not in COMPONENT_KINDS:
        raise BundlerError(
            f"Corrupt records file: component 'kind' must be one of "
            f"{list(COMPONENT_KINDS)}, got {kind or '<missing>'!r}."
        )
    if not cid:
        raise BundlerError(
            "Corrupt records file: a contributed component is missing its 'id'."
        )
    return ComponentRef(
        kind=kind,
        id=cid,
        version=(str(data["version"]) if data.get("version") else None),
        source=(str(data["source"]) if data.get("source") else None),
        priority=_parse_priority(data.get("priority")),
        strategy=(str(data["strategy"]) if data.get("strategy") else None),
    )


def _parse_priority(raw: Any) -> int | None:

View on GitHub (pinned to bf88c9f9a8)

Solutions

  1. Set the component 'kind' in the records file to one of the supported COMPONENT_KINDS values, or reinstall the bundle to regenerate valid records.

When it happens

Trigger: Thrown at src/specify_cli/bundler/models/records.py:207 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of github/spec-kit@bf88c9f9a8 (2026-08-14). Data as JSON: /api/errors/294b72ad24e08581. Report an issue: GitHub.