Skip to content

Add regression coverage for PR review path-resolution fallback#47380

Merged
pelikhan merged 2 commits into
mainfrom
copilot/deep-report-broaden-pr-review-fallback
Jul 22, 2026
Merged

Add regression coverage for PR review path-resolution fallback#47380
pelikhan merged 2 commits into
mainfrom
copilot/deep-report-broaden-pr-review-fallback

Conversation

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

GitHub can reject inline PR review comments with 422 "Path could not be resolved" in the same fallback family as "Line could not be resolved". This path-based variant was not covered by tests, leaving the safe-output body/partial-anchor fallback effectively unvalidated.

  • What changed

    • Added a focused regression test in actions/setup/js/pr_review_buffer.test.cjs for a review submission that fails with:
      • message: "Path could not be resolved"
      • field: "comments[1].path"
    • The test verifies the existing fallback behavior:
      • resolvable comments are retried inline
      • the unresolvable comment is appended to the review body
      • the retry warning remains informative
  • Why this matters

    • Covers the path-based 422 variant in the same reviewer fallback path as line-resolution failures
    • Reduces the chance of this class of API validation errors turning reviewer runs red without preserving review content
  • Example scenario covered

    const unresolvedError = new Error('Unprocessable Entity: "Path could not be resolved"');
    unresolvedError.response = {
      data: {
        errors: [{ field: "comments[1].path", message: "Path could not be resolved" }],
      },
    };

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Broaden PR-review 422 fallback to match 'Path could not be resolved' Add regression coverage for PR review path-resolution fallback Jul 22, 2026
Copilot AI requested a review from pelikhan July 22, 2026 18:58
@pelikhan
pelikhan marked this pull request as ready for review July 22, 2026 18:59
Copilot AI review requested due to automatic review settings July 22, 2026 18:59
@pelikhan
pelikhan merged commit 2868d6e into main Jul 22, 2026
12 checks passed
@pelikhan
pelikhan deleted the copilot/deep-report-broaden-pr-review-fallback branch July 22, 2026 19:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds regression coverage for indexed path-resolution failures during PR review submission.

Changes:

  • Verifies resolvable comments remain inline.
  • Verifies unresolvable path comments move to the review body.
  • Confirms the retry warning remains informative.
Show a summary per file
File Description
actions/setup/js/pr_review_buffer.test.cjs Adds focused partial-anchor fallback coverage for path-resolution errors.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.83.1

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.

[deep-report] Broaden PR-review 422 fallback to match "Path could not be resolved" (pr_review_buffer.cjs:554)

3 participants