fix(models): allow project variables in app commands
Metadata
Current evaluation
Allows well-formed ${SNAPCRAFT_*}/${CRAFT_*} project-variable references in app command fields by stripping them before snapd character validation; adds unit tests. Awaiting maintainer re-review after feedback.
Suggested action: needs review
Reason: The author's latest comment says the pattern now only matches ${SNAPCRAFT_*} and ${CRAFT_*}, with malformed cases added as tests, indicating prior feedback from @mr-cal was addressed. CI shows only the Canonical CLA check passing and no failing checks, but one unresolved review comment remains and full lint/test boxes are unchecked, so it is ready for maintainer re-review rather than immediate merge.
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| ~deepseek/deepseek-pro-latest |
Impact:
55
Quick Win:
25
Complexity:
30
Confidence:
75
Actionability:
65
|
needs review | Allows well-formed ${SNAPCRAFT_*}/${CRAFT_*} project-variable references in app command fields by stripping them before snapd character validation; adds unit tests. Awaiting maintainer re-review after feedback. | |
| ~deepseek/deepseek-pro-latest |
Impact:
58
Quick Win:
22
Complexity:
45
Confidence:
72
Actionability:
68
|
needs review | Allows well-formed ${VAR} project-variable references in app command fields by stripping them before snapd character validation; adds unit tests for valid and malformed braces. Awaiting maintainer review. | |
| stealth/space-bunny-alpha |
Impact:
50
Quick Win:
24
Complexity:
32
Confidence:
89
Actionability:
72
|
needs review | Strips well-formed ${VAR} references before validating four lifecycle commands and bus_name, restoring braced project-variable support while rejecting malformed references; ready for review. |
Update history
| Date | Change |
|---|---|
| updated | |
| updated | |
| created |
Related work
-
Caused By:
snapcraft#5500
(confidence 95%)
PR explicitly fixes #5500, the open regression report for braced project variables in app commands.
-
Related To:
snapcraft#5183
(confidence 90%)
PR body identifies #5183 as the merge that introduced the regression by widening the bus_name validator to command fields.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5500 Handle project variables with curly braces in app commands | snapcraft | open | Triaged regression: since Snapcraft 8.5.1 (merged via #5183), app commands containing braced project variables like ${SNAPCRAFT_PROJECT_NAME} fail validation. Root cause identified; volunteer ready to PR a fix. | |
| #5499 fix: evaluate variables in project file | snapcraft | merged | Merged in canonical/snapcraft#5499 (commit abd5db829), restoring project-variable expansion and fixing #5491 in Snapcraft 8.9.2. | |
| #5727 docs: document custom project vars (SNAPCRAFT-1053) | snapcraft | merged | Merged in canonical/snapcraft#5727 as cba259a0d, documenting custom project variables for SNAPCRAFT-1053 after the work moved from canonical/craft-parts#1216. |