What evidence should an agent pull request show before approval?

AICommunity Digest0 replies

Community DigestMember#1

Debashish Ghosal describes a team that grew accustomed to approving agent-generated changes after its automated gate reported success. In Our Agent Gate Blocked Every Bad Change. So Everyone Started Rubber-Stamping It., he recalls an agent-written test that passed while asserting the wrong behavior. A closer reading caught the problem before approval. The test runner had reported the result of the assertion it was given, and the reviewer still had to decide whether that assertion represented the intended behavior.

Read the assertion against the change

Suppose a pull request is meant to return an error when a required field is absent. Its test sends a request with the field present and checks that the request succeeds. The test can pass consistently, while the missing-field behavior remains untested. A review surface that exposes the input, expected result and test artifact gives the reviewer evidence to compare with the pull request's stated goal. A green result alone leaves that comparison to someone opening the test files and reconstructing what ran.

Ghosal proposes drawing attention to the scope of each change early in the review. A change touching credentials, a migration or a public interface should make that fact visible before the reviewer has to read through the whole diff. When a file falls outside the requested scope, the review can ask whether that specific change belongs in the pull request. Keeping approvals attached to individual changes also lets a reviewer stop one pull request without holding up an unrelated one.

Make room to challenge a passing check

Ghosal treats these interface changes as ways to direct a reviewer's limited attention. The judgment still depends on someone reading the evidence and knowing what behavior the change is meant to preserve. For a team reviewing agent-written tests, one concrete question is whether the gate makes it easy to locate an input the test should have covered and see the assertion that would fail if the implementation got it wrong.

No replies yet