litellm/.github/scripts
Mateo 125f10402f Port review-gate feature from #28758 onto #28147 triage scripts
Adds the "ready for review" label lifecycle (originally PR #28758) on top
of #28147's refactored triage_with_llm.py. The original commit was
authored against an older snapshot of #28117 and could not be applied
cleanly, so the additions were re-applied surgically:

- New constants: READY_FOR_REVIEW_LABEL, DEFAULT_GRACE_DAYS,
  DEFAULT_MIN_GREPTILE_SCORE, READY/REGRESSED/WITHIN_GRACE markers,
  GREPTILE_BOT_LOGINS, SCORE_PATTERN, AGENT_SHIN_AUTO_CLOSE_MARKER.
- New helpers: add_label, remove_label, extract_greptile_score,
  parse_iso8601 (the latter two mirrored from close_low_quality_prs.py
  so the daily sweep and the review gate read the score through the
  same logic).
- New comment formatters: format_ready_for_review_comment,
  format_all_clear_comment, format_regression_comment,
  format_within_grace_comment.
- New entry point: review_gate() implementing the pass/regress/recover
  state machine, with the label itself acting as persisted state so
  transition comments fire only on actual transitions.
- main() learns --review-gate, --grace-days, --min-greptile-score and
  dispatches to review_gate() when the flag is set.

Verified via tests/test_litellm/test_github_review_gate.py (18 tests)
and the existing triage suites (144 more) — all 162 pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 18:01:00 -07:00
..
close_duplicate_issues.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
close_low_quality_prs.py fix(close-low-quality-prs): report actual closes in dry-run summary 2026-05-19 07:59:22 +00:00
scan_keywords.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
triage_with_llm.py Port review-gate feature from #28758 onto #28147 triage scripts 2026-05-24 18:01:00 -07:00