jdx/mise · error · eyre::Report

managed system files require owner

Error message

managed system files require owner '{owner}', but that bootstrap user cannot be safely converged

What it means

When pending (not-yet-created) bootstrap accounts are allowed, mise still requires the referenced owner user's plan to be confidently convergible. If the user request's plan action is Unknown — meaning mise cannot determine a safe sequence of account operations — validation bails rather than attempting the run and failing mid-apply with half-created accounts.

Solutions

  1. Simplify the [bootstrap.users.x] declaration so the planner can determine a definite action (remove conflicting/conditional fields).
  2. Create the user outside this bootstrap run (or ensure it already exists on the machine) and drop allow-pending behavior.
  3. Reference an owner whose account plan is deterministic, e.g. a simple present-state user or root.
Defensive patterns

Strategy: validation

Validate before calling

// prefer accounts whose plan is deterministic; avoid conditional fields in user declarations
fn owner_plan_known(owner: &UserRequest, allow_pending: bool) -> bool {
    owner.state != AccountState::Absent && (!allow_pending || owner.plan().action != ResourceAction::Unknown)
}

Prevention

When it happens

Trigger: `validate_principals` with `allow_pending_accounts = true`; a managed file (state present) declares `owner = "x"`; user x exists in the accounts config, is not absent, but `request.plan().action == ResourceAction::Unknown` (e.g. ambiguous account state that the planner cannot resolve).

Common situations: Account entries with conditions/templates the planner can't statically evaluate; complex user-creation declarations (conflicting uid/shell/home settings) that make the converge action indeterminate.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


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

Appendix: source

Thrown at src/system/managed_files.rs:934

        .chain(
            directories
                .iter()
                .filter(|request| request.state == ManagedState::Present)
                .map(|request| (request.owner.as_deref(), request.group.as_deref())),
        )
    {
        if let Some(owner) = owner {
            match accounts
                .and_then(|accounts| accounts.users.iter().find(|request| request.name == owner))
            {
                Some(request) if request.state == super::accounts::AccountState::Absent => bail!(
                    "managed system files require owner '{owner}', but that bootstrap user is absent"
                ),
                Some(request)
                    if allow_pending_accounts
                        && request.plan().action == ResourceAction::Unknown =>
                {
                    bail!(
                        "managed system files require owner '{owner}', but that bootstrap user cannot be safely converged"
                    )
                }
                Some(_) if allow_pending_accounts => {}
                Some(_) | None => {
                    resolve_user(owner)?;
                }
            }
        }
        if let Some(group) = group {
            match accounts
                .and_then(|accounts| accounts.groups.iter().find(|request| request.name == group))
            {
                Some(request) if request.state == super::accounts::AccountState::Absent => bail!(
                    "managed system files require group '{group}', but that bootstrap group is absent"
                ),
                Some(request)
                    if allow_pending_accounts

View on GitHub (pinned to 533346cc37)