{"record":{"id":"6fa6ad2b2ba45632","repo":"jdx/mise","slug":"repository-application-paused-reconcile-repositor","errorCode":null,"errorMessage":"repository application paused: reconcile repository conflicts first: {}","messagePattern":"repository application paused: reconcile repository conflicts first: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/run.rs","lineNumber":1041,"sourceCode":"        return Ok(None);\n    };\n    if heads.base.as_ref() == Some(remote) {\n        return Ok(None);\n    }\n    let (merged, conflicts) = repo.merge_tree(local, remote)?;\n    let tree = tracked.manifest.write(repo, &merged)?;\n    let roots = Roots::current();\n    if repo.output_tree_of(local)? == tree && conflicts.is_empty() {\n        return Ok(None);\n    }\n    let unresolved: Vec<_> = conflicts\n        .into_iter()\n        .filter(|path| {\n            path != crate::system::history::manifest::PATH && !eligible(&roots, tracked, path)\n        })\n        .collect();\n    if !unresolved.is_empty() {\n        bail!(\n            \"repository application paused: reconcile repository conflicts first: {}\",\n            unresolved.join(\", \")\n        );\n    }\n    Ok(Some(tree))\n}\n\n/// A bootstrap finished: the declarations that arrived through sync are\n/// applied now, so `status` stops asking for one.\npub(crate) fn bootstrap_completed() {\n    let state_dir: &Path = &crate::dirs::STATE;\n    let status = match read_status(state_dir) {\n        Ok(status) => status,\n        Err(err) => {\n            warn!(\"history: could not record that the bootstrap ran: {err:#}\");\n            return;\n        }\n    };","sourceCodeStart":1023,"sourceCodeEnd":1059,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/sync/run.rs#L1023-L1059","documentation":"The history sync's incoming_repository_tree refuses to build the repository tree while dotfiles tracked in the repository conflict with the live directory. The unresolved paths are listed in the message so the user can reconcile them manually. Sync is deliberately paused instead of silently overwriting conflicting content.","triggerScenarios":"Running the history sync flow (run -> prepare -> incoming_repository_tree) when the computed `unresolved` list — paths that are neither the manifest nor eligible under the capture roots/tracked set — is non-empty.","commonSituations":"A file moved or renamed outside mise so it is tracked in history but no longer matches an eligible capture root; manual edits creating conflicts between committed dotfiles and on-disk state; a partially completed migration.","solutions":["Reconcile each path listed after the colon: restore, remove, or re-track it so it becomes eligible.","Run the appropriate history re-track/repair command for the conflicting paths so `eligible()` accepts them.","If the path should no longer be managed, remove it from the tracked set/manifest and let sync rebuild the tree."],"exampleFix":"// before: file tracked but moved outside the capture root\n// after: re-track it at its new location so it is eligible\nmise history track ~/new-location/settings.json","handlingStrategy":"validation","validationCode":"// check for unresolved conflicts before syncing\nlet unresolved: Vec<_> = paths.into_iter().filter(|p| p != manifest::PATH && !eligible(&roots, tracked, p)).collect();\nif !unresolved.is_empty() { eprintln!(\"resolve first: {}\", unresolved.join(\", \")); return; }\n// proceed with sync","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run the history conflict/repair listing before each sync.","Avoid moving tracked files outside capture roots without re-tracking.","Keep tracked set and manifest in sync with on-disk layout."],"tags":["sync","conflict","state"],"backgroundTag":"invalid-state-transition","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"}