Lacunari

Writing

Content addressing makes merge conflicts impossible

Not "rare". Not "easier to resolve". Structurally impossible — for the class of merge where two parties are combining what they hold. The reason is one design decision, and almost everything else follows from it.

Key every document by the SHA-256 of its contents. That is the whole trick. Everything below is a consequence.

Consequence one: deduplication stops being a chore

Three people upload the same scan under three filenames — arnhem_final.pdf, Scan_0043.pdf, bridge (copy).pdf. Filename-based systems produce three records and a cleanup task nobody wants. Content addressing produces one document with three contributions.

Note what is preserved: all three people keep their attribution. The duplication is not discarded, it is reinterpreted. Three independent parties holding identical bytes is not a filing error — it is corroboration, and it is now queryable.

arnhem_final.pdfalice Scan_0043.pdfbob bridge (copy).pdfpriya SHA-256 → One document 4f2a1c8e9b03… Three contributions alice · bob · priya — all credited
Deduplication is not cleanup, it is evidence. Three people independently holding identical bytes is corroboration, and content addressing detects it without anyone agreeing on a filename.

Consequence two: merging is a union

When two organisations combine catalogues, the same document has the same hash on both servers, whatever either of them called it. There is no reconciliation step because there is nothing to reconcile. Set union. Commutative, associative, idempotent — pull twice and nothing changes.

Compare with git, where merging two branches that touched the same lines requires a human to adjudicate. That is not a flaw in git; it is inherent to addressing content by path. Two files at the same path with different bytes are a genuine conflict. Two files with the same bytes at different paths are, under content addressing, simply the same file.

What this does not solve

Being precise matters more than being impressive here.

  • Two people editing the same file into different states is still a real conflict. Different bytes, different hash, two documents. Content addressing does not merge text — for that, Lacunari shells out to git merge-file, because git's merge algorithm was never the problem.
  • It does not stop the conflict from happening. That is what path locks are for: a claim locks the files a task declared, so the second worker is refused before it starts rather than reconciled afterwards.
  • It says nothing about whether a document is correct. A hash proves the bytes are unchanged. It does not prove they are true.

Consequence three: disagreement survives

This is the part that matters most in a research context and gets designed away most often.

Two groups hold the same photograph. One dates it 1943 and captions it Arnhem; the other dates it 1944 and captions it Nijmegen. A conventional sync picks a winner — last write, highest priority, whoever synced most recently — and the losing reading is gone.

That is destruction of evidence dressed up as data hygiene. The fact that two competent groups disagree is itself a finding, and frequently the most interesting one in the corpus. So both readings are kept, the contradiction is recorded, and a peer's catalogue is treated as evidence, not authority: pulling never overwrites your metadata.

Consequence four: you can search what you do not hold

Because a catalogue is hashes plus metadata, it is small. You can pull a peer's entire catalogue, search it, and fetch only the documents worth having — verified on arrival, because you already know the hash you asked for. Trust the bytes without trusting the sender.


Federation in practice →  ·  Why not just use git?