astrid-runtime/astrid · error

{label} target set is invalid

Error message

{label} target set is invalid

What it means

`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.

Source

Thrown at crates/astrid-cli/src/commands/update_channel.rs:348

        "signed channel {label} is not canonical UTC RFC3339 seconds"
    );
    Ok(parsed)
}

fn validate_targets_for(
    targets: &[TargetMetadata],
    expected_targets: &[&str],
    version: &str,
    label: &str,
) -> anyhow::Result<()> {
    ensure!(
        targets.len() == expected_targets.len(),
        "{label} must contain exactly {} targets",
        expected_targets.len()
    );
    let mut seen = HashSet::new();
    for target in targets {
        ensure!(
            expected_targets.contains(&target.triple.as_str())
                && seen.insert(target.triple.as_str()),
            "{label} target set is invalid"
        );
        let expected_asset = format!("astrid-{version}-{}.tar.gz", target.triple);
        ensure!(
            target.asset == expected_asset
                && target.sigstore_bundle == format!("{expected_asset}.sigstore.json"),
            "signed metadata asset identity is invalid for {}",
            target.triple
        );
        ensure!(
            target.size > 0,
            "signed metadata target size must be positive"
        );
        ensure!(
            is_lower_hex_64(&target.blake3) && is_lower_hex_64(&target.sha256),
            "signed metadata target digest is invalid"

View on GitHub (pinned to affd8760f4)

Solutions

  1. Remove any target entries whose triple is not in the channel's expected target list, and deduplicate repeated triples.
  2. Correct misspelled target triples to the exact expected values (e.g. `x86_64-unknown-linux-gnu`, `aarch64-apple-darwin`).
  3. Regenerate the signed metadata with the tooling version that matches this channel's expected target set, then re-sign.
  4. If you intended to ship a new platform, update the expected-targets definition for the channel first, then rebuild the metadata.

Example fix

// before
"targets": [
  { "triple": "x86_64-unknown-linux-gnu", ... },
  { "triple": "x86_64-unknown-linux-gnu", ... }  // duplicate
]

// after
"targets": [
  { "triple": "x86_64-unknown-linux-gnu", ... },
  { "triple": "aarch64-apple-darwin", ... }
]
Defensive patterns

Strategy: validation

Validate before calling

// shell lint before publishing metadata
jq -e '(.targets | map(.triple) | length) == (.targets | map(.triple) | unique | length)' channel.json

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: `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.

Common situations: 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.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/e8a7f2335c96608d. Report an issue: GitHub.