litellm/.github
Cursor Agent 28ba9f7c6b
fix(triage): honor --close in --reconsider mode + gate reopen on bot-close provenance
Address two related concerns raised in PR review on the reconsider flow:

1. **Dry-run support for --reconsider** (P1, greptile-apps):
   The previous --reconsider branch unconditionally called post_comment +
   reopen_* regardless of --close. The docstring claimed 'close is forced
   True implicitly', but the workflow's only kill switch was
   AGENT_SHIN_ENABLED — invoking the script directly without --close was
   still destructive, the opposite of the conventional dry-run
   expectation.

   triage() now honors close=False in reconsider mode: a passing verdict
   returns action='would-reopen' (with the comment body it WOULD post in
   result['comment']) and a failing verdict returns
   action='would-leave-closed-still-failing'. The reconsider workflow now
   appends --close iff AGENT_SHIN_ENABLED == 'true', mirroring the
   pattern used by close_low_quality_prs.yml.

2. **Provenance gate for reopen** (P2, both greptile-apps and veria-ai):
   The reconsider flow could be used to silently override a maintainer's
   close decision — an external author edits the closed PR to include a
   closing keyword, comments '@agent-shin reconsider', and the bot
   reopens it. There was no check that Agent Shin was the actor that
   originally closed it.

   triage() now requires was_auto_closed_by_agent_shin() to be true
   before any reopen path can fire. The check looks for a bot-authored
   comment (login ends with '[bot]') containing the auto-close marker
   'I'm **Agent Shin**'. Filtering by bot author makes the marker
   unspoofable: a contributor pasting the phrase into a manual comment
   cannot satisfy the check. When the provenance gate fails, triage
   returns action='skip-not-bot-closed' without burning LLM tokens or
   posting anything.

Unit tests cover both behaviors plus the failure modes of
was_auto_closed_by_agent_shin (no comments, non-bot author with marker,
bot comment without marker, marker found anywhere in the comment list).

Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-05-18 05:54:47 +00:00
..
codeql [Infra] Improve CodeQL scanning coverage and schedule 2026-03-27 12:04:09 -07:00
ISSUE_TEMPLATE docs(templates): require expected/actual + QA proof for external contributions 2026-05-17 16:25:07 +00:00
observatory Add observatory test workflow for RC/stable releases 2026-03-01 15:30:09 -03:00
screenshots fix(team_endpoints): auto-add SSO team members to org on move (proxy admin only) (#26377) 2026-04-24 08:36:25 -07:00
scripts fix(triage): honor --close in --reconsider mode + gate reopen on bot-close provenance 2026-05-18 05:54:47 +00:00
workflows fix(triage): honor --close in --reconsider mode + gate reopen on bot-close provenance 2026-05-18 05:54:47 +00:00
dependabot.yaml chore: fixes 2026-04-05 01:30:57 -07:00
deploy-to-aws.png Add files via upload 2023-10-25 16:33:53 -07:00
FUNDING.yml Update FUNDING.yml 2023-09-22 09:51:35 -07:00
pull_request_template.md feat(triage): close any PR (incl. drafts, any age); add @agent-shin reconsider flow 2026-05-18 00:15:42 +00:00
template.yaml (chore) cleanup 2024-02-09 09:28:13 -08:00