← Back to issue list

Unable to disambiguate CRAFT package type with multiple CRAFT YAMLs

View original Github issue

Metadata

Project
fetch-service
Number
#296
Type
issue
State
open
Author
SuperAlpaca27
Labels
—
Created
Updated
Closed
—

Current evaluation

A repository with snapcraft.yaml, rockcraft.yaml, and sourcecraft.yaml gets three approvals, but Fetch Service emits Snapcraft metadata for a Sourcecraft package; the report remains untriaged.

Suggested action: needs triage

Reason: The report includes concrete JSON showing craft.snapcraft, craft.rockcraft, and craft.sourcecraft all approved while metadata.type incorrectly identifies the Sourcecraft package as Snapcraft; the current Sourcecraft inspector also independently approves any repository containing sourcecraft.yaml. The intended disambiguation policy is unresolved and the reproduction steps are qualified as uncertain, while the issue has no labels, maintainer response, or comments to establish triage or design direction.

Evaluated by: mr-cal-bot

Impact: 48 Quick Win: 12 Complexity: 61 Confidence: 91 Actionability: 64

Issue body

### Bug Description If you provide multiple *craft YAMLs in a single *craft repo, the Fetch Service incorrectly assumes the "metadata.type" of the CRAFT package. For example, see the fetch service metadata for [this bin build](https://launchpad.net/~sd-admin-staging/sd-project/+craft/ubuntu.public.superalpaca-hello-world-2+latest-edge/+build/624/), and grep for `hello-world-2`; the matching sourcecraft repo is [here](https://git.staging.snapcraftcontent.com/ubuntu/public/sourcecraft/superalpaca-hello-world-2/tree/?h=latest_edge). The "metadata.type" for `superalpaca-hello-world-2` is "application/x.canonical.snapcraft" instead of "application/x.canonical.sourcecraft". I think that the Fetch Service should do one (or both) of: 1. Get the "metadata.type" and "metadata.name" from the download (git/CRAFT storage) URL if possible, since the YAML doesn't necessarily have to match these 2. Reject the CRAFT package if we're unable to disambiguate it's type Here's the relevant output from the metadata JSON mentioned above: The `response-inspection` shows: ```json "craft.rockcraft": { "opinion": "Approved", "reason": "rockcraft repository found", "annotations": { "checkout": "07b14bd534988c05bef5f1bdbc4e834614a50ac9" } }, "craft.snapcraft": { "opinion": "Approved", "reason": "snapcraft repository found", "annotations": { "checkout": "07b14bd534988c05bef5f1bdbc4e834614a50ac9" } }, "craft.sourcecraft": { "opinion": "Approved", "reason": "sourcecraft repository found", "annotations": { "checkout": "07b14bd534988c05bef5f1bdbc4e834614a50ac9" } }, ``` but the artefact metadata will just choose one of these ```json "metadata": { "type": "application/x.canonical.snapcraft", "sha1": "f379734635d331dda7f52f01d334e11dd1cdf8cc", "sha256": "7f741bc495d912e02223a73ff74ea6a4926982475fc1cfe689b7dc20788e9eab", "size": 1396, "name": "superalpaca-hello-world-2", "version": "1", "vendor": "", "description": "Single-line elevator pitch for your amazing snap", "author": "", "license": "" }, ``` ### To Reproduce Not 100% sure of the exact steps, but it's something like: 1. Register a `sourcecraft` package 2. In the git repo for the package, create valid `sourcecraft.yaml`, `snapcraft.yaml` and `rockcraft.yaml` and commit them to the registered `sourcecraft` package in the Store 3. The builds for the package will trigger, wait for one of them to succeed 4. Get the Fetch Service Metadata JSON for this build, and it will show that multiple craft inspectors approved the package in the `response-inspection` when pulling in the `sourcecraft` package into the build (like in the Bug Description above) ### Relevant log output _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 48
Quick Win: 12
Complexity: 61
Confidence: 91
Actionability: 64
needs triage A repository with snapcraft.yaml, rockcraft.yaml, and sourcecraft.yaml gets three approvals, but Fetch Service emits Snapcraft metadata for a Sourcecraft package; the report remains untriaged.
stealth/space-bunny-alpha
Impact: 45
Quick Win: 13
Complexity: 57
Confidence: 90
Actionability: 65
needs triage Multiple CRAFT YAMLs let the last approving inspector overwrite artifact metadata.type, misidentifying Sourcecraft as Snapcraft; the report remains untriaged and lacks an agreed disambiguation policy.
qwen/qwen3.6-35b-a3b
Impact: 60
Quick Win: 33
Staleness: 75
Complexity: 45
Confidence: 65
Support Request: 10
needs triage Fetch Service incorrectly assigns metadata.type when multiple CRAFT YAMLs exist in a single repo; no maintainer response after 658 days.

Update history

Date Change
created

Related issues

No related issues found above the similarity threshold.