A snapcraft.yaml with more than 1 after: stanza doesn't warn or error
Metadata
Current evaluation
Snapcraft silently accepted multiple after: stanzas in a part, using the last one. Fixed: duplicate-key detection in yaml_utils now raises an error for any repeated key, including after:. Issue is stale (8+ years, no activity) but the underlying problem is resolved in current code.
Suggested action: close stale
Reason: The issue is 3036 days old with zero comments and no maintainer interaction. However, the underlying problem has been fixed: commit a40a34314 (parts: raise error when duplicate keys are used) added _check_duplicate_keys to snapcraft/parts/yaml_utils.py, which raises a ConstructorError for any repeated key in a mapping — including a second after: stanza. PR #3518 (yaml: detect and log warning on duplicate keys in snapcraft.yaml, CRAFT-553) was merged into master, confirming the feature was implemented. The issue is no longer reproducible in current versions, so it should be closed as resolved.
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
40
Quick Win:
32.0
Staleness:
85
Complexity:
20
Confidence:
80
Support Request:
10
|
close stale | Snapcraft silently accepted multiple after: stanzas in a part, using the last one. Fixed: duplicate-key detection in yaml_utils now raises an error for any repeated key, including after:. Issue is stale (8+ years, no activity) but the underlying problem is resolved in current code. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
15
Confidence:
80
Support Request:
10
|
close stale | Snapcraft silently accepts multiple after: stanzas in a part, using the last one without warning or error. Untriaged, inactive for over 8 years. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
10
Confidence:
85
Support Request:
5
|
needs triage | Snapcraft silently accepts duplicate after stanzas in a part, using the last one without warning or error. Open for over 8 years with no maintainer response or labels. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
100
Complexity:
15
Confidence:
80
Support Request:
10
|
close stale | Snapcraft silently accepts multiple after: stanzas in a single part, using the last one without warning or error. Issue is completely inactive for over 8 years with no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
100
Complexity:
30
Confidence:
90
Support Request:
10
|
close stale | Snapcraft silently accepts duplicate after: stanzas in a part, using the last declared value without warning or error. The report remains open, untriaged, and inactive with zero comments. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/snapcraft#3518
(confidence 85%)
Merged PR adding duplicate-key detection and warning for snapcraft.yaml (CRAFT-553). The _check_duplicate_keys function in yaml_utils.py now raises an error for any repeated mapping key, which would catch a duplicate after: stanza.
-
Related To:
canonical/snapcraft#3517
(confidence 60%)
Earlier closed PR attempting the same duplicate-key detection; superseded by #3518 which was merged.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1826753 Snapcraft should complain multiple `after` properties in a single part | snapcraft (launchpad) | open | Request for snapcraft to error on duplicate 'after' YAML keys in a part definition. 7+ years old, zero comments, no labels, no maintainer interaction. References snapcraftctl and old part format that no longer exist in modern snapcraft. |