Skip to content

ref(pr-iter): post the missing-permissions comment through SCM - #123918

Open
joseph-sentry wants to merge 1 commit into
masterfrom
joey--pr-iteration-missing-perms-scm-client
Open

ref(pr-iter): post the missing-permissions comment through SCM#123918
joseph-sentry wants to merge 1 commit into
masterfrom
joey--pr-iteration-missing-perms-scm-client

Conversation

@joseph-sentry

Copy link
Copy Markdown
Contributor

The missing-permissions notice went out through the raw GitHub integration
client, the last direct client call left in PR iteration. Route it through
the SCM facade like the cap-exhausted comment already does, guarding on the
comment protocol so an unsupported provider is skipped rather than raising.
The comment_failed metric and log now carry a reason tag naming which step
gave up.

The missing-permissions notice went out through the raw GitHub integration
client, the last direct client call left in PR iteration. Route it through
the SCM facade like the cap-exhausted comment already does, guarding on the
comment protocol so an unsupported provider is skipped rather than raising.
The comment_failed metric and log now carry a reason tag naming which step
gave up.
@joseph-sentry
joseph-sentry requested a review from a team as a code owner September 9, 2026 17:03
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 9, 2026

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0beed77. Configure here.

scm_patcher = patch(
f"{MODULE}.make_scm",
return_value=MagicMock(spec=CreatePullRequestCommentProtocol),
)

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.

Test SCM stub fails protocol check

Medium Severity

_patch_scm returns a MagicMock that Python 3.13 isinstance does not treat as CreatePullRequestCommentProtocol, so _post_comment always takes the unsupported_provider path. Happy-path tests never post a comment and fail or pass for the wrong reason.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0beed77. Configure here.

@joseph-sentry
joseph-sentry requested review from a team and alexsohn1126 September 9, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant