Expand description
weave land — land a merge, and say for every file git could not merge how
much is known about the result.
Three labels, strongest first:
- PROVEN — weave merged the file cleanly AND the independent merge
certificate (
weave-certify, which shares no merge code with weave) shows the result is the three-way selection of base, ours and theirs. - VERIFIED — the file’s answer passed the exact
gate, and it came from one of two places: an external resolver (any program; seeResolver) wrote it, or weave’s element union did — a clean merge whose both-changed regions the certificate admits only with theelem_unioncheck (UNION_ALLOWANCES). No resolver is called for the second; seeland_unitfor why it is VERIFIED and not PROVEN. - REFUSED — nothing above holds. The file keeps its conflict markers and stays unmerged in the index; the resolver’s answer is never written.
In a blind evaluation, a cheap model’s accepted merges behind this gate were
wrong 9.5% of the time, against 22.0% without it — plus one rule added
since, DROPPED, after an answer that kept only one side of a conflict block
passed it. Every check that reads weave check is asked of weave’s own
verifier here (crate::worktree::check) rather than restated.
Scope: the files git’s line merge conflicts on (content, add/add,
modify/delete), and every other file both sides changed whose merge — the
answer in the tree, else git’s line merge — is not git’s line merge or
fails weave’s own merge check (weave_core::verify::verify: a line both
kept lost, a line or a case label / map key stated twice). The rest are
counted as not_examined: git merged them line-cleanly and the check
passed. An answer the tree already holds (a file the merge driver
resolved; --result’s file) is judged before any resolver. Each file
is checked on its own three stages, as the gate was measured; a cross-file
effect (a caller in another file) is outside it.
Structs§
- File
Report - One file’s line in the report.
- Gate
Finding - One reason the gate gave, in the words fed back to a resolver.
- Gate
Verdict - The gate’s answer: it passes iff
reasonsis empty. - Landing
- What a
rundecided. - Plan
- The merge to land, read out of git.
- Resolver
- Run
- A non-publishing landing in
dir: the mergeweave land(without--onto/--queue) runs, shared by the CLI and the MCP server. - Unit
- One file git could not merge: its three stages (absent =
None) and git’s own line merge of it, conflict markers and all.
Enums§
- Answer
- What the resolver said.
- Candidate
- A proposed resolution of one file.
- Kind
- How git’s merge left the file.
- Landed
- What to leave in the working tree for a file.
- Present
- Where the answer already in the tree is read, for
plan. - Status
Constants§
- DEFAULT_
RESOLVER_ TIMEOUT_ SECS - An external resolver: a shell command run once per attempt.
- PROOF_
ALLOWANCES - The certificate’s rule set, v2: a both-changed region is certified only by
one of these allowances. v1 had
imp_strictwhere v2 hasimp_used—imp_strictplus a check that every import line one side added that the merge keeps binds a name the merged file uses. - SCHEMA
- Version tag of the JSON report / certificate document.
- UNION_
ALLOWANCES - What else may admit a both-changed region of weave’s clean merge, for a
VERIFIED landing (never PROVEN):
elem_union, the certificate’s own check of an element union (weave_certify::elem), andnest_eu,nestwith children it admits. Not in the proof rule set, so a file that needs one of these must also pass the gate.
Functions§
- document
- The whole run, as
--jsonprints it and--certificatewrites it. - gate
- The exact gate: check
candagainst the file’s three stages. - land_
unit - Land one file: weave, then the certificate, then the resolver behind the
gate.
Erronly for a failure of the whole run (the resolver cannot be started at all). - plan
- Read the merge
base×ours×theirs(each defaulting asweave checkdoes: HEAD, the operation in progress, their merge base) and classify every file both sides changed. - render
- The human summary.
- run
- Plan the merge in
dir, land every unit, and in the working tree write the PROVEN and VERIFIED files back. - write_
back - Write every file’s outcome into the working tree and index at
dir: PROVEN / VERIFIED files are written and staged (a verified DELETE is removed); a REFUSED file keeps its conflict markers and is put back to unmerged, sogit commitrefuses until someone resolves it.