feat: add inheritance-based validation and schemas
Metadata
Current evaluation
Merged as commit 7cfb25977, adding inheritance-based pydantic validation and JSON schema generation (tools/schema.py, snapcraft/models/project.py) for snapcraft.yaml, closing issue #5543.
Resolution: closed resolved
Reason: PR #5730 was approved by two reviewers and merged to main as commit 7cfb25977 ("feat: add inheritance-based validation and schemas (#5730)"), adding SnapcraftProject submodels, schema generation and validate-schema/diff-schema CI jobs. It fixed issue #5543, and its 8.13.0 rollout was later reverted by #5857 due to model-selection regressions, with those fixed in #5846 (3249bed8e).
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as commit 7cfb25977, adding inheritance-based pydantic validation and JSON schema generation (tools/schema.py, snapcraft/models/project.py) for snapcraft.yaml, closing issue #5543. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #5730 (commit 7cfb25977), introducing inheritance-based project validation and generated JSON schemas, splitting the monolithic model, and fixing #5543. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged as #5730 (commit 7cfb25977), introducing inheritance-based project validation and generated schemas, refactoring monolithic models into specialized submodels. Closes #5543. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in #5730 (commit 7cfb25977), adding inheritance-based project validation and generated JSON schemas; it fixes #5543 and addresses reviewer feedback. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Introduces inheritance-based project validation and automated schema generation by refactoring monolithic models into specialized submodels. Incorporates reviewer feedback, updates test fixtures, and resolves transient CI failures. Closes #5543. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged feature adding inheritance-based project validation and schema generation, resolving #5543. Reviewers dismissed unrelated test failures as network issues. Author incorporated feedback and completed the merge. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/snapcraft#5846
(confidence 80%)
Follow-up fix merged as 3249bed8e correcting model selection introduced by this PR's changes.
-
Caused By:
canonical/snapcraft#5857
(confidence 70%)
Reverted the project model changes from this PR for 8.13.0; re-applied later in 063c3c89e.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3633 projects: add project model and validation (CRAFT-763) | snapcraft | merged | Merged PR #3633 as d6636e12c, adding Pydantic models and validators for snapcraft.yaml, tests, and a package layout change to avoid cyclic imports. | |
| #3654 projects: add grammar validation | snapcraft | merged | Merged #3654 via commit 17fcb85f8, validating snapcraft.yaml with craft-grammar Pydantic models before processing grammar-aware properties. | |
| #781 feat: JSON schema generation for parts | craft-parts | merged | Merged JSON Schema generation for parts in commit 09a99811, adding Pydantic-based schemas and tests after prerequisite #778. | |
| #419 Properly validate the schema | snapcraft | merged | Merged PR #419 in commit 116352b7d, refactoring schema validation to remove duplicated logic from snapcraft.yaml and fixing autopackage tests. | |
| #1806055 Snapcraft schema validation with bases | snapcraft (launchpad) | closed | Fixed by snapcore/snapcraft#2473, merged as 3f7d63cdf, which improved Go/Python plugin schema validation and covered no-op part configurations. | |
| #5924 docs: clean up 'snapcraft.yaml' | snapcraft | merged | Merged snapcraft.yaml documentation cleanup in #5924 via commit 83f961ebc, upgrading pydantic-kitbash, correcting docstrings and links, and regenerating the JSON schema. |