← Back to issue list

refactor: Align build-for: all validation rules in charm build planner

View original Github issue

Metadata

Project
craft-platforms
Number
#234
Type
issue
State
open
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Refactor charm build planner to validate build-for: all usage consistently with default build planner

Suggested action: needs triage

Reason: The issue is well-structured and actionable, but has no labels, no maintainer response, and no assignee. It needs to be triaged by the team to prioritize and assign it. The validation logic already exists in _platforms.py (_validate_build_for_all) with corresponding error classes in _errors.py, making this a clear refactoring task.

Impact: 60 Quick Win: 36.0 Staleness: 60 Complexity: 40 Confidence: 75 Support Request: 10

Issue body

The default build planner (`get_platforms_build_plan` in `craft_platforms/_platforms.py`) has robust validation to prevent invalid configuration of `build-for: all` across multiple platforms. However, the charm-specific build planner (`get_platforms_charm_build_plan` in `craft_platforms/charm/_build.py`) does not validate if `build-for: all` is used in multiple platform configurations, which can lead to invalid build plans being generated without throwing errors early. We should implement similar checks in the charm build planner (or extract the check from `_platforms.py` to a shared validator) to ensure consistency in how architecture-independent targets are handled.

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6
Impact: 60
Quick Win: 36.0
Staleness: 60
Complexity: 40
Confidence: 75
Support Request: 10
needs triage Refactor charm build planner to validate build-for: all usage consistently with default build planner
qwen/qwen3.6-35b-a3b
Staleness: 45
Complexity: 20
Confidence: 90
Support Request: 5
needs triage Missing validation in charm build planner for build-for: all across multiple platforms. Currently unlabelled and inactive since submission.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 30
Confidence: 85
Support Request: 0
needs triage Missing validation for build-for: all across multiple platforms in the charm build planner. Currently unlabelled and unaddressed, requiring implementation of shared validation logic.
qwen3.6-35b-a3b-mtp-q6
Staleness: 10
Complexity: 30
Confidence: 85
Support Request: 0
needs triage Refactor to align build-for: all validation rules between the default and charm build planners. Currently unlabelled and awaiting triage.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.