jdx/mise · error

configured notifications prepared services

Error message

configured notifications prepared services

What it means

Internal invariant directly following the previous one: `configured_services` is computed as Some(...) when `services_enabled || notifications_configured` (src/cli/bootstrap.rs:1171-1175). Inside `if notifications_configured`, the unwrap at line 1180-1182 therefore always succeeds because notifications_configured implies the prepare branch ran. The expect is a refactor guard tying notification validation to service preparation.

Source

Thrown at src/cli/bootstrap.rs:1182

                .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");
            system::services::validate_notifications(files, directories, services)?;
        }
        let mut managed_services =
            services_enabled.then_some(configured_services.unwrap_or_default());
        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 {
            Some(system::compose::prepare_requests_from_config(&config)?)
        };
        let dry_run_compose_actions = if self.dry_run
            && managed_compose
                .as_ref()
                .is_some_and(|projects| !projects.is_empty())

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. If hit as a user: update mise — the build is broken, config is not at fault
  2. Workaround: strip `notify` from bootstrap files/directories config so the validation branch is skipped
  3. As a contributor: keep `services_enabled || notifications_configured` as the prepare condition, or downgrade the expect to a bail! naming the invariant
  4. Report with backtrace at https://github.com/jdx/mise/issues

Example fix

// before (broken refactor):
let configured_services = services_enabled
    .then(|| system::services::prepare_requests_from_config(&config).ok().flatten()) // None when skipped
    ...expect("configured notifications prepared services"); // panics

// after: notifications force service preparation
let configured_services = if services_enabled || notifications_configured {
    Some(system::services::prepare_requests_from_config(&config)?)
} else {
    None
};
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: Only a source change that computes configured_services without including notifications_configured in its condition (or that enters validate_notifications without preparing services) — panics during `mise bootstrap` when notify entries exist. Unreachable via CLI flags in the current code.

Common situations: Contributors restructuring the services preflight conditions; broken builds. Real runs with `--skip=services` plus notify config still prepare services precisely because notifications_configured forces the Some branch.

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


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/341c919b8c26b2eb. Report an issue: GitHub.