jdx/mise · error
uv graph root requirements do not match the requested…
Error message
uv graph root requirements do not match the requested package and extras
What it means
The uv lock's graph root must encode exactly the requested package and extras. validate_uv_lock compares the root requirements (normalized package names) and their extras against the request; a count mismatch, a missing root requirement, or differing extras means the lock cannot be trusted for this install and is rejected.
Solutions
- Re-lock for the current request: `mise lock --bump <tool>`.
- If extras changed unintentionally, restore the original extras option in mise.toml.
- Verify the mise.lock root requirement line matches `package[extras]==version` and remove corruption.
- Delete the stale lock entry and run `mise lock` to regenerate from scratch.
Example fix
// before: extras added after lock creation
ruff = { version = "pipx:0.9", extras = "all" } # lock has no extras
// after: regenerate the lock including extras
$ mise lock --bump ruff Defensive patterns
Strategy: validation
Validate before calling
// confirm locked root matches request before install
const lock = parseLock('mise.lock');
if (lock.rootExtras.join(',') !== requestedExtras.join(',')) run('mise lock --bump <tool>'); Prevention
- Change extras and lock atomically — never bump one without the other
- Diff mise.lock root requirement after any tool option change
- Let `mise lock` regenerate rather than editing extras in the lock
When it happens
Trigger: Thrown from validate_uv_lock when the graph's virtual-root requirement set size differs from the expected set, the root requirement entry is absent, or the locked extras (normalized, compared as a BTreeSet) differ from the extras requested in the tool options.
Common situations: Adding or removing `[extras]` in the tool options without re-locking; a lock generated for `package[extra1]` replayed for bare `package`; a corrupted or partially hand-edited mise.lock; lock bumped for a different variant of the same tool.
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
- has a wheel without a SHA256 hash
- Python dependency graphs require lockfile revision 2; run…
- Python lock does not match the requested tool; run `mise…
- Python lock is missing the requested root package
- Python locks support registry wheels only
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/33755fa3b16edb58.
Report an issue: GitHub.
Appendix: source
Thrown at src/backend/pipx/lock.rs:387
let root_requirement = requirements.iter().find(|requirement| {
requirement.get("name").and_then(toml::Value::as_str)
== Some(root_name.as_str())
&& requirement.get("specifier").and_then(toml::Value::as_str)
== Some(root_specifier.as_str())
});
let locked_extras = root_requirement
.and_then(|requirement| requirement.get("extras"))
.and_then(toml::Value::as_array)
.into_iter()
.flatten()
.filter_map(toml::Value::as_str)
.map(|extra| Self::normalize_package_name(extra.trim()))
.collect::<std::collections::BTreeSet<_>>();
if requirements.len() != expected.len()
|| root_requirement.is_none()
|| extras != locked_extras
{
bail!(
"uv graph root requirements do not match the requested package and extras"
);
}
virtual_root = true;
continue;
}
if source.len() != 1 || !source.contains_key("registry") {
bail!("Python locks support registry wheels only");
}
if name == Self::normalize_package_name(&self.tool_name())
&& package.get("version").and_then(toml::Value::as_str) == Some(&tv.version)
{
root = true;
}
let wheels = package
.get("wheels")
.and_then(toml::Value::as_array)
.filter(|v| !v.is_empty())View on GitHub (pinned to 533346cc37)