Skip to content

fix(ci): stop Agent Shin reconsider from triggering on bot comments - #37529

Open
devin-ai-integration[bot] wants to merge 1 commit into
litellm_internal_stagingfrom
litellm_agent_shin_reconsider_ignore_bot_comments
Open

fix(ci): stop Agent Shin reconsider from triggering on bot comments#37529
devin-ai-integration[bot] wants to merge 1 commit into
litellm_internal_stagingfrom
litellm_agent_shin_reconsider_ignore_bot_comments

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Agent Shin's own comments re-trigger the reconsider workflow
  • Every sweep close comment spawned a doomed unauthorized run

How it solves it:

  • Job now skips comments authored by bots
  • Human authors and collaborators are unaffected

User Flow

Before: a maintainer watching the Agent Shin triage sweep gets a burst of pointless workflow runs, one per PR the sweep touched

  1. The sweep posts its close comment on a PR, e.g. proto(mcp): per-user env-var fields demo flow (UI mockup) #28399, and that comment tells the contributor to reply @agent-shin reconsider to bring the PR back
  2. Because the comment body contains that phrase, the reconsider workflow triggers on the bot's own comment
  3. The maintainer opens https://github.com/BerriAI/litellm/actions/workflows/triage_reconsider.yml and sees a run per closed PR, each one green but doing nothing except logging that devin-ai-integration[bot] is not authorized
  4. The noise repeats on every sweep, so a real contributor reconsider is hard to spot in the run list

After: the same sweep leaves the reconsider run list clean, so the only runs there are real contributor requests

  1. The sweep posts the same close comment on the same PR, with the same @agent-shin reconsider instructions
  2. No reconsider run is created at all, since the comment came from a bot
  3. The maintainer opens the same Actions page and sees only runs triggered by humans
  4. A contributor who actually comments @agent-shin reconsider still gets the 👀 reaction and a verdict, exactly as before

Relevant issues

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review

No tests: the change is a GitHub Actions if: expression, which has no test harness in this repo. The trigger data below is from the real events

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

issue_comment workflows always run from the default branch, so the new gate cannot execute from a PR branch. Before is the live behavior on litellm_internal_staging, After is the same real event payload evaluated against the new condition

Before (f4b46c8)

  1. List the reconsider runs from today's sweep
$ gh run list --workflow triage_reconsider.yml -L 200 --json conclusion,createdAt,displayTitle \
    | jq -r '[.[] | select(.conclusion != "skipped")] | .[] | "\(.createdAt)  \(.displayTitle)"'
2026-08-19T21:36:09Z  proto(mcp): per-user env-var fields demo flow (UI mockup)
2026-08-19T21:36:06Z  prototype(ui): per-user fields for MCP servers (mock/throwaway)
2026-08-19T21:36:03Z  feat(mcp): per-server env vars with global + per-user scopes
2026-08-19T21:36:01Z  feat(mcp): add admin-declared per-user fields for MCP servers
2026-08-19T21:35:58Z  fix(proxy): make pass-through auth checks method-aware
2026-08-19T21:35:55Z  fix(bedrock): forward clear_tool_uses context_management on Invoke route
2026-08-19T21:35:54Z  fix(azure): preserve AD token refresh in v1 OpenAI client path
2026-08-19T21:35:52Z  fix(proxy): keep the model-group alias through vector store credential merges

Eight runs in 17 seconds, all of them from the sweep's own comments rather than from any contributor

  1. Read what one of those runs actually did
$ gh run view 32304710883 --log | grep -E "COMMENTER: |not authorized"
COMMENTER: devin-ai-integration[bot]
##[notice]Commenter 'devin-ai-integration[bot]' (CONTRIBUTOR) is not authorized to trigger reconsider; skipping subsequent steps.

Every later step (reaction, checkout, Python setup, the LLM judge) was skipped, so the run could never have produced a verdict

After (fe97a9d)

  1. Pull the triggering comment from the same run and check it against the new condition
$ gh api repos/BerriAI/litellm/issues/comments/5348285161 \
    -q '{login: .user.login, type: .user.type, has_phrase: (.body | contains("@agent-shin reconsider"))}'
{"has_phrase":true,"login":"devin-ai-integration[bot]","type":"Bot"}

github.event.comment.user.type != 'Bot' is false and !endsWith(github.event.comment.user.login, '[bot]') is false, so the job condition is false and no run is created for any of those eight comments

  1. Confirm a human reconsider still passes the gate
$ gh api repos/BerriAI/litellm/issues/comments/5348285161 -q .author_association
CONTRIBUTOR

The added clauses only look at the commenter's account type, so the existing author / OWNER / MEMBER / COLLABORATOR authorization step is what still decides human comments

Type

🚄 Infrastructure

Caveats (if any)

  • Takes effect once merged to the default branch
  • A bot-authored PR can no longer self-reconsider

Link to Devin session: https://app.devin.ai/sessions/2e6fbd7ba56d4655b42601c88868a654

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot requested a review from a team August 19, 2026 21:49
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR prevents bot-authored comments from starting the Agent Shin reconsider job while preserving reconsider requests from human commenters.

  • Adds checks for GitHub bot account type and the conventional [bot] login suffix.
  • Explicitly excludes the oss-agent-shin account.
  • Documents why bot comments must be filtered at the job boundary.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The new condition applies only to bot-authored issue comments, uses fields available on the configured issue-comment event, and leaves the existing human reconsider and authorization flow unchanged.

Important Files Changed

Filename Overview
.github/workflows/triage_reconsider.yml Adds valid job-level bot identity filters to suppress self-triggered reconsider runs without changing human authorization behavior.

Reviews (1): Last reviewed commit: "fix(ci): stop Agent Shin reconsider from..." | Re-trigger Greptile

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant