github/spec-kit · error · BundlerError
provides.{kind} priority must be an integer, got {raw!r}.
Error message
provides.{kind} priority must be an integer, got {raw!r}. What it means
Raised by the manifest helper _parse_priority when a 'provides.<kind>' entry's 'priority' field is present but is not coercible to an integer — specifically when it is a bool (explicitly rejected because bool is an int subclass in Python) or any type other than int or str. The message includes the offending value for quick diagnosis.
Source
Thrown at src/specify_cli/bundler/models/manifest.py:280
priority = _parse_priority(kind, item.get("priority"))
refs.append(
ComponentRef(
kind=kind,
id=_text(item.get("id")),
version=(str(item["version"]).strip() if item.get("version") else None),
source=(str(item["source"]).strip() if item.get("source") else None),
priority=priority,
strategy=(str(item["strategy"]).strip() if item.get("strategy") else None),
)
)
return refs
def _parse_priority(kind: str, raw: Any) -> int | None:
if raw is None:
return None
if isinstance(raw, bool) or not isinstance(raw, (int, str)):
raise BundlerError(
f"provides.{kind} priority must be an integer, got {raw!r}."
)
try:
return int(raw)
except (TypeError, ValueError):
raise BundlerError(
f"provides.{kind} priority must be an integer, got {raw!r}."
) from None
View on GitHub (pinned to bf88c9f9a8)
Solutions
- Set priority to an integer (e.g. 10) or an integer-valued string ('10').
- Remove the 'priority' key to accept the default (None).
- Never use true/false for priority — pick a numeric scale.
Example fix
# before (bundle.yml)
provides:
skills:
- id: my-skill
priority: true
# after
provides:
skills:
- id: my-skill
priority: 10 Defensive patterns
Strategy: validation
Validate before calling
def priority_type_ok(raw: object) -> bool:
return raw is None or (not isinstance(raw, bool) and isinstance(raw, (int, str))) Type guard
def is_valid_priority(raw: object) -> bool:
if raw is None:
return True
if isinstance(raw, bool) or not isinstance(raw, (int, str)):
return False
try:
int(raw)
return True
except (TypeError, ValueError):
return False Try / catch
try:
manifest = BundleManifest.from_file(p)
except BundlerError as e:
if "priority must be an integer" in str(e):
# replace bool/float priority with int, or drop the key
... Prevention
- Priority is int-only; booleans and floats are rejected by design.
- Omit 'priority' to use the default ordering.
When it happens
Trigger: A component entry contains 'priority: true'/'priority: false', 'priority: 1.5' (float), or 'priority: null'-like mapping values; _parse_priority's first isinstance guard fires before int() conversion is attempted.
Common situations: Using a boolean as a 'high priority' flag; YAML auto-parsing a quoted number incorrectly; floats from priority weights copied from another tool.
Related errors
- Manifest must be a YAML mapping at the top level.
- Manifest is missing the required 'bundle' mapping.
- 'requires' must be a mapping when present.
- 'integration' must be a mapping when present.
- 'provides' must be a mapping when present.
AI-assisted analysis of github/spec-kit@bf88c9f9a8 (2026-08-14).
Data as JSON: /api/errors/988815a4f94c9236.
Report an issue: GitHub.