jdx/mise · error

unrecognized attested_by {s:?} in lockfile

Error message

unrecognized attested_by {s:?} in lockfile

What it means

When parsing the lockfile entry, the optional 'attested_by' key must be either absent or the exact string "repackager". Any other string is rejected so unknown attestation sources are not silently accepted.

Source

Thrown at src/lockfile.rs:704

                };
                let provenance_verified = provenance.is_some()
                    && matches!(
                        t.remove("provenance_verified"),
                        Some(toml::Value::Boolean(true))
                    );
                let github_attestations = if provenance.is_some() {
                    None
                } else {
                    github_attestations
                };
                let signer = match t.remove("signer") {
                    Some(toml::Value::String(s)) => Some(s),
                    _ => None,
                };
                let attested_by = match t.remove("attested_by") {
                    Some(toml::Value::String(s)) if s == "repackager" => Some(s),
                    Some(toml::Value::String(s)) => {
                        bail!("unrecognized attested_by {s:?} in lockfile")
                    }
                    _ => None,
                };
                let additional_artifacts = match t.remove("additional_artifacts") {
                    Some(toml::Value::Array(values)) => values
                        .into_iter()
                        .map(|value| value.try_into().map_err(Report::from))
                        .collect::<Result<Vec<ArtifactInfo>>>()?,
                    Some(_) => bail!("additional_artifacts must be an array in lockfile"),
                    None => Vec::new(),
                };
                Ok(PlatformInfo {
                    install,
                    checksum,
                    size,
                    url,
                    url_api,
                    conda_deps,

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Set attested_by = "repackager" or remove the key from the mise.lock entry.
  2. Regenerate the lockfile entry with `mise lock` after fixing.
  3. Upgrade mise if the value originated from a newer release that supports it.

Example fix

// before (mise.lock)
attested_by = "custom-builder"
// after
attested_by = "repackager"
Defensive patterns

Strategy: validation

Validate before calling

grep -n 'attested_by' mise.lock | grep -v '"repackager"' && echo "invalid attested_by value" || true

Try / catch

// catch
if err.contains("unrecognized attested_by") {
    remove_key_or_relock("attested_by");
}

Prevention

When it happens

Trigger: Hand-editing mise.lock and setting attested_by to any value other than "repackager"; a lockfile written by a newer mise with a new attestation source this version doesn't know; corruption or bad merge.

Common situations: Manual edits, merge-conflict resolution, or downgrading mise below a version that introduced a new attested_by value.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/17dced8d664ff784. Report an issue: GitHub.