{"record":{"id":"4f071aa22a1f50e8","repo":"jdx/mise","slug":"managed-system-files-require-owner-owner-but-4f071a","errorCode":null,"errorMessage":"managed system files require owner '{owner}', but that bootstrap user cannot be safely converged","messagePattern":"managed system files require owner '(.+?)', but that bootstrap user cannot be safely converged","errorType":"error_code","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/system/managed_files.rs","lineNumber":934,"sourceCode":"        .chain(\n            directories\n                .iter()\n                .filter(|request| request.state == ManagedState::Present)\n                .map(|request| (request.owner.as_deref(), request.group.as_deref())),\n        )\n    {\n        if let Some(owner) = owner {\n            match accounts\n                .and_then(|accounts| accounts.users.iter().find(|request| request.name == owner))\n            {\n                Some(request) if request.state == super::accounts::AccountState::Absent => bail!(\n                    \"managed system files require owner '{owner}', but that bootstrap user is absent\"\n                ),\n                Some(request)\n                    if allow_pending_accounts\n                        && request.plan().action == ResourceAction::Unknown =>\n                {\n                    bail!(\n                        \"managed system files require owner '{owner}', but that bootstrap user cannot be safely converged\"\n                    )\n                }\n                Some(_) if allow_pending_accounts => {}\n                Some(_) | None => {\n                    resolve_user(owner)?;\n                }\n            }\n        }\n        if let Some(group) = group {\n            match accounts\n                .and_then(|accounts| accounts.groups.iter().find(|request| request.name == group))\n            {\n                Some(request) if request.state == super::accounts::AccountState::Absent => bail!(\n                    \"managed system files require group '{group}', but that bootstrap group is absent\"\n                ),\n                Some(request)\n                    if allow_pending_accounts","sourceCodeStart":916,"sourceCodeEnd":952,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/managed_files.rs#L916-L952","documentation":"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.","triggerScenarios":"`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).","commonSituations":"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.","solutions":["Simplify the [bootstrap.users.x] declaration so the planner can determine a definite action (remove conflicting/conditional fields).","Create the user outside this bootstrap run (or ensure it already exists on the machine) and drop allow-pending behavior.","Reference an owner whose account plan is deterministic, e.g. a simple present-state user or root."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// prefer accounts whose plan is deterministic; avoid conditional fields in user declarations\nfn owner_plan_known(owner: &UserRequest, allow_pending: bool) -> bool {\n    owner.state != AccountState::Absent && (!allow_pending || owner.plan().action != ResourceAction::Unknown)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep [bootstrap.users] entries simple and unconditional.","Ensure users referenced by files already exist or are trivially creatable.","Test bootstrap planning on a scratch machine before production runs."],"tags":["config","accounts","planning","validation"],"backgroundTag":"invalid-state-transition","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}