Problem
The PR re-review workflow fails to submit reviews when it tries to post an inline comment on a line that exists in the file but is outside the diff context. GitHub's API rejects the create_pull_request_review_comment call with:
Unprocessable Entity: "Line could not be resolved"
This blocks the entire review submission, including the approval. The bot's intended output (visible in the safe-output/outputs.jsonl artifact) shows it wanted to APPROVE the PR with one non-blocking nit, but the nit's line wasn't in a diff hunk.
Examples
Suggested fix
When the GitHub API returns 422 "Line could not be resolved" for an inline comment, fall back to posting it as a PR-level comment (or include it in the review body) instead of failing the entire review submission.
Problem
The PR re-review workflow fails to submit reviews when it tries to post an inline comment on a line that exists in the file but is outside the diff context. GitHub's API rejects the
create_pull_request_review_commentcall with:This blocks the entire review submission, including the approval. The bot's intended output (visible in the
safe-output/outputs.jsonlartifact) shows it wanted to APPROVE the PR with one non-blocking nit, but the nit's line wasn't in a diff hunk.Examples
Suggested fix
When the GitHub API returns 422 "Line could not be resolved" for an inline comment, fall back to posting it as a PR-level comment (or include it in the review body) instead of failing the entire review submission.