bankai/sync/merge
Content-addressed 3-way merge across rigs.
Because every task version is content-addressed (its SHA-256), two sides that agree produce identical hashes and union cleanly. A real conflict is ONLY when the same task id has diverged to different hashes — those are surfaced (never silently overwritten) and routed to conflicts.jsonl.
Types
pub type Conflict {
Conflict(id: String, local_hash: String, remote_hash: String)
}
Constructors
-
Conflict(id: String, local_hash: String, remote_hash: String)
pub type MergeResult {
MergeResult(tasks: List(types.Task), conflicts: List(Conflict))
}
Constructors
-
MergeResult(tasks: List(types.Task), conflicts: List(Conflict))
Values
pub fn clean_merge(
local: List(types.Task),
remote: List(types.Task),
) -> Bool
True when both sides have the same set of hashes (no divergence at all).
pub fn merge(
local: List(types.Task),
remote: List(types.Task),
) -> MergeResult
Merge two task sets. Distinct hashes union; same-id-different-hash -> conflict.