feat(loader): strengthen manifest validation at parse time #388

Open
opened 2026-03-03 23:03:25 +00:00 by forbes · 0 comments
Owner

Summary

Catch addon misconfiguration early by validating manifest semantics at parse time, not just structural checks.

Current state (PARTIAL)

validate_manifest() checks version bounds, path existence, and Init.py/InitGui.py presence. Dependency resolution validates that declared deps are in the discovered set (unknown deps -> SKIPPED). Missing:

  • No syntax validation of <contexts> IDs (should be alphanumeric + dots)
  • No schema validation of package.xml fields
  • No field type checking (e.g., load_priority should be int)
  • Errors reported one at a time instead of all at once

Scope

  • Validate <contexts> IDs are syntactically correct (alphanumeric + dots)
  • Validate <dependencies> against all discovered addon names at scan time (before load)
  • Validate field types: load_priority as int, version strings as semver-like
  • Accumulate all validation errors and report in a single pass
  • Log a clear summary of which addons failed validation and why

Implementation notes

  • Extend validate_manifest() in src/Mod/Create/addon_loader.py
  • Add a ValidationError list on the manifest object
  • Run all validators before deciding SKIPPED/FAILED state

Roadmap

v0.2.0 — Addon Loader

## Summary Catch addon misconfiguration early by validating manifest semantics at parse time, not just structural checks. ## Current state (PARTIAL) `validate_manifest()` checks version bounds, path existence, and Init.py/InitGui.py presence. Dependency resolution validates that declared deps are in the discovered set (unknown deps -> SKIPPED). Missing: - No syntax validation of `<contexts>` IDs (should be alphanumeric + dots) - No schema validation of package.xml fields - No field type checking (e.g., `load_priority` should be int) - Errors reported one at a time instead of all at once ## Scope - Validate `<contexts>` IDs are syntactically correct (alphanumeric + dots) - Validate `<dependencies>` against all discovered addon names at scan time (before load) - Validate field types: `load_priority` as int, version strings as semver-like - Accumulate all validation errors and report in a single pass - Log a clear summary of which addons failed validation and why ## Implementation notes - Extend `validate_manifest()` in `src/Mod/Create/addon_loader.py` - Add a `ValidationError` list on the manifest object - Run all validators before deciding SKIPPED/FAILED state ## Roadmap v0.2.0 — Addon Loader
forbes added the enhancement label 2026-03-03 23:03:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#388