ai code governance

Turn a governance score into a defensible pull request gate

Define what a governance threshold means before enforcing it—and verify that the signal you use can actually block a merge.

By Nesta Bowles·November 8, 2026·4 min read
What matters here
  1. A PRI review is not proof of compliance, and a reliability score should not stand in for a governance policy.
  2. A pull request gate needs a machine-readable pass/fail signal, not only a review comment or score delta.
  3. Set a threshold from a baseline, document exceptions and test the policy before requiring it for merges.

Automated pull request gating starts with a policy decision, not a number. A team needs to say what it means for a change to meet its governance requirements, which evidence supports that judgment and what should happen when the evidence is missing.

That distinction matters when teams consider a governance compliance (GC) index. Tomosu AI evaluates software using a Production Reliability Index (PRI) based on seven sub-indexes. Its GitHub App posts reliability reviews and PRI deltas on pull requests. Those facts do not establish that Tomosu exposes a separate GC index or lets teams configure a threshold that blocks a merge. Treat the PRI as reliability evidence, not as a compliance certificate or an automatic gate.

1. Write the rule before choosing the score

Start with the risk the policy is meant to control. For example, a team might require a change to meet an agreed minimum for a governance measure, or block a change when a specified category of finding remains unresolved. Those are different rules. A single composite score can obscure the difference.

Write the condition in plain language. Name the measure, the comparison, the scope and the response. “The GC index must be at least 80” is incomplete unless the team defines where that index comes from, what its scale means and what happens if no score is available. A more operational rule identifies which changes it covers and who can approve an exception.

Do not relabel PRI as GC to make the policy fit. First verify that the measure you intend to govern exists in the scoring system your team uses. If your policy depends on a distinct GC index, confirm its definition and whether it is available on the pull request before writing a gate around it.

2. Establish a baseline and test the threshold

Run the proposed rule against recent changes before making it mandatory. Record how often it would pass, fail or produce no usable result. Look at the underlying findings as well as the score: two changes with the same composite value may carry different risks.

Choose a threshold based on that evidence and the team’s risk tolerance. A threshold copied from another repository may not fit your codebase, scoring coverage or release process. If a measure changes over time, version the policy or record the policy revision alongside the decision. Otherwise, a later reviewer may not know which rule a past pull request was judged against.

Decide how to handle missing data explicitly. A gate can fail closed, which favors caution but may interrupt merges when the scoring service is unavailable. It can fail open, which preserves delivery but weakens the control. Some teams may instead route missing evidence for human review. The right choice depends on the consequence of an unreviewed change; it should not be an accidental default.

3. Connect the policy to a real pass/fail signal

A pull request comment or PRI delta can inform a reviewer, but a comment alone does not prove that a merge is blocked. Automated PR gating requires a signal that the repository’s merge policy can require: a pass/fail result tied to the pull request and produced from the rule you documented.

Before making any check mandatory, verify the integration’s actual output in a test repository or non-blocking rollout. Confirm that it evaluates the intended change, reports the relevant measure and produces the result your merge policy expects. Tomosu’s stated GitHub App behavior is to post reliability reviews and PRI deltas. Do not assume that those posts are a configurable branch-blocking check; confirm the available behavior for your setup.

If the signal is only advisory, keep it advisory while you decide whether another supported mechanism can enforce the rule. Do not create a policy that appears automated but depends on someone noticing a comment. A clear manual review requirement is safer than a silent, assumed gate.

4. Keep exceptions narrow and auditable

Define who may override a failed check, what justification they must provide and when the exception expires. Avoid permanent bypasses for broad classes of changes. Review overrides regularly, including cases where a gate passed but a later incident showed that the policy missed the risk.

Keep the decision trail with the change: the applicable rule, the evidence considered, the result and any exception. A reliability score can inform that record, but it cannot by itself establish that a change meets every legal, security or internal governance obligation. For a practical distinction between reliability evidence and compliance claims, see how to connect change intent, review evidence and runtime findings without treating a score as a compliance certificate.

5. Roll out gradually, then review the rule

Start in observation mode. Compare the automated result with human review, inspect false positives and confirm that developers understand what a failure means. Then require the check for a limited set of repositories or change types. Expand only after the team trusts both the measurement and the enforcement path.

Finally, assign an owner and a review date to the policy. Revisit the threshold when the index definition, repository profile or failure pattern changes. Governance rules that nobody maintains become either noise or a paper control. The useful gate is the one with a precise purpose, a trustworthy signal and a consequence the team can explain.

More from Tomosu AI News