← 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

Charm build planning lacks the default planner's build-for: all validation, allowing inconsistent architecture-independent plans; this maintainer-authored refactor remains open.

Suggested action: keep open

Reason: The charm planner rejects build-on: all but returns its accumulated plan without calling _validate_build_for_all, while the default planner does call that helper and matching error classes and tests already exist. Existing multi-base charm tests intentionally accept build-for: all for Jammy and Noble, so implementation should define validation per base and add regression coverage; the work is valid and maintainer-authored but needs that semantic detail handled carefully.

Evaluated by: mr-cal-bot

Impact: 48 Quick Win: 22 Complexity: 42 Confidence: 93 Actionability: 78

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
stealth/space-bunny-alpha
Impact: 48
Quick Win: 22
Complexity: 42
Confidence: 93
Actionability: 78
keep open Charm build planning lacks the default planner's build-for: all validation, allowing inconsistent architecture-independent plans; this maintainer-authored refactor remains open.
stealth/space-bunny-alpha
Impact: 38
Quick Win: 23
Complexity: 30
Confidence: 96
Actionability: 88
keep open Charm build planning lacks the default planner’s build-for: all consistency checks, allowing invalid architecture-independent plans; this maintainer-authored refactor remains open.
stealth/space-bunny-alpha
Impact: 45
Quick Win: 27
Complexity: 30
Confidence: 96
Actionability: 85
needs triage The charm planner accepts invalid build-for: all combinations and lacks the default planner’s validation; a shared-validator approach is proposed, but the issue remains untriaged.
qwen3.6-35b-a3b-mtp-q6
Impact: 60
Quick Win: 36
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.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#79 Unify charm build planner with default build planner craft-platforms open Maintainer-authored refactor to consolidate the separate charm planner into the default planner. Implicit build-for parity now exists, but multi-base semantics still differ.
75%