Factorik Factorik Start free trial
← See all articles

What Counts as a Low-Risk Code Change?

Quick answer: A low-risk code change is a small change, mostly additions or edits rather than deletions, that touches no sensitive path (dependencies, build and deploy, secrets and permissions, database migrations, money) and passes every required check on the exact commit being merged. Define it with facts you can read off the diff and the CI results, not by asking a model whether the change looks safe. Facts give the same answer every time, can be audited, and cannot be talked out of their verdict.

Let an agent earn its place on your team

Define a Factorik agent once and it wakes on an issue, a failed build or a schedule, works in an isolated sandbox and ships a pull request. It starts with a person merging its work and earns more autonomy on its record. Try it free for 7 days, no payment details needed.

Start your free trial

What is a low-risk code change?

A low-risk code change is one whose worst plausible outcome is small and easy to undo. In practice that means the change is small, it adds or edits more than it removes, it stays away from the parts of the codebase where a mistake is expensive (dependencies, build and deploy, secrets and permissions, database migrations, anything that moves money), and every required check passes on it. Each of those conditions is a fact you can read off the diff and the CI results. None of them requires anyone, human or model, to guess.

Teams care about the definition because it decides what can skip the queue. Every engineering organization has a long tail of changes that nobody needs to agonize over: a typo in an error message, a missing test for a pure function, a renamed variable, a dead import, a docs fix. When those changes wait in the same review queue as a payments refactor, two things go wrong. The small changes wait for days, and reviewers learn to skim, which is exactly the habit you do not want when the payments refactor arrives.

A clear definition of low-risk lets you split the queue. Changes that meet it can be approved by lighter means, or merged on their own when an author has earned that. Changes that do not meet it get a person's full attention. The definition only works if everyone, including the machine applying it, gets the same answer for the same change.

Why does the question of low-risk changes matter more with AI agents?

AI coding agents have changed the volume of changes that need a decision, and review is where it shows. A July 2026 arXiv preprint by He et al. followed 802 developers and 196,212 pull requests at one mid-sized software company after its leadership set a target of doubling merged pull requests with AI. Load per reviewer doubled, and the share of pull requests receiving at least one human review fell from 89% to 68%, while the share receiving an automated AI review rose from about 19% to about 84%. It is a preprint about one company, not a settled finding, but the mechanism is easy to recognize.

Faros AI, a vendor that sells engineering analytics, reports the same direction from its customers' telemetry. Its April 2026 report found a 31.3% rise in pull requests merged without review and incidents per pull request up 242.7% for teams moving to high AI adoption. Its September 2026 follow-up, drawn from 22,000 developers across 4,000 teams, found the rise in pull requests merged without review had grown to 76.3%, while the rise in incidents per pull request had fallen to 14.5%. These are a vendor's figures and they move between editions; what holds across both is that review is being skipped more often, without a rule for which changes.

Review is being skipped already. The open question is whether it is being skipped on purpose, for changes that can safely do without it, or by exhaustion, for whatever happens to be next. A written definition of low-risk is how you make that decision on purpose. It turns "we skip review when we are busy" into "we skip human review for changes that meet these conditions, and nothing else".

89% to 68%
Pull requests with at least one human review
He et al., arXiv preprint, July 2026: 802 developers and 196,212 pull requests at one mid-sized software company.
76.3%
Rise in pull requests merged without review
Faros AI, vendor report, September 2026 (22,000 developers), up from a 31.3% rise in its April 2026 report.
242.7%
Rise in incidents per pull request
Faros AI, vendor report, April 2026; its September 2026 edition put the rise at 14.5%.
What 2026 research and one vendor's reports found as AI adoption rose

Why shouldn't an AI decide whether a change is safe?

The tempting shortcut is to ask a model. Feed it the diff, ask "is this change safe to merge without review?", and merge when it says yes. The appeal is obvious: the model reads the code, it sounds confident, and it never gets tired. But an opinion is not a policy, and there are three concrete reasons it fails as one.

First, it is not reproducible. The same diff can get a different answer on a different day, with a different prompt, or after a model update. A merge rule that cannot be re-run with the same result cannot be audited. When something breaks, "the model thought it was fine" explains nothing about why the next change will be handled differently.

Second, it can be argued with. A model that reads the diff also reads the commit message, the pull request description and the comments in the code. If any of those were written by an agent, or by someone outside the team, the text can nudge the verdict. A rule based on line counts and file paths cannot be talked out of its answer.

Third, it fails in the cases that matter. A model is good at noticing that code looks tidy. It is less reliable at noticing that a one-line change to a retry setting will multiply load on a downstream service, or that a renamed environment variable will break a deploy. The changes that cause incidents often look harmless. That is the reason to fence off whole areas of the codebase by path, regardless of how harmless a particular diff looks.

None of this means AI review is useless. A review agent reading the change in context can catch real bugs, and it belongs in the process. It just belongs as a reviewer whose verdict is one input, not as the definition of what is allowed to merge.

Pros
  • +Facts: the same change always gets the same answer
  • +Facts: anyone can read the rule and predict the outcome
  • +Facts: text in the pull request cannot change the result
  • +Facts: easy to record and audit after the fact
Cons
  • −Model opinion: answers can vary between runs and model versions
  • −Model opinion: can be swayed by persuasive descriptions or comments
  • −Model opinion: tends to miss small changes with large effects
  • −Model opinion: hard to explain after an incident
Deciding low-risk by facts versus by a model's opinion

How do I define a low-risk code change with measurable facts?

Start with size. Count the files a change touches and the lines it adds and removes. Pick limits that match the kind of change you want to flow freely, and keep them tight: the purpose is to catch the typo fix and the missing test, not the feature. Size is a rough proxy for how much a reviewer would need to hold in their head, and small changes are also the easiest to revert.

Next, look at what the change removes. A change that mostly deletes code is a different animal from one that mostly adds it. Deleting a function that looks unused is a classic way to break a caller that a search did not find, such as a reflection lookup, a template or another repository. Set a limit on deleted lines, or on the share of the change that is deletion, so that large removals always get a person's eyes.

Then mark the sensitive paths. These are the parts of the repository where any change, however small, deserves a human decision. Most teams end up with the same list: dependency manifests and lockfiles, build and CI configuration, deployment and infrastructure definitions, anything to do with secrets, authentication and permissions, database migrations, and code that handles money. A change that touches any protected path is not low-risk, full stop.

Finally, require the checks. A change is only low-risk if every required check passed on the exact commit you are about to merge. A change that was green two commits ago is not the change in front of you. If your CI is flaky, fix that first; a low-risk rule built on checks that fail at random will either block everything or teach people to rerun until green.

Write the result down as a short, explicit rule and keep it next to the code, so that changes to it go through review like any other change. When the rule turns out to be too loose or too strict, adjust a number or a path, not the wording of a prompt.

FactHow it is measuredWhat it guards against
Files touchedCount of files in the diffChanges too wide to review at a glance
Lines changedLines added plus lines removedLarge changes hiding a small mistake
Lines removedDeleted lines, or their share of the changeRemoving code something still depends on
Protected pathsAny file in the diff matching a protected patternSmall edits with large blast radius
Required checksAll required checks passed on the exact commitMerging something that does not build or test clean
Facts that make up a low-risk rule, and why each one is there

How do I write protected paths that actually protect?

Protected paths are usually written as glob patterns matched against every file in the change. The common mistake is to write them for the repository you remember rather than the one you have. Before you write a pattern, list the places where each sensitive thing actually lives. Dependencies are not only in package.json; they are also in the lockfile, in a Dockerfile's install step, in a requirements file for a tooling script and in a vendored directory nobody remembers.

For a typical web service, a reasonable starting list looks like this: `/package.json` and `/package-lock.json` (or the equivalents for your language), `.github/workflows/`, `Dockerfile` and `/Dockerfile*`, `infra/` or `terraform/`, `deploy/` and any Helm or Kubernetes manifests, `migrations/` or `drizzle/`, `/auth/` and `/permissions/`, `/*.env*` and config files that carry credentials, and the directories that hold billing, payments or invoicing code. Your list will differ, and that is the point: write it from your tree, not from an example.

Prefer patterns that are a little too broad over patterns that are a little too narrow. The cost of a false positive is that a harmless change waits for a person. The cost of a false negative is that a change to how you deploy merges on its own. Match by directory where you can, because a new file added to a protected directory is protected without anyone remembering to add it.

Review the list when the repository changes shape. A new service, a moved migrations folder or a new payment provider can leave a gap. A useful habit: when an incident is traced to a change, ask whether the file it touched should have been protected, and if so, add it the same day.

Let an agent earn its place on your team

Define a Factorik agent once and it wakes on an issue, a failed build or a schedule, works in an isolated sandbox and ships a pull request. It starts with a person merging its work and earns more autonomy on its record. Try it free for 7 days, no payment details needed.

Start your free trial

How does Factorik decide whether a change is low-risk?

In Factorik, every agent has one job on one GitHub repository and works at one of three levels. At the first level it opens pull requests that a person merges. At the second it merges low-risk changes by itself when the repository's merge policy allows. At the third it merges whatever the merge policy allows. Every agent starts at the first level, and auto-merge is off by default.

Whether a change is low-risk is decided from facts about the change: how many files and lines it touches, how much it deletes, and whether it touches sensitive paths such as dependencies, build and deploy, secrets and permissions, database migrations or money. It is never decided from an AI's opinion, including the opinion of the agent that wrote the change. The merge policy requires passing checks and protects sensitive paths, so a change to a protected path waits for a person whatever the agent's level.

Reviewer agents sit on top of that rule rather than replacing it. When a repository has a Code Reviewer, auto-merge waits for every reviewer's approval of the current commit, and a person's approval can override. If a merged change later causes a problem, such as CI or a deploy failing at the merged commit, a revert, or a person reporting it, a finding is recorded, the team is told, and the agent moves down a level at once.

Here is an illustration with invented names. A Docs Keeper agent at the second level runs on a schedule against acme/web-app. It finds that docs/setup.md still tells people to run a script that was renamed, and edits two lines in one file. The server publishes the change as one commit on its own branch and opens a pull request. The change is one file, two lines, no deletions of substance and no protected path. Checks run and pass on that commit. The Code Reviewer reads it and approves that exact commit. The merge policy allows it, so Factorik merges it. A week later the same agent opens a pull request updating a version pin in package.json to match the docs. That file is protected, so the pull request waits for a person, even though the diff is one line.

What are the trade-offs of a facts-based low-risk rule?

A facts-based rule is predictable, and predictable is not the same as correct. A two-line change outside every protected path can still be wrong: a changed default, an off-by-one in a loop, a log line that leaks a field it should not. The rule does not catch those; checks, reviewers and, after merge, findings are what catch them. What the rule does is keep the blast radius of an uncaught mistake small and keep large or sensitive changes in front of a person.

The rule is also only as good as its inputs. Thin test coverage means "checks passed" says little. A protected-path list written once and never revisited will drift from the repository. Those are maintenance jobs for the team, not things a merge policy does for you.

Factorik does not know your sensitive paths better than you do, does not turn auto-merge on for you, and does not let an agent skip checks. It does not promise that agents never make mistakes. It applies the same rule to every change, records every level change with who or what made it and why, and moves an agent down a level the moment one of its merged changes is traced to a problem.

How can I try a merge policy built on facts?

A practical way to start is to write your own protected-path list and size limits this week, whether or not you use any agent. Run them against the last month of merged pull requests and see which ones would have counted as low-risk. That exercise alone usually shows where review time is going and which areas need a person every time.

If you then want agents to do that kind of small, routine work under such a rule, Factorik offers a free 7-day trial of the Team plan with no payment details needed. Define one agent, keep it at the first level, and let its record decide whether it earns the right to merge low-risk changes.

Frequently asked questions

What makes a code change low-risk?

A change is low-risk when it is small, does not mostly delete code, touches no sensitive path such as dependencies, build and deploy, secrets and permissions, migrations or payment code, and passes every required check on the exact commit being merged. All of these are facts read from the diff and CI, not judgments.

Can I let an AI model decide which pull requests are safe to auto-merge?

It is a poor policy on its own. A model's answer can change between runs, can be swayed by text in the pull request, and tends to miss small changes with large effects. Use AI review as one input, and decide what may auto-merge with measurable rules.

What should be on a protected paths list?

Dependency manifests and lockfiles, CI and build configuration, deployment and infrastructure definitions, secrets, authentication and permission code, database migrations, and code that handles money. Write the patterns from your actual repository tree and prefer matching whole directories.

Does Factorik merge changes automatically by default?

No. Auto-merge is off by default, and every agent starts at the first level, where a person merges its pull requests. An agent merges low-risk changes by itself only after it has earned the second level and the repository's merge policy allows it.

What happens if a low-risk change merged by an agent causes a problem?

In Factorik, CI or a deploy failing at the merged commit, a revert, or a person reporting a problem records a finding. The team is told and the agent moves down a level at once, so it goes back to having a person merge its work.

How do I turn a low-risk rule into a merge policy?

A merge policy puts the rule into practice: auto-merge on or off, required checks, protected paths, size caps and how changes land. How to set up a merge policy for AI agent pull requests goes through each setting in order.

Let an agent earn its place on your team

Define a Factorik agent once and it wakes on an issue, a failed build or a schedule, works in an isolated sandbox and ships a pull request. It starts with a person merging its work and earns more autonomy on its record. Try it free for 7 days, no payment details needed.

Start your free trial

How helpful was this article?

Articles by Factorik →