Skip to content

fix(design-ledger-gate): fail on unresolved merge conflict markers - #1203

Merged
trunk-io[bot] merged 2 commits into
mainfrom
compass-server/rig-3520-gate-conflict-markers
Sep 13, 2026
Merged

fix(design-ledger-gate): fail on unresolved merge conflict markers#1203
trunk-io[bot] merged 2 commits into
mainfrom
compass-server/rig-3520-gate-conflict-markers

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

The gate parsed a governed file with conflict markers in it and reported OK
with rc=0: markers sit between rows, so id uniqueness, status grammar and link
resolution all still pass. Verified before the fix on a marker-bearing
DECISIONS.md.

That matters because the ledger is one append-only file every lane appends to,
so conflicts are the steady state rather than an incident, and the pre-enqueue
merge-result check runs the gate over an extracted tree. git merge-tree exits
non-zero on a conflict but still prints a tree OID, so a recipe that skips the
exit code extracts a marker-bearing file and the gate blessed it.

Both git and jj marker styles are matched, across the ledger and every record.

rumdl is not a second net

A future reader will otherwise assume the markdown gate would have caught this.
It does not. On a marker-bearing DECISIONS.md, rumdl check reports a single
MD058 "missing blank line after table" — a blank-line nit, auto-fixable — and
rumdl fmt then formats around the markers: it reports Fixed 1/1 issues,
leaves all three markers in the file, and rumdl check afterwards reports
Success: No issues found. So the one incidental signal is consumed by a
formatter that launders the corruption into a clean-looking diff. Verified this
session.

Marker width

The first commit matched runs of exactly 7, which was itself a silent false
negative: git and jj both widen every marker past 7 when the conflicting hunk
holds a marker-like run, and an 11-char marker was not matched at all. The
opener, closer and both jj markers now match 7-or-more (zero false positives
across docs/designs, grep-verified). = deliberately stays exact — six 14-char
= setext underlines live in the manager-prompt record, so widening it would
break the gate for every lane.

Found by compass-ux and compass-managed while flagging a DL-364 collision on
#1169; compass-managed identified the merge-tree exit-code behaviour.

Refs RIG-3520

The gate parsed a governed file with conflict markers in it and reported OK
with rc=0: markers sit between rows, so id uniqueness, status grammar and link
resolution all still pass. Verified before the fix on a marker-bearing
DECISIONS.md.

That matters because the ledger is one append-only file every lane appends to,
so conflicts are the steady state rather than an incident, and the pre-enqueue
merge-result check runs the gate over an extracted tree. git merge-tree exits
non-zero on a conflict but still prints a tree OID, so a recipe that skips the
exit code extracts a marker-bearing file and the gate blessed it.

Both git and jj marker styles are matched, across the ledger and every record.

Refs RIG-3520

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Sep 13, 2026

Copy link
Copy Markdown

RIG-3520

@trunk-io

trunk-io Bot commented Sep 13, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

github-actions Bot commented Sep 13, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-server-rig-3520-gate.compass-eng-docs.pages.dev

Deployed from compass-server/rig-3520-gate-conflict-markers at df0b5b2.

Review found the exact-7 match was a silent false negative. git and jj both
widen every conflict marker past 7 when the conflicting hunk itself holds a
marker-like run, so an 11-char marker slipped through the check entirely —
reintroducing the defect this gate change exists to close. Verified: the
shipped regex returns false for the 11-char forms.

The opener, closer and both jj markers now match 7-or-more, which is
false-positive-free across docs/designs. `=` deliberately stays exact: six
14-char `=` setext underlines live in the manager-prompt record, so widening
it would break the gate for every lane.

Also skips fenced blocks, matching how the rest of this module reads records,
so a record documenting a marker as example text stays green.

Refs RIG-3520

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@trunk-io
trunk-io Bot merged commit ce6735c into main Sep 13, 2026
16 checks passed
@trunk-io
trunk-io Bot deleted the compass-server/rig-3520-gate-conflict-markers branch September 13, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants