jdx/mise · error
configured notifications prepared services
Error message
configured notifications prepared services
What it means
A `.expect()` panic in mise's bootstrap command (src/cli/bootstrap.rs:1398). It asserts that when notifications were configured, the services preflight populated `configured_services`. The panic fires when validation proceeds with notifications enabled but no services were prepared, indicating an out-of-order or skipped services preflight phase.
Solutions
- Include the Services part in the bootstrap run when notifications are configured
- Run the services preflight before the notifications validation block
- Guard the notifications block on `configured_services.is_some()` as well
Example fix
// before
let services = configured_services.as_ref().expect("configured notifications prepared services");
// after
let Some(services) = configured_services.as_ref() else { debug!("bootstrap: no services prepared for notifications"); return Ok(()); }; Defensive patterns
Strategy: validation
Validate before calling
if notifications_configured && configured_services.is_none() { return Err(anyhow!("notifications configured but services preflight did not run")); } Type guard
let services_ready = configured_services.as_ref().is_some_and(|s| !s.is_empty());
Try / catch
match configured_services.as_ref() { Some(s) => validate_notifications(files, directories, s, &user_services)?, None => bail!("services not prepared for notifications"), } Prevention
- Validate the skip list against inter-part dependencies before dispatching
- Keep notifications and services phases coupled in one bootstrap part or explicit dependency
- Add unit tests for partial bootstrap runs
When it happens
Trigger: `notifications_configured` is true but `configured_services` is None because the services preflight step was skipped (e.g. BootstrapPart::Services in the skip list) or was never invoked before `validate_notifications`.
Common situations: Running a partial bootstrap (skip lists used by tests or `mise bootstrap --only`) that includes notifications but excludes the services 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 came from managed files
- 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/341c919b8c26b2eb.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/bootstrap.rs:1398
.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)?
};
let mut managed_compose = if skip.contains(&BootstrapPart::Compose) {
None
} else {View on GitHub (pinned to afd2eddd3a)