jdx/mise · error
enrollment conflict in {field}; reconcile repository metadat
Error message
enrollment conflict in {field}; reconcile repository metadata before syncing What it means
Thrown by `choose` in manifest.rs during three-way merge of enrollment metadata (`Enrollment::merge`). If a field differs between local and remote, and local also differs from base (i.e. both sides changed it), the merge is genuinely conflicted and cannot be resolved automatically; the library asks the user to reconcile repository metadata manually.
Source
Thrown at src/system/history/manifest.rs:140
self.permissions.insert(portable, *bits);
}
}
self.remove_unenrolled_permissions();
Ok(())
}
/// Merge enrollment by portable path rather than JSON line positions.
/// Independent additions and policy edits commute; deletion versus a
/// policy edit remains a conflict, never an implicit reenrollment.
pub(crate) fn merge(base: &Self, local: &Self, remote: &Self) -> Result<Self> {
use std::collections::BTreeMap;
fn choose<T: Clone + Eq>(base: &T, local: &T, remote: &T, field: &str) -> Result<T> {
if local == remote || remote == base {
Ok(local.clone())
} else if local == base {
Ok(remote.clone())
} else {
bail!(
"enrollment conflict in {field}; reconcile repository metadata before syncing"
)
}
}
base.validate()?;
local.validate()?;
remote.validate()?;
if local == remote || remote == base {
return Ok(local.clone());
}
if local == base {
return Ok(remote.clone());
}
let indexed = |manifest: &Self| {
manifest
.enrollment
.iter()
.map(|entry| (entry.path.clone(), entry.clone()))View on GitHub (pinned to afd2eddd3a)
Solutions
- Manually edit the enrollment metadata to the desired value on the local side.
- Pull/reset the remote metadata so one side wins, then re-apply your change and sync again.
- Re-enroll the affected path to regenerate consistent metadata.
- If the remote value is authoritative, reset local metadata to remote before syncing.
Defensive patterns
Strategy: validation
Validate before calling
// compare local vs remote enrollment metadata before sync; // resolve differing fields manually when both changed since base
Try / catch
// on "enrollment conflict in {field}": stop, edit the manifest field,
// and re-run the sync instead of retrying blindly Prevention
- Sync enrollment metadata from one machine at a time.
- Pull remote metadata changes before making local edits.
- Avoid force-pushing rewrites of dotfile repository metadata.
When it happens
Trigger: Syncing enrollment state when both this machine and the remote repository edited the same enrollment field (e.g. variant name, target path) since the common base version.
Common situations: Editing dotfile enrollment on two machines and syncing both ways; rebasing history where a remote force-push rewrote metadata; merging branches that both modified the manifest.
Related errors
- {} changed in the complete repository merge; reconcile again
- sync paused: resolve conflicts across the complete repositor
- base image {ref_} has {} layers in its manifest but {} diff_
- packslip:{project}@{version}: manifest digest differs from s
- the packslip names an executable {:?}, which is not a plain
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/f4f9188d2239680a.
Report an issue: GitHub.