15.9 Human approval, scaled by risk
- Approved by
- Panaversity ·
In everyday life. A bank lets a clerk approve a small refund alone, needs a supervisor for a larger one, and needs two signatures to change who can sign payments at all. What the action can do sets the level. It does not matter how senior the person asking is.
What you will learn. How to set the number of people who must approve a change, by what it touches.
Why it matters. A small change to the wrong file can cost more than a large change to the right one.
What sets the risk tier?
What the change touches. In review, people's time is the limited resource (15.4), so spend it where a mistake would cost the most. A risk tier says how many people must approve a change. It is set by the files the change touches, not by who or what wrote it. A change written by an agent and a change written by the senior developer get the same tier if they touch the same files.
The three tiers are the bank's three levels: the clerk alone, a supervisor, and two signatures. The files that control review itself are the bank's "who can sign" case, so they sit in the top tier.
| Tier | Typical changes | People who must approve |
|---|---|---|
| Low | Docs, notes and examples | None, once every required check is green |
| Medium | Ordinary code and new tests | One |
| High | Money, dates and rules, data, security, any change to an existing test, and the files that control review itself | Two, one of them an owner of that area |
This table is the team's own rule. GitHub knows nothing about tiers. It enforces only what the repository's settings and the owners file say, and the usual settings are one approval on every pull request, plus the owner on each path that has one. So on GitHub, a Low change still gets that one approval, and Low means "no owner is asked". The second approval on a High change is a team rule that the owner checks.
Brightline keeps this table in REVIEW.md, the rules file the reviewer reads. Three pull requests, three answers:
| Pull request | What it touches | Tier |
|---|---|---|
| A typo fix | Only NOTES.md, the handover notes | Low |
| The weekend rule | src/due-date.ts, the file that works out due dates, and two files that use it | High, so it needs two people |
agent-speedup | An existing test, which it edits | High, whatever its size |
One kind of change is high even when it is one line: turning on a flag, a setting that switches new behavior on. A flag that moves money is a high-tier decision of its own.
Who owns a path?
The people named beside it in one file, .github/CODEOWNERS. Each line of the file starts with a path, which is where a file or a folder sits in the project. After the path come the owners. A name that starts with @ is a person's account on GitHub. This is Brightline's file, with each line's meaning beside it.
| Line in the file | In plain words |
|---|---|
/.github/ @ana-brightline | The checks file and this owners file: Ana |
/REVIEW.md @ana-brightline | The review rules: Ana |
/src/due-date.ts @ana-brightline @dave-brightline | The file that works out due dates: Ana and Dave |
/tests/ @ana-brightline | Every test: Ana |
/scripts/check-*.sh @ana-brightline | The scripts that the checks run: Ana |
/package.json @ana-brightline | The list of commands and packages: Ana |
/tsconfig.json @ana-brightline | The type checker's settings: Ana |
A code owner is a person or team that this file names as responsible for a path. GitHub has a rule, "require review from code owners". With it on, a pull request that touches src/due-date.ts cannot merge until one of its owners approves it.1
Look at the first two rows. The checks, CODEOWNERS itself and the review rules all have an owner, because they control review. A change that weakens the gate must pass the gate.
What keeps approval honest?
Three rules.
- An agent's review never replaces a person's approval. An agent can review and report. It is never one of the required approvers. GitHub cannot enforce this alone: an agent that works through your signed-in account looks exactly like you. So never let it approve for you. What to look for: a request to run a command that holds the word
approve, or to click a button named Approve. Say no to it. - The person who directed the agent is accountable. They review the change, and they answer the findings (15.5).
- An approval covers one commit. If a new commit arrives after an approval, the approval is stale: it was given to older code. GitHub has a rule, "dismiss stale approvals", that removes it. Turn that rule on, so a person approves what actually merges.
At work. Ana directed the agent that wrote the weekend rule, so she reviews it first. GitHub lets nobody approve their own pull request. So Dave Kowalski, the other owner of src/due-date.ts, gives the approval GitHub requires.
Try it
In your practice folder from 15.1, nobody owns any path yet. You set the tier for five changes, and then give the sensitive paths an owner. Ten minutes.
-
Predict in your note, before you ask the agent anything. For each of these five changes, write its tier, and write yes or no: must an owner approve it?
- a. A typo fix in
NOTES.md. - b. A new helper in
src/vendor-directory.ts, the file that looks up vendors. - c. A change to
src/money.ts, the file that formats money. - d. A one-line change in
src/due-date.tsthat turnsPAY_WEEKEND_RULEon by default. - e. A new step in
.github/workflows/ci.yml, the checks file.
- a. A typo fix in
-
Send the message below, as it is.
@your-nameis a made-up name, and you need no GitHub account for this step.Make a new branch practice-owners. Write .github/CODEOWNERS, with @your-name as owner of .github/, REVIEW.md, src/due-date.ts, src/money.ts and tests/. Do not add a line for every file. Commit it, and switch back to main. Then tell me, for each of these five changes, whether a code owner would be asked: a. A typo fix in NOTES.md b. A new helper in src/vendor-directory.ts c. A change to src/money.ts d. A one-line change in src/due-date.ts that turns PAY_WEEKEND_RULE on e. A new step in .github/workflows/ci.yml -
In the reply, look for a file of five lines, one for each path, and a yes or a no for each of the five changes. Compare them with your note.
What you should see. a is low, b is medium, and c, d and e are high. Turning on a flag is a policy decision, even in one line. A code owner is asked for c, d and e, and not for a or b.
The operating rule: set the tier by what the change touches, name an owner for every sensitive path, and count only people's approvals, on the commit that merges.

Figure 15.15. The risk ladder. What the change touches sets the rung, and the rung sets how many people must approve.
Other words you will meet
| Word | What it means |
|---|---|
| Personal repository | A repository that belongs to one account. Its rules ask for one approval count on every pull request. They cannot ask for none on docs and two on payment code |
| Organization | An account a team shares. Its repositories can also ask for a team's approval on chosen paths2 |
| A check that counts approvals | A team that needs the exact counts of the tier table adds a check of its own that reads which paths changed |
| Code behind a flag that is off | It can sit in a lower tier, but only when it is self-contained and a test shows the old behavior unchanged with the flag off |
| Why a flag that is off is not enough | The code still loads. A new package, a change to shared code, or a data migration, which changes stored data, takes effect whatever the flag says. The weekend rule changes the shared due-date engine, so it stays high (15.10) |
| An agent in a team's workflows | The team gives it an account of its own, with no right to approve |
| A pull request from a fork | It comes from outside the team. It gets no secrets and no automatic AI review, and a person reads it first (15.7 and 15.8) |
In your tool: the details
Two cautions about the buttons in each app. Merge when ready and Approve act with your account, so the three rules above apply to the click as they do to a command. And Auto-fix lets the agent change the branch in answer to other people's comments, which are pull request text and untrusted input, as 15.7 says. Turn it on only where you would let those people steer the agent.
Which buttons merge or approve with one click:
Merge when ready turns on GitHub's auto-merge. Auto-fix fixes failing checks. In a local session it also answers review comments from the repository's owner, an organization member, a collaborator or a GitHub App.3
Submit review offers Comment, Approve or Request changes.4
OpenCode's changelog names none.5
Check yourself
Question 1 / 9
0 answered
A senior developer and an agent each send a one-line change to src/due-date.ts. Which tier does each get?
Sources
- Owner
- Panaversity