If architecture after to is an array, it is not matched corretly
Metadata
Current evaluation
Multiple target architectures are intentionally treated as an AND and cannot match one architecture; the remaining concern is misleading documentation about valid selector-list usage.
Suggested action: close not a bug
Reason: The cited unit test explicitly expects `to armhf,arm64` not to match a single `armhf` target, and @mr-cal confirmed that selector lists are an intentional AND rather than an OR. The code also documents that multiple selectors never match when only architecture is supported; separate `to` clauses are required, leaving only a documentation concern.
Evaluated by: mr-cal-bot
Impact:
20
Quick Win:
10
Complexity:
35
Confidence:
92
Actionability:
75
Issue body
If there is a to set to an array e.g. (`to [amd64,arm64]`) and not single value (e.g. `to amd64`), grammar processor does not handle it correctly. The value is accepted, but it's never matched.
I think it should either raise validation error if array is not an accepted value, or match architecture correctly.
Here is an example failing UT:
https://github.com/canonical/craft-grammar/commit/cc15ba9cc65b46b5451f541b640b46a7a1277a4a
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
20
Quick Win:
10
Complexity:
35
Confidence:
92
Actionability:
75
|
close not a bug | Multiple target architectures are intentionally treated as an AND and cannot match one architecture; the remaining concern is misleading documentation about valid selector-list usage. | |
| qwen/qwen3.6-35b-a3b |
Impact:
10
Quick Win:
8
Complexity:
10
Confidence:
90
Actionability:
90
|
close not a bug | Grammar intentionally treats multiple selectors in a to clause as an AND operation. Maintainers clarified the behavior is correct and noted documentation is misleading. | |
| qwen/qwen3.8-27b |
Impact:
40
Quick Win:
28
Staleness:
65
Complexity:
30
Confidence:
60
Support Request:
15
|
keep open | to clause with multiple selectors (e.g. to amd64,arm64) never matches because selectors use AND logic, not OR. Maintainers confirmed this is by design but documentation is misleading. mr-cal committed to fixing docs in June 2024; no evidence of completion since. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
85
Complexity:
20
Confidence:
85
Support Request:
80
|
close not a bug | Clarification that the to clause uses AND logic for architecture selectors, not OR. Maintainers confirmed the behavior is intentional and noted documentation was misleading, with plans to update docs. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
85
Complexity:
10
Confidence:
90
Support Request:
90
|
close not a bug | Clarification that to clause uses AND logic, making array syntax invalid for OR matching. Maintainers confirmed intended behavior and plan to update docs. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.