Skip to content
quarry View Ticket
Login

View Ticket

web: show a conflicted landing as blocked, and disable accept

Closedc4e7169bee3a46910715ac808c27b38d72b2792dCreated 99.1 days agoUpdated 67.9 days ago
Description2026-08-23 21:20:29
zit#131 shipped the half of never-committing-a-conflict that zit owns: 'zit landing show -R' reports mergeability read from the store without writing anything ('merges clean' / 'merges conflict (N)' followed by one 'conflict PATH' line each), and 'zit landing accept -R' refuses a conflicting landing with exit status 5, the store byte-unchanged and every conflicting path named. Quarry owns the other half -- surfacing it. A landing whose branch conflicts must render as BLOCKED, naming the paths, with the accept control disabled rather than offered-and-failing, and telling the author to merge the target into their branch and push: the shape every forge uses. Read mergeability from 'landing show'; never discover it by attempting an accept, which is the one thing a server must not do. Distinguish exit 5 from exit 1 -- the first is a state to render, the second is a bug to report. Complements the landing detail ticket, which predates mergeability existing and does not cover the conflicted state.
2026-08-23 21:37:58

Done. zit#131's probe is now the only way quarry learns mergeability.

  • zit landing show -R is read on landing.get for OPEN records only — a settled one merged or did not, and probing it spends a store read to answer what history already settled. Parsed states: clean, up-to-date, conflict (N) with one conflict PATH line each.
  • A conflicted landing renders BLOCKED: the paths named, and the instruction ("merge the target into your branch, resolve, push") rather than just a warning. AcceptState() is the one function the button and the banner both read, so they cannot disagree.
  • Accept is DISABLED while conflicted, never offered-and-failing.
  • Exit 5 is distinguished from exit 1 in zitcli: 5 becomes a typed *LandingConflict carrying the paths and maps to ErrInvalid — a state to render. 1 stays ErrNoEntry — a fault to report.
  • Unknown ("") is never treated as clean. A store quarry cannot shell into answers nothing, and offering accept on an unchecked branch is the exact failure the probe exists to prevent.

Tests: the parse pinned against real zit output (probe on stdout, refusal on stderr where each line carries the verb prefix and one is prose); an end-to-end harness test that builds genuinely divergent branches in a real store, opens a landing, and asserts the page says "conflicts with", names f.txt, and does NOT render the accept control.