{"record":{"id":"1eb864702841e7b4","repo":"jdx/mise","slug":"managed-system-files-require-group-group-but","errorCode":null,"errorMessage":"managed system files require group '{group}', but that bootstrap group is absent","messagePattern":"managed system files require group '(.+?)', but that bootstrap group is absent","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/managed_files.rs","lineNumber":880,"sourceCode":"                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\n                        && request.plan().action == ResourceAction::Unknown =>\n                {\n                    bail!(\n                        \"managed system files require group '{group}', but that bootstrap group cannot be safely converged\"\n                    )\n                }\n                Some(_) if allow_pending_accounts => {}\n                Some(_) | None => {\n                    resolve_group(group)?;\n                }\n            }\n        }\n    }\n    Ok(())","sourceCodeStart":862,"sourceCodeEnd":898,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/managed_files.rs#L862-L898","documentation":"This error is thrown when a managed-file plan references a system group, the group exists in the account requests, but its declared state is Absent (i.e. the same run plans to remove it). Managed system files require their owning group to exist, so the library refuses to converge files owned by a group it is simultaneously deleting. It is a precondition check in the group resolution path of managed_files.rs.","triggerScenarios":"Calling the managed-files planning API with a file/directory entry whose `group` matches an entry in the AccountRequests groups list that has state == AccountState::Absent. Passes `allow_pending_accounts` is irrelevant here because Absent is an explicit request, not an unknown/pending plan.","commonSituations":"A config declares both a group to be removed and files owned by that group; a refactored config deleted a group that is still referenced by file entries; bootstrap account requests generated from another module mark the group absent while file management still references it.","solutions":["Remove or change the Absent state for that group in the AccountRequests, or stop referencing it as the file's `group`.","Point the managed file entries at a group that is present (state not Absent) in the account requests.","Split the run: remove the group only after files no longer depend on it."],"exampleFix":"// before\nAccountRequest { name: \"deploy\", state: AccountState::Absent }\nFileEntry { path: \"/etc/app.conf\", group: Some(\"deploy\"), .. }\n\n// after\nAccountRequest { name: \"deploy\", state: AccountState::Present }\nFileEntry { path: \"/etc/app.conf\", group: Some(\"deploy\"), .. }","handlingStrategy":"validation","validationCode":"let absent: Vec<_> = files.iter().filter_map(|f| f.group.as_ref()).filter(|g| accounts.groups.iter().any(|r| &r.name == *g && r.state == AccountState::Absent)).collect();\nif !absent.is_empty() { return Err(format!(\"groups declared absent but referenced by files: {absent:?}\")); }","typeGuard":"fn group_is_present(name: &str, accounts: &AccountRequests) -> bool {\n    accounts.groups.iter().find(|r| r.name == name)\n        .map_or(true, |r| r.state != AccountState::Absent)\n}","tryCatchPattern":null,"preventionTips":["Cross-check group references in file entries against account request states at config load","Never mark a group Absent in the same run that manages files owned by it","Add a config lint that detects absent groups still used as file owners"],"tags":["unix","group-management","precondition","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}