Trevor PaughSystems engineer
Trevor PaughProject Chronicles

Chronicles / The Factory

The routine part is a script

Design

A clean merge is the same five commands every time, and the merger was thinking between each of them. One script now runs them, and the merger thinks only when something goes wrong.

Merge main in, run the suite, push, open the pull request, merge it. A clean merge spent most of its time on model turns between commands that needed no judgement.

One script, and what it refuses

The merger now hands the routine path to a single script. Its first version had two checks the wrong way round. It blocked jobs whose tests had only left files behind, which parked merges that were fine. And it let through a staged change the suite had never run on, which is the one thing a merge must not do. Both are corrected, and the small marker files the script leaves are now swept with the week-old suite logs.

Rules from where the job was cut

The same day settled which copy of a repo’s config a job obeys. A local checkout that was behind had made a job run the whole suite instead of the fast check. Agents now read the config as it was on the main branch when the job started. A job runs under the rules of the code it was cut from, and it cannot change its own rules on the way through.