{"record":{"id":"a6f4475d40cdef50","repo":"jdx/mise","slug":"error-a6f447","errorCode":null,"errorMessage":"{}: {}","messagePattern":"\\{\\}: \\{\\}","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/preflight.rs","lineNumber":121,"sourceCode":"            excludes.extend(history.exclude);\n        }\n        files.insert(\n            path,\n            Arc::new(parsed) as Arc<dyn crate::config::config_file::ConfigFile>,\n        );\n    }\n    // File composition expects highest precedence first.\n    files.reverse();\n    crate::system::files::validate_incoming_files(&files)?;\n    let requests = crate::system::files::files_from_config_files(&files);\n    crate::system::files::validate_composed_file_footprints(&requests)?;\n    let mut declarations = TrackedSet {\n        exclude: excludes,\n        ..Default::default()\n    };\n    declarations.add_requests(requests);\n    if let Some(invalid) = declarations.invalid.first() {\n        bail!(\"{}: {}\", invalid.path, invalid.reason);\n    }\n    declarations.exclude_set()?;\n    // The repository inventory, not a source or output mentioned by incoming\n    // configuration, determines which files the batch may install.\n    let mut prospective = tracked.clone();\n    prospective.required_sources = declarations.required_sources;\n    Ok(prospective)\n}\n\n/// Required source files must exist in the complete proposed write set or\n/// already be available locally. A queued deletion is not an available source.\npub(super) fn sources(repo: &HistoryRepo, tracked: &TrackedSet, plans: &[PathPlan]) -> Result<()> {\n    let roots = Roots::current();\n    for source in &tracked.required_sources {\n        let planned = plans\n            .iter()\n            .find(|plan| roots.locate(&plan.branch_path).path() == Some(source.as_path()));\n        match planned.and_then(|plan| plan.apply.as_ref()) {","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/sync/preflight.rs#L103-L139","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the `<reason>` part of the message for the specific violation at `<path>`","Fix or remove the offending declaration in the shared configuration and commit","Re-run the sync/pull after the shared setup is corrected"],"exampleFix":"// before (shared config declares an out-of-root path)\n[[files]]\npath = \"../../etc/hosts\"\n// after\n[[files]]\npath = \"config/hosts-note.txt\"","handlingStrategy":"validation","validationCode":"// before applying the batch, validate tracked declarations\nif !declarations.invalid.is_empty() {\n    eprintln!(\"{}: {}\", declarations.invalid[0].path, declarations.invalid[0].reason);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep tracked file declarations inside the allowed roots","Avoid conflicting duplicate declarations for the same path","Validate the shared setup with the same TrackedSet checks before pushing"],"tags":["history-sync","validation","preflight"],"backgroundTag":"schema-validation-failed","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}