Skip to content

fix(extensions): skip non-UTF-8 catalog responses - #5196

Merged
mnriem merged 1 commit into
github:mainfrom
chelsealong:fix/codex-spec-kit-5195
Oct 30, 2026
Merged

mnriem merged 1 commit into
github:mainfrom
chelsealong:fix/codex-spec-kit-5195

Conversation

@chelsealong

Copy link
Copy Markdown
Contributor

Description

Fixes #5195. Convert a catalog response’s UTF-8 decode error to ExtensionError so a corrupt source warns and the merge continues with healthy sources. When every source fails, the existing error remains.

Testing

  • The new regression test failed before the source change and passed afterward.
  • .venv/bin/python -m pytest tests/test_extensions.py -q — 495 passed.
  • .venv/bin/specify --help — passed.
  • Ruff checks for E4, E7, E9, and F passed; git diff --check passed. The broader Ruff check reported 237 findings outside the changed lines.

AI Disclosure

  • I did use AI assistance.

AI disclosure: Codex (GPT-6, default reasoning effort, autonomous) generated the code and test and ran validation. No human review or testing is claimed.

@chelsealong
chelsealong requested a review from mnriem as a code owner October 30, 2026 02:35
@mnriem mnriem added the triage-must-have Verdict: high-value, important work for Spec Kit — do first label Oct 30, 2026
@mnriem
mnriem requested an auto review from Copilot October 30, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the change to handle malformed catalog responses while preserving healthy sources.

No open issues 🎉

What changed in this PR

Fixes #5195 by converting non-UTF-8 extension catalog responses into ExtensionError, allowing the existing merge logic to warn and continue with healthy sources.

Changes:

  • Handles UTF-8 decoding failures alongside invalid JSON.
  • Adds regression coverage for both malformed response types, verifying healthy catalogs remain available and all-source failures still raise the existing error.

The PR reports that the regression test failed before the fix and passed afterward; this comparison was not independently rerun.

File Description
tests/​test_extensions.py Tests malformed-source skipping, warnings, and all-source failure behavior.
src/​specify_cli/​extensions/​__init__.py Converts catalog decoding failures into the existing catalog error type.

Review effort: Balanced (auto)

@mnriem
mnriem merged commit 034937f into github:main Oct 30, 2026
16 checks passed
@mnriem

mnriem commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-must-have Verdict: high-value, important work for Spec Kit — do first

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-UTF-8 extension catalog aborts the whole merge

3 participants