Skip to content

Evidence for agents#193: PR experiments#42 post-review 422 on inline comment outside diff hunk #217

Description

@fullsend-ai-retro

What happened

PR fullsend-ai/experiments#42 review run 29511937629 completed its review successfully (APPROVE with a low finding about a stale .gitignore entry). The post-review script posted the review comment body, then attempted to submit the formal GitHub review with 1 inline comment attached. The inline comment referenced a line outside the PR diff hunk, causing GitHub to return 422 Unprocessable Entity. Log output: 1 finding(s) posted as file-level comment(s) (line outside diff hunk) followed by Error: submitting review: create pull request review on #42: github api: 422 Unprocessable Entity. Because the post-script exited with code 1, the ready-for-merge label was never applied. The author had to force-push (to fix a separate stale usage text finding) and manually trigger /fs-review to get a successful review in run 29512743867.

What could go better

This is the same root cause as agents#193: fullsend post-review does not validate inline comment line numbers against diff hunks before submitting. PR agents#195 addresses the contributing factor (apply labels even on submission failure) but the root cause in fullsend post-review itself still needs fixing. Confidence: high — the failure pattern matches exactly.

Proposed change

This is additional evidence for agents#193. The root cause fix should be in fullsend post-review: validate that each inline comment's line number falls within a diff hunk for that file before attaching it to the review submission. If a line is outside all hunks, either omit the inline comment or convert it to a file-level comment. PR agents#195 should also land to ensure labels are applied even when submission fails.

Validation criteria

After the fix lands, a review with findings only on lines outside diff hunks should: (1) submit the formal GitHub review without failing, (2) omit or convert out-of-hunk inline comments, and (3) apply the appropriate outcome label (ready-for-merge or needs-revision).


Generated by retro agent from fullsend-ai/experiments#42

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions