Skip to content

refactor: migrate ExtensionCatalog to shared catalog stack base#2576

Open
WOLIKIMCHENG wants to merge 1 commit into
github:mainfrom
WOLIKIMCHENG:refactor-extension-catalog-stack
Open

refactor: migrate ExtensionCatalog to shared catalog stack base#2576
WOLIKIMCHENG wants to merge 1 commit into
github:mainfrom
WOLIKIMCHENG:refactor-extension-catalog-stack

Conversation

@WOLIKIMCHENG
Copy link
Copy Markdown
Contributor

Summary

  • Migrate ExtensionCatalog to inherit CatalogStackBase
  • Remove duplicate extension catalog URL validation and YAML stack parsing
  • Preserve extension catalog source ordering and public CatalogEntry import compatibility
  • Add focused tests for malformed extension catalog config hardening

Behavior Notes

Valid extension catalog configs should behave the same. Malformed configs now align with shared base behavior:

  • non-mapping YAML roots raise ValidationError
  • boolean priorities are rejected
  • blank/null names normalize to catalog-N
  • invalid catalog URLs include config path and entry index context

Tests

  • uv run --with ruff ruff check src/specify_cli/extensions.py tests/test_extensions.py
    • Passed: all checks passed
  • Focused pytest selection for extension catalog stack, ExtensionCatalog, CLI path output, update hardening, and touched remediation test
    • Passed: 49 passed

Closes #2437

@WOLIKIMCHENG WOLIKIMCHENG requested a review from mnriem as a code owner May 15, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(catalogs): reduce duplicated catalog stack handling

1 participant