← Back to issue list

Clarify 1:1 platforms-to-charm mapping in charmcraft.yaml schema

View original Github issue

Metadata

Project
charmcraft
Number
#2794
Type
pull request
State
closed
Author
Copilot
Labels
Created
Updated
Closed

Current evaluation

Merged to clarify the charmcraft.yaml schema, explicitly stating each platforms entry produces a separate charm artifact. Changes include updated schema descriptions, regenerated JSON, and a regression test.

Suggested action:

No scores available.

Issue body

The `platforms` key in the charmcraft schema did not explicitly state artifact behavior, which caused confusion about pack outputs. This update makes the schema state that each `platforms` entry maps to its own packed charm file. - **Schema semantics clarified** - Added an explicit description on `PlatformCharm.platforms` in the model so the contract is clear at the source: one platform entry → one charm artifact on pack. - **Generated schema updated** - Regenerated `schema/charmcraft.json` so the published schema now carries the new `platforms` description. - **Behavior contract pinned** - Added a focused unit assertion in `tests/unit/models/test_project.py` to lock the `platforms` schema description text and prevent regressions. ```json "platforms": { "description": "Defines the target platforms for this charm. Each platforms entry produces a separate charm file when packing." } ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged to clarify the charmcraft.yaml schema, explicitly stating each platforms entry produces a separate charm artifact. Changes include updated schema descriptions, regenerated JSON, and a regression test.
qwen3.6-35b-a3b-mtp-q6 Merged to clarify the charmcraft.yaml schema, explicitly stating each platforms entry produces a separate charm artifact. The update modifies the model description, regenerates the JSON schema, and adds a unit test to lock the text.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#1963 Clarify that each `platform` entry is a 1:1 mapping to output `charm` files charmcraft closed Closed and resolved by updating the charmcraft.yaml schema documentation to clarify that each platform entry generates a separate charm file.
85%
#1554 feat: implement platforms for building charms charmcraft merged Merged implementation of platforms for building charms, replacing the deprecated bases field per ST105 spec. Resolves #1535 and depends on #1556 for testing. Approved by reviewers with passing CI checks.
71%