Repository: canonical/charmcraft

Issue:
Max summary length is limited in metadata output
### Bug Description

This needs to become a str: https://github.com/canonical/charmcraft/blob/2d1e6d367ccf20a4debb0cbb3715c315dfcd390e/charmcraft/models/metadata.py#L42

### To Reproduce

https://github.com/canonical/metacontroller-operator/actions/runs/10074781102/job/27851666796#step:4:827

### Environment

Anywhere

### charmcraft.yaml

```shell
n/a
```


### Relevant log output

```shell
Staging charm
Priming charm
charmcraft internal error: ValidationError(model='CharmMetadata', errors=[{'loc': ('summary',), 'msg': 'ensure this value has at most 78 characters', 'type': 'value_error.any_str.max_length', 'ctx': {'limit_value': 78}}])
Failed to execute charmcraft in instance.
Full execution log: '/home/runner/.local/state/charmcraft/log/charmcraft-20240724-101950.375990.log'
```


Discussion:

Patch:
diff --git a/charmcraft/models/metadata.py b/charmcraft/models/metadata.py
index ba848618..567167c6 100644
--- a/charmcraft/models/metadata.py
+++ b/charmcraft/models/metadata.py
@@ -39,7 +39,7 @@ class CharmMetadata(models.BaseMetadata):
 
     name: models.ProjectName
     display_name: models.ProjectTitle | None = None
-    summary: models.SummaryStr
+    summary: pydantic.StrictStr
     description: pydantic.StrictStr
     maintainers: list[pydantic.StrictStr] | None = None
     assumes: list[str | dict[str, list | dict]] | None = None


Test patch:
diff --git a/tests/unit/models/test_metadata.py b/tests/unit/models/test_metadata.py
index 7e1f201a..062622f7 100644
--- a/tests/unit/models/test_metadata.py
+++ b/tests/unit/models/test_metadata.py
@@ -22,7 +22,7 @@ from charmcraft.models import metadata, project
 
 BASIC_CHARM_METADATA_DICT = {
     "name": "test-charm",
-    "summary": "A charm for testing",
+    "summary": "A charm for testing, with a summary string that is more than seventy-eight characters long.",
     "description": "A fake charm used for testing purposes.",
 }
 BASIC_CHARM_DICT = {