jdx/mise · error

unrecognized github_attestations status

Error message

unrecognized github_attestations status {s:?} in lockfile

What it means

When parsing a mise lockfile, each tool entry may carry a `github_attestations` field. It is only allowed to hold the literal string "unavailable" (mapped to GithubAttestationsStatus::Unavailable). Any other string is rejected because the lockfile parser has no known meaning for it, protecting against silently ignoring tampered or hand-edited provenance data.

Solutions

  1. Upgrade mise to the latest version so the newer github_attestations status is recognized.
  2. Edit mise.lock and change the value to "unavailable" or delete the github_attestations key entirely.
  3. Delete the tool's entry (or the whole lockfile) and re-lock with `mise lock` so provenance is regenerated correctly.

Example fix

// before (mise.lock)
github_attestations = "verified"

// after
github_attestations = "unavailable"
Defensive patterns

Strategy: validation

Validate before calling

const v = doc.get('tools')?.flatMap(t => t.get('github_attestations')).filter(Boolean);
const bad = v.filter(s => s !== 'unavailable');
if (bad.length) throw new Error(`unsupported github_attestations: ${bad}`);

Type guard

function isGithubAttestationsStatus(v) { return v === 'unavailable'; }

Prevention

When it happens

Trigger: Parsing a `mise.lock` whose tool entry contains `github_attestations = "<something other than unavailable>"` — typically written by a newer mise version that introduced an additional status variant, or by manual editing.

Common situations: Opening a lockfile generated by a newer mise release in an older mise; hand-editing lockfile fields to silence attestation checks; copy-pasting tool entries between lockfiles with modified attestation values.

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@533346cc37 (2026-09-17). Data as JSON: /api/errors/a9022a17d24dd975. Report an issue: GitHub.

Appendix: source

Thrown at src/lockfile.rs:783

                };
                let url_api = match t.remove("url_api") {
                    Some(toml::Value::String(s)) => Some(s),
                    _ => None,
                };
                let conda_deps = match t.remove("conda_deps") {
                    Some(toml::Value::Array(arr)) => Some(
                        arr.into_iter()
                            .filter_map(|v| v.as_str().map(String::from))
                            .collect(),
                    ),
                    _ => None,
                };
                let github_attestations = match t.remove("github_attestations") {
                    Some(toml::Value::String(s)) if s == "unavailable" => {
                        Some(GithubAttestationsStatus::Unavailable)
                    }
                    Some(toml::Value::String(s)) => {
                        bail!("unrecognized github_attestations status {s:?} in lockfile")
                    }
                    _ => None,
                };
                let pkgx_deps = match t.remove("pkgx_deps") {
                    Some(toml::Value::Array(arr)) => Some(
                        arr.into_iter()
                            .filter_map(|v| v.as_str().map(String::from))
                            .collect(),
                    ),
                    _ => None,
                };
                let pkgx_provides = match t.remove("pkgx_provides") {
                    Some(toml::Value::Array(arr)) => Some(
                        arr.into_iter()
                            .filter_map(|v| v.as_str().map(String::from))
                            .collect(),
                    ),
                    _ => None,

View on GitHub (pinned to 533346cc37)