Sync conflict without an ancestor: alarm, not merge
My Plane page mirror classifier uses a sha256 hash as the single judge, and a two-sided change on a one-way path collapses into an alarm instead of a merge.
TL;DR
The sync classifier checks normalized body hashes against the last push to decide what changed. On this one-way setup, if both the repo and Plane edits diverge, it flags plane-changed and refuses to pull, keeping the repo as source of truth. You resolve it by pushing from the repo again, which resets the baseline and returns the status to clean.
A red alarm on screen, not an automatic merge
My Plane page mirror status scanner finished a run, and one line caught my eye: a plane-changed alarm, complete with the note "git wins, pull is refused". Even though it felt like both sides had changed. My first reflex at that moment was simple: a sync tool should be smart enough to merge those two changes automatically, since the content looked similar anyway.
That guess was very wrong.
After opening the logic of classify_page_status in pagesync.py, I found a design that deliberately refuses to be smart. On the one-way path, changes on both sides are never reported as a conflict to be reconciled. They collapse into a single alarm: the repo wins, the pull is refused, and I myself have to re-push so both sides converge again.
That decision initially felt like a half-finished mode. It turned out to be the only honest design.
Hash as the only judge
The classifier has six possible outcomes, plus one on the tier side:
clean: hashes on both sides match the last recorded staterepo-changed: git moved, its job is to pushplane-changed: Plane moved, including the one-way path alarmboth-changed: only appears on the two-way pathblocked: the page is locked, archived, or the marker doesn't matchmissing-pageandorphan-page: a missing page, or a missing git file
Every decision above rests on exactly one thing: the SHA256 hash of the normalized body. Page names and update timestamps are only diagnostic data, not deciders.
The other key is the last_sync dictionary that stores repo_sha256 and plane_sha256 from the last sync. This dictionary is the replacement for the "ancestor", the version known to be correct on both sides before they started drifting. Without that baseline, the tool chooses to treat every difference as potential damage, not a merge invitation.
The result shape is deliberately flat and easy to read for both machines and humans:
result = classify_page_status(
relative_path="meeting.md",
tier="oneway",
mapped=True,
file_text=repo_file,
plane_html=plane_page,
last_sync=last_sync,
)
# {"status": "plane-changed",
# "detail": "plane moved; ONE-WAY ALARM: git wins - re-push to converge"}
Git and rsync answered this long ago
This way of thinking is actually borrowed from Git. To merge two branches safely, Git needs three versions: stage 1 is the common ancestor, stage 2 is our version, stage 3 is theirs [1]. If the three of them cannot be reconciled automatically, the merge stops instead of guessing [2]. Git deliberately refuses to be smart at the risky point.
rsync teaches the other side. Its built-in quick check only looks at file size and modification time, not content. Accurate content checksum comparison is the optional path you must enable explicitly with the -c flag [3]. So a transfer tool as old as rsync already knew: content comparison is expensive, and it may only be used when actually requested.
Alarm-first is not degraded mode
Many people imagine that good synchronization quietly resolves everything in the background. My opinion is the opposite: a tool that merges changes without a recorded baseline is not a smart tool. It is just guessing, and guessing in data matters is a recipe for losing information silently.
That is why the collapse rule in my system is kept simple. One-way path, both sides moving? The result immediately becomes a plane-changed alarm. Re-push to converge is deterministic: the end state is guaranteed to match the repo. A silent pull, meanwhile, is an invitation to uncertainty, because it has to guess which side is "correct" without an ancestor to act as judge.
There is a trade-off I accept consciously: this tool becomes "noisier" than a sync tool that silences every conflict. But explainable noise is far cheaper than losing writing whose disappearance nobody can date.
So now, every time I see an alarm line in the scanner, I no longer see it as a tool failure. It is actually the sign of a tool that knows exactly where its limits are, then hands the final decision to the only party with full context: me.
Sources: [1] Pro Git, Advanced Merging: stage 1 is the common ancestor, stage 2 is your version, stage 3 is from the MERGE_HEAD, accessed 2026-09-29 [2] git-merge manual: "A merge stops if there's a conflict that cannot be resolved automatically", accessed 2026-09-29 [3] rsync(1) man page: quick check by size or mtime; checksum via -c, accessed 2026-09-29