Trevor PaughSystems engineer
Trevor PaughProject Chronicles

Chronicles / The Factory

The merger does not fix tests

Decision

A live check caught the merger editing a test's expected value to get a job through. It may now repair only what the merge itself broke, and never a test; everything else goes back for the one automatic rework.

The merger is the last agent in the line. It merges main into a finished job, runs the whole suite and merges the job. When the suite failed after merging main, it was allowed to fix the damage.

What it did with that

A live check found it editing a test’s pinned value, and a file that came from main, under the heading “Fix after merging main”. The result was merged code that no reviewer had seen. The suite was green because the merger had changed what green meant.

The narrower rule

The merger may now repair a failure only when the merge of main caused it and the fix stays inside files it merged. It never edits a test or an expected value. Any other failure parks the job for the automatic rework, where a builder fixes it and the reviewers look again.

Limits kept where they cannot be edited

The same day closed the gaps around that rework. The one-rework limit used to live in a file the builder can change; the factory now enforces it itself. The reviewed commit of a conflict resolution must be named in full, so “is this the commit that was reviewed” has one answer. And the failed test output the approver reads arrives marked as data, because it is written by tests and tools and the approver decides what merges.