DEV Community

Cover image for An AI Agent Says the Tests Passed. Which Commit Did CI Test?
Bargan Constantin
Bargan Constantin

Posted on Edited on AI-assisted

An AI Agent Says the Tests Passed. Which Commit Did CI Test?

An agent says all tests passed. The pull request has a red CI check. Before asking the agent to fix the failure, establish what each result actually tested.

Identify the code each run tested

Start with the commit SHA. Record the local checkout and whether it had unstaged changes. Then open the hosted run and record the tested SHA and the event that triggered it. A pull request check may run against a merge result, while a local test runs against your working tree. If those inputs differ, inspect the difference before comparing the results.

Identify the checks that actually ran

“All tests passed” needs a scope. Record the command, suite, result and any skips. For a .NET change, a fast unit-test run is useful evidence about the selected tests. An integration job may exercise a database, configuration or runtime the local run never touched.

For example, suppose a local suite tests duplicate-payment handling with a mock repository, and CI runs integration tests against a real database. If CI fails, start with its failing assertion and database setup. The local pass and the hosted failure can both be accurate.

Keep three decisions separate

Diagram separating agent output, CI evidence, and ticket status

Signal Evidence it provides
Agent summary What the agent says it changed and verified.
CI run Which checks ran against an identified revision and what they returned.
Ticket or review status Where the work stands in the team's process.

When handing off an agent-written change, include the commit, test command, CI link, and any checks still pending. If you rerun after a fix, preserve the original failure and link the new result to the revision it tested. This makes the review reproducible even after the original agent session is gone.

Top comments (0)