AI Help
How do I verify that an AI coding agent worked on the right commit?
Record the checkout's commit SHA and branch before editing, then compare the final patch with the task's intended base.
Steps to follow
- Run git rev-parse HEAD and inspect the current branch and worktree status.
- Compare that SHA with the requested PR head, branch or release commit. Identify any preexisting local changes.
- Record the base and final commit with validation results so later reviewers can reproduce the work.
Example in practice
Illustrative example. A fix requested for a release branch should start from that branch's actual commit, which may differ from main.
Related AI help
- Why does an AI coding agent find a dependency locally but miss it in a cloud environment?
- How do I verify that an AI-generated PR description matches the actual diff?