project_loader: add preflight check
Metadata
Current evaluation
Merged PR #2250 as 0912e976c, adding project sanity checks that reject unexpected files in the snap directory and fix LP #1791368.
Resolution: closed resolved
Reason: PR #2250 was approved and merged as commit 0912e976c. Its preflight sanity check prevents builds when the snap directory contains unexpected files, resolving LP #1791368.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh tests/unit`?
-----
This is a mechanism that can be used for further quick sanity checks, but currently the only one implemented is ensuring that the snap directory doesn't include unexpected things, which makes this PR fix [LP: #1791368](https://bugs.launchpad.net/snapcraft/+bug/1791368).
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2250 as 0912e976c, adding project sanity checks that reject unexpected files in the snap directory and fix LP #1791368. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in #2250 as commit 0912e976c, adding project sanity checks that reject unexpected files in the snap directory and fix LP #1791368. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Adds a preflight check to validate snap directory contents, resolving LP #1791368. Implementation refactored into snapcraft.project as project sanity checks, retained in cli.lifecycle. Approved and merged after code review. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Added a preflight check to validate snap directory contents. Refactored into snapcraft.project as project sanity checks. Fixes LP: #1791368. One test failure was linked to an unrelated LXD issue. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1791368 Warn when unexpected things are in the snap dir | snapcraft (launchpad) | closed | Snapcraft added a preflight check in merged PR #2250 (commit 0912e976c), rejecting unexpected files under snap/ and resolving LP #1791368. |