# Merge Quality Gate

**Run the whole suite on the merged result.** Produce one run of every test
against the branch merged with the current target head, not against the
branch alone. A reviewer checks that the run's commit is the merge result
and that no test selection flag narrowed the run.

**Give every skip a reason, an owner and a date.** Produce a one-line
record beside each skipped, ignored or excluded test: why it is off, who
owns turning it back on, and the date it went off. A reviewer checks that
no skip is unattributed, and returns any skip older than 30 days
[ASSUMPTION] to its owner.

**Cover every changed line, or write the exception down.** Produce a
coverage report scoped to the diff — the lines this change adds or
modifies. Default: every changed line is covered, or appears on an
exception list with a one-sentence reason [ASSUMPTION]. Do not gate on a
repository-wide percentage; it hides an untested new module behind old
well-tested code. A reviewer reads the exception list line by line and
rejects any entry whose reason does not name the obstacle.

**Show that the new tests can fail.** Produce the result of running the new
and changed tests against the pre-change code. A reviewer checks that at
least one of them fails when the change under review is reverted, because
a test that passes both ways proves nothing.

**Hand the gate three artifacts, not an opinion.** Produce the suite
result, the skip register and the changed-line exception list. A reviewer
merges only when all three are attached and the first is green.

**Never weaken the gate in the commit that needs it weakened.** Produce a
separate commit for any deleted assertion, loosened threshold, new
coverage exclusion or disabled check, and state the reason in its message.
A reviewer checks that the feature commit contains none of those four, and
treats a threshold change riding along with a feature as a blocked merge.

**Stop at the first red signal.** Produce a stop as soon as a test fails:
diagnose it, and do not re-run the suite hoping for a different result. A
reviewer checks the CI history for repeated runs of the same commit and
asks what changed between them.

**Leave the branch mergeable by someone else.** Produce a diff whose tests
pass from a clean checkout with no local state, no manual setup step and
no hand-seeded database. A reviewer checks that the documented commands
alone take a fresh clone to a green suite.
