Operate an AI code-review repair loop without losing the finding
Track a review finding through verification, repair, current-commit QA and a human decision, including disputed findings.
· CodePress
An AI code-review repair loop needs to carry the finding, affected revision, supporting evidence and owner into a repair, then recheck the changed behavior. A comment is a request for investigation; a proposed fix is another change to verify. Track each finding to an evidenced resolution, or to an explicit unresolved decision, before a person decides whether to merge.
Review-to-fix handoffs already exist in multiple products. GitHub's May 19, 2026 changelog documents handing selected Copilot review feedback to its cloud agent, with choices about where to apply the change. That establishes GitHub's mechanism, not CodePress behavior. The operating problem here is what information should survive any such handoff.
1. Make the finding actionable
Give each finding a stable reference. Record the reviewed commit, affected behavior, reproduction or reasoning, likely impact and repair owner. Include the relevant path or function, but do not rely on a line number that will move after the next edit. A useful finding explains how a request or event reaches the defect.
“Authorization missing” is too vague. A more useful report says: “In this hypothetical report-update endpoint, a signed-in user can submit another account's report identifier; the lookup retrieves the report without account scope. Attempt the write from a second account and verify both the response and unchanged stored value.” That tells an implementer what to investigate without prescribing an unverified patch.
2. Verify the defect before repairing it
Read the repository's intended permission model and follow the call path. Reproduce the problem with an authorized test fixture where possible. Confirm that the finding applies to the reviewed revision and configuration. An AI reviewer can overlook middleware, misunderstand a role or reason about a path the application cannot reach.
If reproduction needs an unavailable service, record that prerequisite and the next diagnostic step. Static reasoning may still justify a precautionary change, but describe its limits. Do not report a service-level check as passed when the environment never reached the service.
Hypothetical finding ledger: report authorization
Illustrative ledger, not an observed PR or test run: the entries below show how one finding could move through a team. The role labels are proposed responsibilities, not real reviewer identities. No fix or recheck described here has been executed.
| Record | Example entry |
|---|---|
| Initial finding | F-01, revision A: update lookup appears to omit account scope. |
| Owner | Branch owner investigates; permission-model owner resolves role questions. |
| Proposed fix | Use the existing scoped lookup; retain the allowed owner path. |
| Required recheck | At revision B, try allowed, denied and cross-account writes; read back state. |
| Dispute/resolution | If middleware already enforces scope, cite the path and demonstrate it before dismissing F-01. |
| Remaining coverage | Bulk updates and background exports remain unexamined; assess separately. |
Keep the initial finding visible as the record develops. Append the proposed repair, actual evidence and resolution instead of rewriting the original claim to match the patch. The ledger should allow a teammate to distinguish a confirmed defect, an incorrect report, a partial repair and a missing check.
3. Route a bounded repair to the branch owner
Send the finding reference, relevant revision, intended permission rule and expected checks together. Ask the owner to explain the changed boundary and preserve legitimate access. Avoid a broad instruction to “apply every suggestion”: some comments may conflict, propose alternative designs or depend on facts still under dispute.
If several findings share a cause, one repair can address them, but retain a resolution for each. Separate unrelated defects when a combined patch becomes difficult to review. Confirm which branch receives the repair and how the owner will identify a newer revision that arrived during the investigation.
4. Recheck the repair and its side effects
Record the new head, inspect the patch and run checks that exercise both the denied operation and the behavior that must still succeed. A repair that denies every request closes one path by breaking the feature. A change to a shared lookup may affect callers outside the original endpoint.
Use a change-specific evidence matrix to choose unit, API and browser checks. Ask for current-revision review when the repair changes the reasoning behind the earlier judgment. A resolved discussion thread is a useful coordination marker, but it is not evidence that a relevant check ran.
5. Handle three common exceptions explicitly
- False positive: the reviewer missed an enforced middleware check. Show the reachable call path and an appropriate denied-request check. Record why the finding does not apply. Do not add duplicate authorization logic merely to satisfy the comment.
- Partial repair: the single-item endpoint is scoped, but a batch endpoint still uses the shared unscoped helper. Keep the uncovered path visible, identify its impact and decide whether the current task must expand or a separate repair is required.
- Environment blocker: a needed test database cannot start. Record setup output and the owner of the missing prerequisite. Resume after setup is repaired, or ask the responsible human to decide how to handle the explicit verification gap.
Review may be wrong, and a repair may introduce a new defect. Repeated failure needs a diagnosis or a different approach. Set a task budget and name the person who can narrow scope, stop work or accept remaining uncertainty. Do not treat an automated loop as a promise of unlimited retries or eventual approval.
6. Return the decision to a human
The final handoff should identify the current head, resolutions, evidence and unresolved coverage. The responsible reviewer decides whether the remaining risk is acceptable under the team's policy. Starting from a clear issue handoff and completion contract makes that judgment easier because the original requested behavior remains available.
CodePress's AI code review page describes returning actionable findings to the working agent, tracking the current PR head and requesting another judgment. The broader factory workflow describes QA and repair around implementation. These are public product statements; they do not establish a successful repair in the example above or replace human merge ownership.
To evaluate the handoff on work you already have, explore CodePress review for an existing pull request and require a finding-to-resolution record you can inspect.