`charmcraft pack` fails with a false positive on the summary check
Metadata
Current evaluation
The false positive validation error stemmed from a strict 78-character summary limit. The limit was increased to 200 characters to accommodate existing charms. The issue is closed, with follow-up PRs required to trim summaries on a few affected charms.
Suggested action: —
No scores available.
Issue body
### Bug Description
Running `charmcraft pack` on a charm with a [`charmcraft.yaml`](https://github.com/canonical/istio-operators/blob/main/charms/istio-pilot/charmcraft.yaml) file without a summary fails with msg:
```
charmcraft pack -v
Starting charmcraft, version 2.5.5.post96+g26e3f02
Logging execution to '/home/dplascen/.local/state/charmcraft/log/charmcraft-20240301-124953.845091.log'
Bad charmcraft.yaml content:
- ensure this value has at most 78 characters (in field 'summary')
Full execution log: '/home/dplascen/.local/state/charmcraft/log/charmcraft-20240301-124953.845091.log'
```
### To Reproduce
1. Install charmcraft from latest/edge channel
2. `chamrcraft pack -v` a charm with no `summary` in its `charmcraft.yaml` file. You could use [this one](https://github.com/canonical/istio-operators/tree/main/charms/istio-pilot)
3. Observe the error
### Environment
* Ubuntu 20.04 and 22.04
* charmcraft latest/edge
### charmcraft.yaml
```shell
type: charm
bases:
- build-on:
- name: "ubuntu"
channel: "20.04"
run-on:
- name: "ubuntu"
channel: "20.04"
parts:
charm:
charm-python-packages: [setuptools, pip, jsonschema, cryptography, cffi]
build-packages: [git, rustc, cargo, libffi-dev, libssl-dev, pkg-config]
istioctl:
plugin: dump
source: https://github.com/istio/istio/releases/download/1.17.3/istioctl-1.17.3-linux-amd64.tar.gz
source-type: tar
```
### Relevant log output
```shell
charmcraft pack -v
Starting charmcraft, version 2.5.5.post96+g26e3f02
Logging execution to '/home/dplascen/.local/state/charmcraft/log/charmcraft-20240301-124953.845091.log'
Bad charmcraft.yaml content:
- ensure this value has at most 78 characters (in field 'summary')
Full execution log: '/home/dplascen/.local/state/charmcraft/log/charmcraft-20240301-124953.845091.log'
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | The false positive validation error stemmed from a strict 78-character summary limit. The limit was increased to 200 characters to accommodate existing charms. The issue is closed, with follow-up PRs required to trim summaries on a few affected charms. | |
| qwen/qwen3.6-35b-a3b | — | — | Increased the summary validation limit from 78 to 200 characters to accommodate existing charms, as Charmhub has no hard limit. Several charms with excessively long summaries were flagged for shortening. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved by increasing the summary validation limit from 78 to 200 characters to accommodate existing charms. Follow-up pull requests were opened to shorten summaries for specific charms exceeding the new threshold. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | charmcraft pack incorrectly enforced a 78-char summary limit. Maintainers resolved this by setting a 200-char limit for charms. Validation will be updated, and PRs will be opened for affected charms to shorten their summaries. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed by raising the summary length limit to 200 characters. The enforced 78-character cap aligned with snapcraft but broke 180 existing charms on Charmhub, which has no limit. Validation was updated to accommodate current charms. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1758 Max summary length is limited in metadata output | charmcraft | closed | Metadata summary validation incorrectly enforced a 78-character limit, causing charmcraft errors. The report was closed without a fix, merge, or code changes, indicating it was abandoned or handled externally. | |
| #1585 fix(charmcraft.yaml): relax summary string requirements | charmcraft | closed | Merged to resolve issue #1568 by relaxing summary string validation in charmcraft.yaml. The update modifies two files with 175 additions and 13 deletions, closing the bug report without formal review. |