jdx/mise · error

{}: {}

Error message

{}: {}

What it means

Generic wrapper thrown in prospective() when the tracked-set built from incoming requests contains an invalid declaration. The message is `<path>: <reason>` where invalid.path is the offending file and invalid.reason explains why the declaration is invalid (per TrackedSet validation).

Solutions

  1. Read the `<reason>` part of the message for the specific violation at `<path>`
  2. Fix or remove the offending declaration in the shared configuration and commit
  3. Re-run the sync/pull after the shared setup is corrected

Example fix

// before (shared config declares an out-of-root path)
[[files]]
path = "../../etc/hosts"
// after
[[files]]
path = "config/hosts-note.txt"
Defensive patterns

Strategy: validation

Validate before calling

// before applying the batch, validate tracked declarations
if !declarations.invalid.is_empty() {
    eprintln!("{}: {}", declarations.invalid[0].path, declarations.invalid[0].reason);
}

Prevention

When it happens

Trigger: Incoming shared configuration declares tracked file requests whose entry in declarations.invalid is non-empty; the first invalid entry's path and reason are surfaced verbatim.

Common situations: A teammate's shared setup references paths outside allowed roots, duplicates a path with conflicting modes, or otherwise declares a tracked file mise considers invalid for the batch.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at src/system/history/sync/preflight.rs:121

            excludes.extend(history.exclude);
        }
        files.insert(
            path,
            Arc::new(parsed) as Arc<dyn crate::config::config_file::ConfigFile>,
        );
    }
    // File composition expects highest precedence first.
    files.reverse();
    crate::system::files::validate_incoming_files(&files)?;
    let requests = crate::system::files::files_from_config_files(&files);
    crate::system::files::validate_composed_file_footprints(&requests)?;
    let mut declarations = TrackedSet {
        exclude: excludes,
        ..Default::default()
    };
    declarations.add_requests(requests);
    if let Some(invalid) = declarations.invalid.first() {
        bail!("{}: {}", invalid.path, invalid.reason);
    }
    declarations.exclude_set()?;
    // The repository inventory, not a source or output mentioned by incoming
    // configuration, determines which files the batch may install.
    let mut prospective = tracked.clone();
    prospective.required_sources = declarations.required_sources;
    Ok(prospective)
}

/// Required source files must exist in the complete proposed write set or
/// already be available locally. A queued deletion is not an available source.
pub(super) fn sources(repo: &HistoryRepo, tracked: &TrackedSet, plans: &[PathPlan]) -> Result<()> {
    let roots = Roots::current();
    for source in &tracked.required_sources {
        let planned = plans
            .iter()
            .find(|plan| roots.locate(&plan.branch_path).path() == Some(source.as_path()));
        match planned.and_then(|plan| plan.apply.as_ref()) {

View on GitHub (pinned to 533346cc37)