Skip to content

make orchestrator verify line number before posting comment#41

Merged
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:make-orchestrator-verify-line-number-before-postin
Feb 13, 2026
Merged

make orchestrator verify line number before posting comment#41
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:make-orchestrator-verify-line-number-before-postin

Conversation

@derekmisler
Copy link
Contributor

@derekmisler derekmisler commented Feb 13, 2026

I noticed a comment posted by the agent was off by a couple of lines. This will help, I think.

Summary

Adds a mandatory line number verification step to the PR review orchestrator to prevent posting inline comments on incorrect lines. The orchestrator now uses grep to verify line numbers against the actual file content before posting comments, addressing unreliability in LLM-computed line numbers from diffs.

Changes

  • review-pr/agents/pr-review.yaml: Added "Verify Line Numbers" section requiring orchestrator to use grep -n to confirm line numbers before posting inline comments, with instructions on handling ambiguous matches. Updated workflow steps to include verification before building comments. Added grep permission to allowed shell commands.

Breaking Changes

None

How to Test

  • Trigger a PR review that would generate inline comments
  • Verify the orchestrator runs grep -n commands to validate line numbers before posting
  • Confirm inline comments appear on the correct lines in the PR review

Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler self-assigned this Feb 13, 2026
@derekmisler
Copy link
Contributor Author

/describe

@derekmisler derekmisler marked this pull request as ready for review February 13, 2026 14:57
@derekmisler derekmisler requested a review from a team as a code owner February 13, 2026 14:57
@docker-agent
Copy link

docker-agent bot commented Feb 13, 2026

✅ PR description has been generated and updated!

Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

No issues found! The changes add appropriate instructions for line number verification with reasonable safeguards:

✅ Step renumbering is correct (6→6, 7→7, 8)
✅ New "Verify Line Numbers" section provides clear guidance with fallback mechanisms
✅ grep permission correctly added to allow the verification process

The PR successfully addresses the reliability of line number verification in review comments.

@derekmisler derekmisler merged commit 76e8f2c into docker:main Feb 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants