Skip to content

422 'Path could not be resolved' when creating review comments on deleted files #29

Description

@supasympa

Bug Description

ACIG encounters a 422 "Path could not be resolved" error when trying to create inline review comments on PRs that contain deleted files.

Root Cause

The buildReviewComments function in internal/reporters/github.go:143-158 does not verify that file paths exist in the PR's changed files before attempting to create review comments.

Steps to Reproduce

  1. ACIG analyzes code and finds issues
  2. ACIG tries to create inline review comments on files
  3. GitHub API rejects comments on files not in the PR's diff (422 error)
  4. ACIG falls back to a single sticky comment

Expected Behavior

ACIG should fetch the PR's changed files and filter findings to only those files before creating review comments, preventing the 422 error.

Current Workaround

The fallback to a single sticky comment is working, but it's not ideal as it doesn't provide inline context on the actual changed files.

References

  • internal/reporters/github.go:buildReviewComments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions