AI Code Modification and Merge Sign-Off Should Be Governed Separately

    The article argues that an AI system's ability to modify code should be decoupled from the authority to approve a merge. It distinguishes information waits from authorization waits, proposes default-branch approval policies keyed to paths, risk, roles, and evidence, and describes a closed loop for review, scoped fixes, and re-review. It also covers accountability records, common implementation pitfalls, and risk-bucketed metrics for judging whether automation actually reduces waiting without weakening high-risk controls.

    Treating intelligent coding only as “writing patches faster” misses a slower part of delivery: review, rework, re-review, and the final approving vote. Many teams mark development as complete in their schedules, yet users still cannot use the feature. The bottleneck is often not compilation but handoff. If a single merge request changes both interface documentation and billing logic, a model can read the diff and even push a fix, but it still cannot answer “can this merge now?” The answer is not who wrote the line of code. It is the approval policy on the default branch: a documentation path may allow an automated assistant to sign low-risk changes, while a billing directory may require a signature from the payments owner. When both rules apply at the same time, the whole request must wait for the stricter tier.

    What Is the Team Still Waiting for After the Code Is Written?

    After developers hand changes to the team for review, they usually switch to the next task. When comments come back, they must recall the trade-offs from the previous version, make a change, and schedule another check. At the end, the only missing item may be a person with authority to approve, and that person is handling another incident. Waiting therefore falls into two categories that require completely different governance.

    The first is information waiting: no one has looked at the diff, context is scattered, and similar comments keep recurring. Adding a stable review participant, or letting a tool classify, summarize, and run regression checks first, can often shorten this stage. The second is authorization waiting: policy requires a specific role to be accountable for a specific path. Being busy is not itself a process defect. Treating an automated result without sign-off authority as approval is what leaves no accountable owner after an incident.

    A system may be capable of changing code until tests pass, but how much sign-off authority the team gives it must be decided separately. Only after that separation can teams clarify which waits are duplicate labor and which waits are the price of risk.

    Why Capability and Permission Cannot Share One Switch

    Common capabilities of intelligent coding tools include reading diffs, checking requirements and tests, pointing out obvious defects, generating fix commits, and explaining trade-offs in comments. These are capabilities for “doing the work.” Merging is authorization: turning a set of changes into a default fact jointly maintained by the team. Authorization must answer a different set of questions.

    • Which paths does the change touch, and what is the risk level of each?
    • Who is qualified to sign for that risk tier, and is separation of duties required?
    • If an automated check fails, can the same agent both change the code and declare it passed?
    • After a rollback, can the audit record show which policy was relied on and which accountable person approved the change?

    If “the model writes well” is upgraded directly into “the model can merge,” high-risk directories will travel in the same fast lane as documentation, formatting, and comments. Conversely, if distrust of the model forces every change to be read line by line by a human, queuing low-risk changes will not make billing logic safer. It will only make requests that truly need expert attention arrive later.

    Merge requests submitted by humans and by tools should enter the same set of gates. The source may differ, but release conditions should depend on path, risk, and evidence, not on a blunt distinction of whether a human wrote it. Otherwise teams will develop two shadow processes: human requests follow policy, while machine requests follow tacit permission.

    Use Default-Branch Policy to Answer “Can This Merge?”

    Approval rules should live on the repository’s default branch and evolve with the code, rather than hiding in a conversation or a local configuration. When review starts, the system reads the current policy on the default branch, maps the diff to path rules, and produces a conclusion: “auto-sign allowed,” “specific role required,” or “merge prohibited.” Changes to the policy itself should also require a higher level of review, so teams do not loosen it temporarily to meet a deadline.

    An illustrative policy does not need to bind to any specific product. It only needs to express paths, roles, and evidence:

    1. rules:
    2. - paths: ["docs/**", "*.md"]
    3. risk: low
    4. required:
    5. - role: maintainer
    6. min_approvals: 1
    7. auto_sign_allowed: true
    8. evidence: [lint, linkcheck]
    9. - paths: ["billing/**", "payments/**"]
    10. risk: high
    11. required:
    12. - role: payments_owner
    13. min_approvals: 1
    14. auto_sign_allowed: false
    15. evidence: [unit, integration, migration_review]
    16. duties_separated: true
    17. merge:
    18. when_rules_conflict: strictest
    19. signer_must_be_human_for: [high]

    When one merge request changes two areas, the strictest rule wins. Even if the documentation rule allows auto-signing, the whole request continues to wait as long as the billing rule requires the payments owner and prohibits auto-signing. A tool can complete checks for the documentation portion, leave comments, and even suggest splitting out the high-risk change, but it cannot use a passing status on the low-risk path to override the high-risk path.

    Separation of duties means the identity that proposes a fix should not also be the sole signer for that high-risk path. Who wrote the code matters less for this decision. What matters is whether the signer has the role, whether the signer is independent of the change’s interests, and whether the evidence is complete.

    How Review, Fix, and Re-review Form a Closed Loop

    After a unified process is enabled, a tool is best suited to start work at the moment of “submit for review,” rather than replacing the developer’s existing way of writing. Team leads should break down the backlog. If the backlog comes from no one reviewing code, adding a stable reviewer—human or a policy-constrained assistant—can help. If the backlog comes from only a few people being able to sign high-risk directories, adding ten more code-writing assistants will not save that one vote.

    An operable closed loop can look like this:

    1. Classify. Tag the diff by path, change type, and test impact, and identify which rules apply.
    2. Review before changing. First report defects, missing tests, and interface compatibility issues. Avoid starting with a large rewrite that resets the review baseline.
    3. Fix within bounds. Push fixes only within the scope where policy allows automatic changes. For high-risk directories, focus on comments and patch suggestions, and let the accountable owner decide whether to adopt them.
    4. Bind evidence. Associate each fix with the corresponding check results. If required tests or migration notes are missing, the status should remain non-mergeable.
    5. Re-review rather than overwrite. Make clear which previous approvals are invalidated by new commits: a documentation-only change need not clear the payments owner’s signature, but once billing logic changes, the high-risk signature must be renewed.
    6. Suggest splitting. When a mixed request waits for a long time, the tool should suggest separating low-risk documentation from high-risk logic into independently mergeable requests, rather than repeatedly nagging the same approver.

    In this way, the waits that can be saved are mainly repeated context explanations, mechanical style issues, obvious test gaps, and back-and-forth confirmation on low-risk paths. The waits that cannot be saved are an absent role required by policy, insufficient evidence, and rule conflicts that have not been interpreted according to the strictest rule.

    Who Is Accountable When Something Goes Wrong?

    Only by modeling sign-off authority separately can accountability be traced back. A problematic merge should answer at least four questions.

    • Policy version: which version of the rules file was on the default branch at the time, and were conflicts merged according to the strictest rule?
    • Evidence: which checks passed, which were manually skipped, and was the reason for skipping recorded?
    • Signer identity: did auto-signing occur only on permitted low-risk paths, and did the high-risk path signer match the required role and remain independent of the author?
    • Rollback ownership: who has the authority to roll back, and which role takes over related alerts, data fixes, and user notifications after rollback?

    “The model wrote it” cannot replace these four items. If a team publicly reports that merge volume rose and rollback rates fell under its process, that only shows the process worked under that team’s constraints at that time. It cannot be extrapolated to mean another team will achieve the same speedup by adopting the same kind of tool. Without a control group, path-risk tiers, and rollback-cause classification, the numbers explain only “why it is worth investing in review,” not “how much of your approval bottleneck will disappear.”

    Common Implementation Pitfalls

    Policies are too coarse. Using one global switch to allow or prohibit automatic merging binds capability and permission together again. Policies should be tiered by directory, data sensitivity, and financial impact, and teams should regularly replay real incidents against the rules to see whether they are too broad or too narrow.

    Evidence and conclusions are disconnected. A comment saying “looks fine” without a repeatable check turns sign-off into atmosphere. Even low-risk auto-signing should bind to minimum evidence; otherwise documentation links or example code will silently drift.

    The agent is both player and referee. Allowing an assistant to modify high-risk code and immediately approve its own change creates self-approval under time pressure. High-risk paths should require human sign-off and enforce separation between author and signer.

    Default-branch policy is bypassed. If someone loosens rules through temporary parameters, local hooks, or side-channel conversations, auditing fails. Merge calculation should only recognize the merged policy version on the default branch.

    Splitting is treated as evasion. Breaking a business change into multiple requests can speed up the low-risk portion, but it cannot merge half of the same financial rule into the mainline first. Policies can require related changes to be reviewed together, or prohibit merging only the “harmless” dependency while the high-risk path is not ready.

    How to Tell Whether the Design Actually Reduces Waiting

    Do not look only at the number of merge requests. More useful is bucketing by risk: is the time from opening to merge decreasing for low-risk paths? Is waiting on high-risk paths still concentrated in “waiting for a person” rather than “waiting for the model to revise again”? Are rollbacks increasingly caused by requirement changes rather than missed review of billing or permission errors? Can sign-off records actually be cited during incident reviews?

    If low-risk changes get faster while high-risk changes remain slow but for clear reasons, capability and permission have been separated and the process is healthy. If everything gets faster while high-risk rollbacks rise, sign-off authority has probably been overshadowed by the capability narrative. The value of review automation is to let the people who should review spend their time on diffs they must be accountable for, not to let a system without sign-off authority cast the final vote for the team.