{"record":{"id":"e8a7f2335c96608d","repo":"astrid-runtime/astrid","slug":"label-target-set-is-invalid","errorCode":null,"errorMessage":"{label} target set is invalid","messagePattern":"(.+?) target set is invalid","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/update_channel.rs","lineNumber":348,"sourceCode":"        \"signed channel {label} is not canonical UTC RFC3339 seconds\"\n    );\n    Ok(parsed)\n}\n\nfn validate_targets_for(\n    targets: &[TargetMetadata],\n    expected_targets: &[&str],\n    version: &str,\n    label: &str,\n) -> anyhow::Result<()> {\n    ensure!(\n        targets.len() == expected_targets.len(),\n        \"{label} must contain exactly {} targets\",\n        expected_targets.len()\n    );\n    let mut seen = HashSet::new();\n    for target in targets {\n        ensure!(\n            expected_targets.contains(&target.triple.as_str())\n                && seen.insert(target.triple.as_str()),\n            \"{label} target set is invalid\"\n        );\n        let expected_asset = format!(\"astrid-{version}-{}.tar.gz\", target.triple);\n        ensure!(\n            target.asset == expected_asset\n                && target.sigstore_bundle == format!(\"{expected_asset}.sigstore.json\"),\n            \"signed metadata asset identity is invalid for {}\",\n            target.triple\n        );\n        ensure!(\n            target.size > 0,\n            \"signed metadata target size must be positive\"\n        );\n        ensure!(\n            is_lower_hex_64(&target.blake3) && is_lower_hex_64(&target.sha256),\n            \"signed metadata target digest is invalid\"","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/update_channel.rs#L330-L366","documentation":"`validate_targets_for` checks that every target entry in signed channel metadata has a platform triple that is one of the expected targets and that no triple appears twice. This error means the target set contains an unrecognized platform triple or a duplicate entry — a structural violation of the signed metadata schema, so the metadata is rejected before any download is attempted.","triggerScenarios":"`validate_targets` / `verify_release_extension` encountering a target whose `triple` is not in `expected_targets` (e.g. `x86_64-unknown-none` or a typo'd triple), or the same triple listed twice in the targets array.","commonSituations":"A release pipeline publishing targets for platforms this channel version does not define; duplicated JSON entries after a merge; misspelled target triples (`x86_64-unknwn-linux-gnu`); a newer client format mixed into older channel metadata.","solutions":["Remove any target entries whose triple is not in the channel's expected target list, and deduplicate repeated triples.","Correct misspelled target triples to the exact expected values (e.g. `x86_64-unknown-linux-gnu`, `aarch64-apple-darwin`).","Regenerate the signed metadata with the tooling version that matches this channel's expected target set, then re-sign.","If you intended to ship a new platform, update the expected-targets definition for the channel first, then rebuild the metadata."],"exampleFix":"// before\n\"targets\": [\n  { \"triple\": \"x86_64-unknown-linux-gnu\", ... },\n  { \"triple\": \"x86_64-unknown-linux-gnu\", ... }  // duplicate\n]\n\n// after\n\"targets\": [\n  { \"triple\": \"x86_64-unknown-linux-gnu\", ... },\n  { \"triple\": \"aarch64-apple-darwin\", ... }\n]","handlingStrategy":"validation","validationCode":"// shell lint before publishing metadata\njq -e '(.targets | map(.triple) | length) == (.targets | map(.triple) | unique | length)' channel.json","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Derive the targets array from the channel's expected-targets definition, never by hand.","Keep the release pipeline's target list and the channel definition in one source of truth.","Fail the release build if any target build fails instead of publishing a subset.","Deduplicate targets during metadata generation."],"tags":["schema-validation","update-channel","metadata","rust"],"backgroundTag":"schema-validation-failed","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}