jdx/mise · error
additional_artifacts must be an array in lockfile
Error message
additional_artifacts must be an array in lockfile
What it means
In a mise.lock platform table, additional_artifacts must be a TOML array of artifact tables; any other type (string, integer, inline table) bails (src/lockfile.rs:661-665). Each array element is then recursively parsed as ArtifactInfo.
Source
Thrown at src/lockfile.rs:662
}
_ => None,
};
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 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,
pkgx_deps,
pkgx_provides,
pkgx_runtime_env,
provenance,
provenance_verified,
github_attestations,
additional_artifacts,
})
}View on GitHub (pinned to 6f52dcdf99)
Solutions
- Regenerate the lockfile: rm mise.lock && mise lock.
- Align mise versions across writers and readers (upgrade mise).
- Express extra artifacts in backend config and re-lock instead of editing mise.lock.
Example fix
# before (mise.lock, hand-edited — wrong type) additional_artifacts = "docs.zip" # after — regenerate instead of editing $ rm mise.lock && mise lock
Defensive patterns
Strategy: validation
Validate before calling
# CI guard: additional_artifacts must be an array wherever it appears
python3 -c "
import tomllib
def walk(v):
if isinstance(v, dict):
if 'additional_artifacts' in v and not isinstance(v['additional_artifacts'], list):
raise SystemExit('additional_artifacts must be an array')
for x in v.values(): walk(x)
elif isinstance(v, list):
for x in v: walk(x)
walk(tomllib.load(open('mise.lock', 'rb')))
" Try / catch
On "additional_artifacts must be an array", do not repair the field by hand — delete mise.lock and regenerate with mise lock using a mise version aligned with the writer, then fail the job if regeneration is not allowed (e.g. protected lockfiles).
Prevention
- Express desired artifacts in backend config and re-lock; never edit mise.lock.
- Validate mise.lock structure in CI before the real job runs.
- Resolve lockfile merge conflicts by regenerating, not by hand-merging.
When it happens
Trigger: additional_artifacts = "docs.zip" or a single inline table instead of an array — hand-edited lockfiles, or structural drift between mise versions.
Common situations: Hand-editing mise.lock trying to add an artifact; merging lockfiles by hand; format changes after version upgrades.
Related errors
- unsupported asset info format
- unsupported conda package info format
- unsupported pkgx package info format
- invalid lockfile format for tool {short}: expected array ([[
- unsupported lockfile format {}
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/66bbbae4cecd4027.
Report an issue: GitHub.