litellm/.github/scripts
Cursor Agent 8b5913bd35
agent_shin: extract shared constants/helpers; cover review_gate.yml in guardrail tests
Bug 1: `triage_with_llm.py` and `close_low_quality_prs.py` each defined
their own copies of `extract_greptile_score`, `parse_iso8601`,
`GREPTILE_BOT_LOGINS`, `SCORE_PATTERN`, `GRACE_COMMENT_MARKER`,
`GRACE_PERIOD_SECONDS`, `IMMEDIATE_CLOSE_LOGINS`, and
`AGENT_SHIN_DEFAULT_BOT_LOGIN`. The comments explicitly said the two
copies had to stay in sync, but nothing enforced it. A future change to
one (e.g. extending `SCORE_PATTERN` for a new Greptile output format)
would silently diverge from the other and the daily sweep and the LLM
judge would disagree on which PRs have low scores.

Extract these to `.github/scripts/agent_shin_shared.py` and re-export
them from each script so the existing test attribute access
(`triage_module.GRACE_COMMENT_MARKER`, etc.) keeps working without
any test changes.

Bug 2: `review_gate.yml` is a destructive workflow (close PRs, add/remove
labels, post comments) with the same gating philosophy as the others
(`AGENT_SHIN_ENABLED = "true"` + a per-run `CLOSE_FLAG = "true"`),
but it was missing from `DESTRUCTIVE_GATE_ENV` in the guardrail tests.
Add it so a future regression (e.g. flipping to `!= "false"`) is
caught by the same parameterized invariants as every other workflow.

Co-authored-by: Yassin Kortam <yassin@berri.ai>
2026-05-25 01:37:26 +00:00
..
agent_shin_shared.py agent_shin: extract shared constants/helpers; cover review_gate.yml in guardrail tests 2026-05-25 01:37:26 +00: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 agent_shin: extract shared constants/helpers; cover review_gate.yml in guardrail tests 2026-05-25 01:37:26 +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 agent_shin: extract shared constants/helpers; cover review_gate.yml in guardrail tests 2026-05-25 01:37:26 +00:00