Repository navigation
Description
Bug Description
specify extension search and specify extension info read a catalog entry's name, version and description by indexing (src/specify_cli/extensions/command_search.py:48-49, src/specify_cli/extensions/command_info.py:167,172). Catalog entries aren't validated field by field; _get_merged_extensions keeps them on purpose so that "one malformed entry shouldn't poison an otherwise valid catalog" (src/specify_cli/extensions/__init__.py:4826-4832). So an entry without one of those fields makes both commands exit with a raw KeyError. Search stops at that entry, and the extensions listed after it are never shown.
This is the display-side sibling of #5082, which extension update hit for a missing version (fixed in #5108).
Steps to Reproduce
In a project, seed the extension catalog cache with one incomplete entry and one complete one, then search. No network request is made.
specify init --here --integration cline --script sh --ignore-agent-tools --non-interactive
export SPECKIT_CATALOG_URL=https://raw.githubusercontent.com/github/spec-kit/main/extensions/catalog.json
mkdir -p .specify/extensions/.cache
cat > .specify/extensions/.cache/catalog.json <<'EOF'
{"schema_version": "1.0", "extensions": {
"example": {"name": "Example", "description": "Example extension", "author": "QA"},
"healthy": {"name": "Healthy", "version": "2.0.0", "description": "A usable entry", "author": "QA"}
}}
EOF
printf '{"cached_at": "%s", "catalog_url": "%s"}' "$(date -u +%Y-%m-%dT%H:%M:%S+00:00)" "$SPECKIT_CATALOG_URL" \
> .specify/extensions/.cache/catalog-metadata.json
specify extension search
specify extension info exampleDropping name or description from example instead of version fails the same way.
Expected Behavior
Both entries are listed, and info example shows the entry. A missing version reads unknown, as extension add and info for an installed extension already show it.
Actual Behavior
Both commands exit 1. Search prints Found 2 extension(s): and then the traceback, without either entry.
| Entry is missing | extension search |
extension info example |
|---|---|---|
version |
exit 1, KeyError: 'version' |
exit 1, KeyError: 'version' |
name |
exit 1, KeyError: 'name' |
exit 1, KeyError: 'name' |
description |
exit 1 after the Example (v1.0.0) header, KeyError: 'description' |
same |
Specify CLI Version
1.3.3.dev0 (main at c438494)
AI Agent
Not applicable (CLI catalog commands)
Operating System
Debian 12 (Linux 6.17)
Python Version
3.13
Error Logs
KeyError: 'version'
Additional Context
The docs list name, version and description as required catalog fields (docs/extensions/catalogs.md), but nothing enforces that when a catalog is read, and team catalogs added with specify catalog add aren't checked by the community submission workflow.
AI Disclosure
Found by Codex CLI (model: gpt-6.1-sol, reasoning effort xhigh, autonomous, offline sandbox) while checking catalog readers next to #5108. Claude Code (model: claude-opus-5-5, autonomous) reproduced it with the real CLI and drafted this issue on behalf of @kartsan03.
Activity