fix: clean build provider when no parts are given
Metadata
Current evaluation
Merged. Refactors AppCommand.run_managed and adds ProviderService.clean_instances() to clean the build provider when no parts are provided. Routes cleanup via CLI args. Fixes #56 and increases coverage by 0.03%.
Suggested action: —
No scores available.
Issue body
This pull request has 3 commits because I had to do some refactoring on `AppCommand` to get this "hybrid" command to work:
- The first commit adds `ProviderService.clean_instances()`;
- The second commit refactors `AppCommand.run_managed` from a property to a regular method that receives the parsed cli arguments;
- The third commit hooks the first two by updating the `clean` command to call either `provider.clean_instances()` or `lifecycle.clean()` depending on the command line args.
Fixes #56
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Refactors AppCommand.run_managed and adds ProviderService.clean_instances() to clean the build provider when no parts are provided. Routes cleanup via CLI args. Fixes #56 and increases coverage by 0.03%. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into main, resolving issue #56. Introduces ProviderService.clean_instances(), refactors AppCommand.run_managed, and updates the clean command to handle missing parts. Achieved 100% diff coverage and a 0.03% overall coverage increase. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3284 build providers: rename clean() -> clean_parts() to clarify scope | snapcraft | merged | Merged into master. Renames build provider clean() to clean_parts() to clarify scope, as cleanup extends beyond parts. Approved by one reviewer with 100% diff coverage and zero unresolved comments. |