T08-L05 · Write code · Level 5 Operator · 30-minute read, plus 4 hours of doing and 15 minutes a week

Green, and nobody checked

Since T08-L04 · Use OpenCode Desktop on Your Organisation's Real Repositories, the plate-reader script has team rules, a reviewer agent and a protected main. Five groups now use its summary every morning. Look at how the last pull request was merged, though: Jonas approved it with the words "Checked C10 to C12 locally". A person ran the known answers, on his own computer, because he remembered to. Nothing on the server ran anything. And the summary the groups read comes from whatever someone ran last, so nobody could say which version made Friday's numbers.

In a company it's the quality team's returns report, now feeding three sites' dashboards. An auditor asks which checks the running version passed, and the answer is a shrug.

You are at Level 5 Operator. Many people rely on this code every day; when it breaks, their numbers are wrong. This book makes the server refuse what people used to have to remember: the known answers run on every pull request and block the merge, an AI reviewer comments on every change but holds no key that could push, approve or merge, and the nightly summary runs from a named release you can roll back in two minutes. We built all of it on our demo Gitea and broke it on purpose; the failures are in the book.

After this you can

  • Run the known answers on every pull request with Gitea Actions, and make them block the merge, for administrators too.
  • Add an AI reviewer that comments on every new pull request, with its own bot account that can't push, approve or merge.
  • Keep the bot's token in a job that installs and runs nothing else, and a pull request's text out of the reviewer's commands.
  • Pin what your checks run: the checkout action by commit, OpenCode by version, the script to the standard library.
  • Run the nightly job from a named release, roll back in minutes, and hand all of it to a deputy with a runbook.

Before you start