On this page

0162: vc merge granularity is the item

Status: Accepted — implementation authorized 2026-11-05

Context

About 50 agents will edit one codebase at once. Line merges produce text that has no meaning to the compiler and that agents must spend tokens reading. Semantic merges of whole refactors are hard to get right. Storage is units keyed by outline selectors (ADR-0161).

Decision

sync and the merge queue run merge3(base, ours, theirs). The base is the base recorded in the branch tip's commit, or the tip itself once a landing has moved the branch onto the protected history. No ancestor search is needed. merge3 is a pure function of three trees and never runs the resolver. Units are matched by key within each module:

A conflicted file becomes raw, with markers for each conflicting unit, and commit refuses it until its markers are gone. A clean merge is not trusted on its own: the protected branch advances only after the merge queue gates the merged tree.

Consequences

The rules are few, deterministic and syntactic. Two agents editing the same function conflict even when their lines are disjoint; M-VC.11 measures how often.

Some semantic breakage merges cleanly, for example:

The queue gate catches it, not the merge.

Alternatives