jdx/mise · error
configured notifications came from managed files
Error message
configured notifications came from managed files
What it means
This is a Rust panic from `.expect()` in mise's bootstrap command (src/cli/bootstrap.rs:1395). It is an internal invariant assertion: notifications are only marked as configured when the system-file preflight pass produced managed files/directories. The panic means notifications validation started without that preflight result, i.e. bootstrap phases were run out of order or the files phase was skipped.
Solutions
- Ensure the bootstrap run includes the Files part (remove BootstrapPart::Files from the skip list) whenever notifications are configured
- Run the managed-system-files preflight before the notifications validation block
- Check for code changes that set notifications_configured without running preflight; restore the invariant or make the value Option-aware
Example fix
// before
let (files, directories) = managed_system_files.as_ref().expect("configured notifications came from managed files");
// after
let Some((files, directories)) = managed_system_files.as_ref() else { debug!("bootstrap: notifications skipped, no managed files"); return Ok(()); }; Defensive patterns
Strategy: validation
Validate before calling
if notifications_configured && managed_system_files.is_none() { return Err(anyhow!("notifications configured but system-file preflight did not run")); } Type guard
let files_ready = managed_system_files.as_ref().map(|(f, d)| !f.is_empty() || !d.is_empty()).unwrap_or(false);
Try / catch
match managed_system_files.as_ref() { Some((f, d)) => validate_notifications(f, d, ...)?, None => bail!("managed system files missing for notifications"), } Prevention
- Keep bootstrap phase ordering centralized so preflight always precedes validation
- Never add a bootstrap part to the skip list without checking its dependents
- Cover phase combinations (notifications + skipped files) with tests
When it happens
Trigger: `notifications_configured` is true (a [notifications] bootstrap config exists) while `managed_system_files` is None — typically because the BootstrapPart::Files preflight was skipped via the skip list or the preflight function was not called before the notifications validation block.
Common situations: Running a partial bootstrap (a skip list used by tests or `mise bootstrap --only`) that includes notifications but excludes the files preflight; refactors that reorder bootstrap phases.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- configured notifications prepared services
- declaring bootstrap config is loaded
- system files were preflighted when not skipped
- BootstrapPart values have clap names
- config index exists
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/0bf4cfa753aef94e.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/bootstrap.rs:1395
let services_enabled = !skip.contains(&BootstrapPart::Services);
let notifications_configured =
managed_system_files
.as_ref()
.is_some_and(|(files, directories)| {
files.iter().any(|file| !file.notify.is_empty())
|| directories
.iter()
.any(|directory| !directory.notify.is_empty())
});
let configured_services = if services_enabled || notifications_configured {
Some(system::services::prepare_requests_from_config(&config)?)
} else {
None
};
if notifications_configured {
let (files, directories) = managed_system_files
.as_ref()
.expect("configured notifications came from managed files");
let services = configured_services
.as_ref()
.expect("configured notifications prepared services");
let user_services = system::services_common::user_service_names(&config)?;
system::services::validate_notifications(files, directories, services, &user_services)?;
}
let mut managed_services =
services_enabled.then_some(configured_services.unwrap_or_default());
let user_services = if services_enabled {
system::user_services::requests_from_config(&config)?
} else {
vec![]
};
let mut managed_firewall = if skip.contains(&BootstrapPart::Firewall) {
None
} else {
system::firewall::prepare_request_from_config(&config)?
};View on GitHub (pinned to afd2eddd3a)