refactor: migrate validate command
Metadata
Current evaluation
Merged PR #6208 as commit b1722e816, moving gated into the modern validations commands and migrating validate from snapcraft_legacy with a new Pydantic assertion model.
Resolution: closed resolved
Reason: PR #6208 was approved and merged as commit b1722e816. It reorganized gated commands, completed validate's migration from snapcraft_legacy, and added ValidationAssertion.
Evaluated by: mr-cal-bot
No scores available.
Issue body
2 refactors:
1. Re-organize the `gated` command from `snapcraft/commands/validation_sets` to `snapcraft/commands/validations`. This fixes a misorganization I made in #6145.
2. Migrate the `validate` command from `snapcraft_legacy`. Doing this properly required a new Pydantic model. Validation assertions fit in nicely with the other assertion code in modern Snapcraft.
### Background
Because it's not very clear in the code or docs, this table explains what the gated and validate commands do compared to the other assertions we work with in Snapcraft:
| assertion type | list command | edit command |
| - | - | - |
| validation sets | `validation-sets` | `edit-validation-sets` |
| confdb schemas | `confdb-schemas` | `edit-confdb-schemas` |
| validations | `gated` | `validate` |
(SNAPCRAFT-1318)
---
- [x] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md).
- [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [x] I've successfully run `make lint && make test`.
- [ ] I've added or updated any relevant documentation.
- [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing.
- [ ] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #6208 as commit b1722e816, moving gated into the modern validations commands and migrating validate from snapcraft_legacy with a new Pydantic assertion model. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in #6208 as b1722e816: moved gated commands to validations and migrated validate from snapcraft_legacy, adding a Pydantic validation-assertion model. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged via squash. Refactored the gated command and migrated the validate command from legacy to modern Snapcraft, implementing a new Pydantic model for validation assertions across 21 files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a squashed pull request migrating the validate command from snapcraft_legacy to modern Snapcraft using a new Pydantic model. Also reorganizes the gated command to the correct directory, resolving a prior misplacement. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/snapcraft#6145
(confidence 95%)
The earlier change introduced the command misorganization corrected by this PR.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #6145 refactor: migrate gated command | snapcraft | merged | Merged PR #6145 as commit 21091b932, migrating the gated command from snapcraft_legacy and resolving SNAPCRAFT-1314. | |
| #849 Bugfixes for gated and validate commands | snapcraft | merged | Merged as commit 35b7da734, fixing LP #1629991 by handling snaps without validations and refining validate command behavior. |