{"record":{"id":"16a1256479ff16f7","repo":"jdx/mise","slug":"incoming-setup-has-not-been-completely-applied-run-mise-dot","errorCode":null,"errorMessage":"incoming setup has not been completely applied; run `mise dot pull` before publishing","messagePattern":"incoming setup has not been completely applied; run `mise dot pull` before publishing","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/publish.rs","lineNumber":79,"sourceCode":"                    .collect::<Vec<_>>()\n                    .join(\", \")\n            );\n        }\n        // Accepted choices were validated against saved, live, and remote\n        // versions. Carry their already-encrypted saved objects, not a new\n        // plaintext publication representation.\n        let overlays = conflicts\n            .into_iter()\n            .map(|path| {\n                Ok(crate::system::history::shadow::Overlay {\n                    object: repo.object_at(local, &path)?,\n                    path,\n                })\n            })\n            .collect::<Result<Vec<_>>>()?;\n        let merged = repo.compose(&merged, &overlays)?;\n        if merged != tree {\n            bail!(\n                \"incoming setup has not been completely applied; run `mise dot pull` before publishing\"\n            );\n        }\n    }\n    let Some(candidate) = heads.candidate(repo, &tree)? else {\n        return Ok(None);\n    };\n    if !allow_plaintext_history {\n        super::files::audit_history(repo, &candidate.commit, &Default::default())?;\n    }\n    candidate.adopt(repo)?;\n    Ok(Some(candidate.commit))\n}\n\npub(crate) fn push(\n    remote: &Remote<'_>,\n    branch: &str,\n    commit: &str,","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/sync/publish.rs#L61-L97","documentation":"Publication verifies that the composed merge of the merged tree plus overlays equals the target tree, proving the incoming state was fully applied locally. If the recomposed tree differs, some incoming changes were never applied, and mise aborts the publish with instructions to pull first.","triggerScenarios":"Calling publish when the local working/merged state is missing part of the incoming tree — e.g. partial application after an interrupted pull, manual edits that diverge from the incoming manifest, or overlays that no longer reproduce the merged tree.","commonSituations":"A previous `mise dot pull` was interrupted mid-apply; the user manually deleted or edited files managed by sync; the incoming setup changed (new origin or branch) without pulling.","solutions":["Run `mise dot pull` to fully apply the incoming setup, then retry the publish.","Inspect files managed by sync for manual edits/deletions that diverge from the incoming tree and restore or commit them via pull.","If an interrupted operation left partial state, re-run `mise dot pull` to complete application before publishing."],"exampleFix":"// before: publishing with partially-applied incoming state\nmise dot sync // error: incoming setup has not been completely applied\n// after\nmise dot pull   // completes application of incoming setup\nmise dot sync   // now merged == tree and publish proceeds","handlingStrategy":"validation","validationCode":"// verify the incoming tree was fully applied before publishing\nlet merged = repo.compose(&merged, &overlays)?;\nif merged != tree {\n    eprintln!(\"run `mise dot pull` first\");\n    return;\n}","typeGuard":null,"tryCatchPattern":"match sync() {\n    Err(e) if e.to_string().contains(\"incoming setup has not been completely applied\") => { pull(); sync(); }\n    other => other,\n}","preventionTips":["Always `mise dot pull` after switching origins or branches before syncing.","Do not manually edit or delete files managed by history sync.","Re-run pull after any interrupted sync/pull to complete partial application."],"tags":["sync","git","incomplete-state","pull-required"],"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"}