jdx/mise · error

unrecognized github_attestations status {s:?} in lockfile

Error message

unrecognized github_attestations status {s:?} in lockfile

What it means

While parsing a mise.lock platform table, the optional github_attestations field only accepts the sentinel string "unavailable" (src/lockfile.rs:577-584). Any other value bails and the whole lockfile parse fails — again a forward-compatibility guard against formats written by newer mise builds.

Source

Thrown at src/lockfile.rs:584

                };
                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 6f52dcdf99)

Solutions

  1. Upgrade mise to at least the version that wrote the lockfile.
  2. Or regenerate: rm mise.lock && mise lock with the installed version.
  3. Pin a single mise version repo-wide and bump writer and readers together.
  4. Revert hand edits to mise.lock.
Defensive patterns

Strategy: validation

Validate before calling

# CI guard: github_attestations must be the only recognized sentinel
grep -P 'github_attestations\s*=\s*"(?!unavailable")' mise.lock && { echo 'unsupported github_attestations status — upgrade mise or re-lock'; exit 1; } || true

Try / catch

Catch lockfile parse errors and branch on the message: any "unrecognized … in lockfile" means version skew — upgrade mise or rm mise.lock && mise lock, then fail the job with that guidance rather than hand-patching the value.

Prevention

When it happens

Trigger: A mise.lock containing github_attestations = "<other>" — written by a newer mise that gained a new attestation status, then read by an older build; or a hand-edited value.

Common situations: Version skew after one teammate or CI lane upgrades mise and commits a refreshed mise.lock; edited lockfiles; pre-release/newer mise streams writing fields pinned readers cannot parse.

Related errors


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/a9022a17d24dd975. Report an issue: GitHub.