← Back to issue list

meta: Validate common ID against appstream metadata

View original Github issue

Metadata

Project
snapcraft
Number
#2542
Type
pull request
State
merged
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2542 added validation that fails when an app's common-id is absent from AppStream metadata, preventing common-ID typos.

Resolution: closed resolved

Reason: The change was merged into master by commit 8d7f16595. It implements the consistency check requested for LP #1814902 and rejects common IDs not found in AppStream files.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Appstream common IDs should reference IDs actually used in the metadata. To prevent typos, add a consistency check and fail if any common ID is not found in appstream files. LP: #1814902 Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #2542 added validation that fails when an app's common-id is absent from AppStream metadata, preventing common-ID typos.
stealth/space-bunny-alpha — closed resolved Merged PR #2542 in commit 8d7f16595, adding validation that fails when an AppStream common ID is absent from metadata, preventing typo-related errors.
stealth/space-bunny-alpha — closed resolved Merged #2542, adding validation that fails when an AppStream common ID is missing from metadata, preventing typo-related errors (LP: #1814902).
qwen/qwen3.6-35b-a3b — — Merged validation logic for Appstream common IDs against metadata to prevent typos. Approved by one reviewer, passed CI, and increased coverage by 0.02%. Resolves LP #1814902.
qwen3.6-35b-a3b-mtp-q6 — — Merged into master. Adds a consistency check to validate AppStream common IDs against metadata, preventing typos. Increased coverage by 0.02% with 100% diff coverage. Reviewer feedback on logger output was noted prior to merge.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2536 project: validate common-id against metadata filename snapcraft closed Closed unmerged in favor of #2542, which reworked the validation and was merged as 8d7f16595 to reject AppStream common IDs missing from metadata files.
82%
#1814902 warn if common-id wasn't parsed snapcraft (launchpad) closed Fixed by canonical/snapcraft#2542, commit 8d7f16595: Snapcraft now warns when an app's common-id is absent from parsed AppStream metadata.
74%
#1954 Implement support for `common-id` snapcraft closed Implemented AppStream common-id support in merged PR #1960 via commit 37ad88866, following prerequisite extractor changes in #1879.
72%
#5624 Add a pydantic validator for common-id snapcraft open Enhancement to add a pydantic validator for App.common_id enforcing the AppStream desktop-app ID format, so bad IDs fail before a build environment starts. Still open at HEAD; two implementation PRs (#5625 closed unmerged, #5974 stalled) have failed so far.
71%