sanity checks: run properly on build VMs
Metadata
Current evaluation
Merged. Updated snap directory sanity checks from cwd-relative to project-relative paths to resolve build VM failures. Resolves LP: #1792962. Approved by one reviewer with 14 additions and 7 deletions across two files.
Suggested action: —
No scores available.
Issue body
The snapcraft CLI runs sanity checks. The check of the snap/ directory is currently relative to cwd, which breaks in build VMs. This PR fixes [LP: #1792962](https://bugs.launchpad.net/snapcraft/+bug/1792962) by making it relative to the project directory instead.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Updated snap directory sanity checks from cwd-relative to project-relative paths to resolve build VM failures. Resolves LP: #1792962. Approved by one reviewer with 14 additions and 7 deletions across two files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for sanity checks failing in build VMs. The snap/ directory validation previously used a path relative to the current working directory. Changed to project-relative paths, resolving LP: #1792962. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for sanity checks failing in build VMs. The snap directory check previously relied on the current working directory. Updated the path to be relative to the project directory, resolving LP: #1792962. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2919 sanity_checks: fix sanity check on Windows | snapcraft | merged | Merged fix for Windows sanity check failures in snap directory validation. Updated path checks to handle backslashes correctly. Approved by reviewers, passed CI, and integrated. | |
| #2268 sanity checks: allow snap/local dir | snapcraft | merged | Merged, enabling snap/local in sanity checks to resolve LP: #1792203. Approved after test fixes. Later comments requested allowing dotfiles and READMEs, but the core functionality was successfully integrated. | |
| #1792962 Sanity checks don't work in build VMs | snapcraft (launchpad) | closed | Abandoned. Build VM folder structure breaks sanity checks targeting the snap directory, but no fix or workaround was implemented. | |
| #2250 project_loader: add preflight check | snapcraft | merged | 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. |