Skip to content

fix(github): Skip review for owned PR feedback upkeep - #2516

Merged
dcramer merged 3 commits into
mainfrom
fix/github-owned-pr-feedback-upkeep
Nov 2, 2026
Merged

dcramer merged 3 commits into
mainfrom
fix/github-owned-pr-feedback-upkeep

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2438

When a child agent did review upkeep on a PR that Junior opened, Guardian returned ask for github_updatePullRequestFeedback and github_resolvePullRequestReviewThread. The parent then had to ask the user to approve a 👍 or a thread resolve. The issue proposes two more Guardian prompt rules. This PR instead makes the tools prove their own safety in code, so they don't need a model review.

  • github_updatePullRequestFeedback now reads the comment from GitHub, takes its PR number from issue_url or pull_request_url, and reads that PR in the same repo. It refuses before any reaction read or write unless the PR's user.id is the bot's id from the configured noreply email. A conversation comment on a plain issue gets a 404 from /pulls/N, so the tool refuses it as well.
  • github_resolvePullRequestReviewThread already checks through GraphQL that the bot authored the PR.
  • Both tools now set approvalMode: "approve". The only effect of each tool is the bot's own reaction or a thread's resolved state, on a PR the bot authored. Both effects are reversible. The annotations stay the same.
  • github_updatePullRequest (title and body) stays under review, because body text can make claims.

Guardian never sees these two tools now, so I removed the Guardian eval cases that expected allow for them. No eval case expected ask. The Guardian authority rules don't change.

The plugin docs (extend/build-a-plugin.md) said that a plugin tool with no approvalMode stays outside review. That is wrong: core sets auto, and Guardian reviews each call of a plugin tool in that mode. The docs now describe auto, review, and approve, and say when approve is correct.

Follow-up for getsentry/junior-prod: the "without asking for confirmation" wording in plugins.ts subscribeAfterCreate.intent is now redundant for these two tools.

via @dcramer.

--

View Session [Sentry]

@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 2, 2026 1:40am UTC

Request Review

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

3 screenshot changes — 3 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Child Agent Drawer · Desktop
Conversation Child Agent Drawer · Desktop
Changed
Conversation Child Agent Drawer · Mobile
Conversation Child Agent Drawer · Mobile
Changed

sentry-junior Bot and others added 2 commits November 1, 2026 23:48
The feedback tool now checks through GitHub that the comment is on a pull
request that the bot authored before it writes a reaction. The resolve tool
already checks this. Both tools now use approvalMode "approve", so child
agents no longer ask a person before routine upkeep on Junior's own PRs.

Fixes #2438

Co-Authored-By: David Cramer <[email protected]>
Omitting approvalMode on a plugin tool gives it auto, and Guardian reviews
it. The docs said the tool stays outside review. Describe each mode and when
approve is correct.

Co-Authored-By: David Cramer <[email protected]>

Co-Authored-By: David Cramer <[email protected]>

@dcramer dcramer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we removed some tests here, which makes me suspect that a thing we wanted to work, still works the same...

Replace the approvalMode config-echo tests and the generic gate case
with one child-agent integration case: an approve-mode plugin tool runs
in a child with no Guardian decision. Add the plain-issue refusal case
to the feedback tool tests.

Co-Authored-By: David Cramer <[email protected]>
@dcramer
dcramer merged commit 4fe58bd into main Nov 2, 2026
45 checks passed
@dcramer
dcramer deleted the fix/github-owned-pr-feedback-upkeep branch November 2, 2026 01:44

This branch was successfully deployed

1 active deployment
Preview – junior-docs — f38a90f5 Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Guardian asks child agents before PR feedback upkeep

1 participant