jdx/mise · error

configured notifications came from managed files

Error message

configured notifications came from managed files

What it means

Internal invariant while validating [bootstrap.files]/[bootstrap.directories] `notify` configuration. `notifications_configured` is itself derived from `managed_system_files` being Some and containing notify entries (src/cli/bootstrap.rs:1162-1170), so when it is true, `managed_system_files.as_ref()` at line 1177 must be Some. The expect documents that notifications only come from managed files and guards against future refactors that compute notifications from another source.

Source

Thrown at src/cli/bootstrap.rs:1179

        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");
            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

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. If hit as a user: this is a bug in that mise build — update or pin a released version
  2. Workaround: remove `notify` keys from [bootstrap.files]/[bootstrap.directories] entries, or run `mise bootstrap --skip=files`
  3. As a contributor: derive notifications_configured and managed_system_files from the same source, or replace the expect with an explicit error naming the divergent source
  4. Report with the panic backtrace at https://github.com/jdx/mise/issues

Example fix

// before: notifications computed from a new independent source
let notifications_configured = config_has_notify_anywhere(&config); // diverges from managed files

// after: keep the single source of truth
let notifications_configured = managed_system_files.as_ref().is_some_and(|(files, dirs)| {
    files.iter().any(|f| !f.notify.is_empty()) || dirs.iter().any(|d| !d.notify.is_empty())
});
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: Only reachable via a code change that sets notifications_configured independently of managed_system_files (or clears managed_system_files while notify config exists) — then `mise bootstrap` with notify entries panics at validate_notifications. No user flag combination reaches it: with the files part skipped, managed_system_files is None AND notifications_configured is false.

Common situations: Contributors adding a new notification source (e.g. service-level notify) without updating this branch; broken custom builds. Normal runs with --skip=files plus notify config do not trigger it because notifications_configured follows managed_system_files.

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/0bf4cfa753aef94e. Report an issue: GitHub.