Trevor PaughSystems engineer
Trevor PaughProject Chronicles

Chronicles / The Factory

The factory audits itself

Progress

A whole-repo audit of the Factory found that it could call a job merged before its pull request had merged. Seven small jobs over four days fixed that and the other places where the pipeline's report and the truth could differ.

The Factory’s whole promise is that its status can be trusted without anyone looking. The audit went hunting for the places where that was not yet true.

Merged means merged

A pull request still waiting on its checks was shown as merged. It now shows as needing the owner. When the merger looks a pull request up by branch name it accepts only one from the job’s own repo, and when a branch has several it picks the open one, then a merged one, then a closed one. An old closed pull request can no longer stand in for a live one.

Values stay as typed

The job store had been tidying what it saved, so a version such as 1.10 or a job number such as 005 came back changed. Text now stays exactly as typed. A project whose name has a space gets the same job id on the dashboard as in the pipeline, and the round label no longer claims a maximum it does not have.

Smaller and stricter

Listing jobs used to check out the repo, then made one git call per job. It now reads every job file in a single call. A repo can switch the security review on for every job, a setting that had been ignored. On 24 November the last gap closed: the main branch setting is checked as a valid branch name before it goes anywhere near a git command.

There is no picture with this entry. The captures showed the private dashboard.