jdx/mise · error

bootstrap plan contains resources with unknown state

Error message

bootstrap plan contains resources with unknown state

What it means

With `mise bootstrap --detailed-exitcode`, a plan whose resources have indeterminate ('unknown') state is treated as an error because mise cannot safely report whether changes would occur. This bail fires when output.summary.has_unknown() is true.

Solutions

  1. Rerun without --detailed-exitcode to see which resources are in an unknown state and why
  2. Fix the underlying check failures (connectivity, permissions, missing tools) that leave resources unknown
  3. Rerun bootstrap normally so state is refreshed, then retry with --detailed-exitcode
Defensive patterns

Strategy: validation

Validate before calling

if plan.summary.unknown > 0 { console.warn('unknown-state resources; fix before --detailed-exitcode') }

Prevention

When it happens

Trigger: Running `mise bootstrap --detailed-exitcode` (or `--plan --detailed-exitcode`) when the plan output contains resources whose state could not be determined (summary.unknown > 0).

Common situations: A hook or resource check failed to run (e.g. remote host unreachable, missing permissions) so its state is unknown; the user asked for exit-code semantics but got ambiguity.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/c55bbbba8eea88d0. Report an issue: GitHub.

Appendix: source

Thrown at src/cli/bootstrap.rs:2453

                        .origin
                        .as_ref()
                        .map(|origin| origin.config.display_user())
                        .unwrap_or_default(),
                ]);
            }
            table.print()?;
            miseprintln!(
                "Plan: {} create, {} update, {} unchanged, {} remove, {} unknown",
                output.summary.create,
                output.summary.update,
                output.summary.unchanged,
                output.summary.remove,
                output.summary.unknown,
            );
        }
        if self.detailed_exitcode {
            if output.summary.has_unknown() {
                bail!("bootstrap plan contains resources with unknown state");
            }
            if output.summary.has_changes() {
                return Err(crate::request_exit(2));
            }
        }
        Ok(())
    }
}

impl BootstrapConfigRoots {
    async fn run(self) -> Result<()> {
        let config = Config::get().await?;
        let roots = config
            .selected_bootstrap_config_maps()
            .map(|(config_root, config_files)| {
                let mut environments = vec![];
                let mut declares = BootstrapConfigRootDeclarations::default();
                for cf in config_files.values().rev() {

View on GitHub (pinned to 533346cc37)