From 5741b26e0bdee71b608b895878feca3417e4464d Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 6 Aug 2026 13:08:30 -0700 Subject: [PATCH 1/3] fix(ci): tell stale branches to pull latest staging on vacuous type-check runs --- scripts/type_check_gate.py | 4 +++- tests/test_litellm/test_type_check_gate.py | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/type_check_gate.py b/scripts/type_check_gate.py index c9f774c6113..0290baf1833 100644 --- a/scripts/type_check_gate.py +++ b/scripts/type_check_gate.py @@ -627,7 +627,9 @@ def cmd_check(head: Mapping[str, int], base_ref: str) -> None: print( f"FAIL: basedpyright produced no errors, but {BUDGET_PATH.name} allows " f"up to ~{expected}. The type checker almost certainly crashed or emitted " - f"nothing; refusing to certify a vacuous run." + f"nothing; refusing to certify a vacuous run. This usually means this " + f"branch is missing type checker fixes from its base branch: pull the " + f"latest {DEFAULT_BASE.removeprefix('origin/')} and merge or rebase onto it." ) raise SystemExit(1) if not over_ceiling(head, budget): diff --git a/tests/test_litellm/test_type_check_gate.py b/tests/test_litellm/test_type_check_gate.py index d104e4ca0c8..87730f496ea 100644 --- a/tests/test_litellm/test_type_check_gate.py +++ b/tests/test_litellm/test_type_check_gate.py @@ -200,6 +200,16 @@ def test_genuine_zero_and_empty_budget_are_not_vacuous(): ) +def test_vacuous_run_failure_tells_the_user_to_pull_latest_staging(capsys): + import pytest + + with pytest.raises(SystemExit): + gate.cmd_check({}, gate.DEFAULT_BASE) + out = capsys.readouterr().out + assert "refusing to certify a vacuous run" in out + assert "pull the latest litellm_internal_staging and merge or rebase onto it" in out + + def test_update_ratchets_a_limit_down_by_what_the_branch_fixed(): # A rule that dropped from 40 (branch point) to 30 (current) fixed 10, so its # limit of 100 falls to 90 -- the granted headroom (60) is preserved, not the From 5a90d3105d61ed70cbe55a95d535e6e0c3b89f5c Mon Sep 17 00:00:00 2001 From: Mateo Wang <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 6 Aug 2026 15:32:55 -0700 Subject: [PATCH 2/3] chore: remove test --- tests/test_litellm/test_type_check_gate.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tests/test_litellm/test_type_check_gate.py b/tests/test_litellm/test_type_check_gate.py index 87730f496ea..d104e4ca0c8 100644 --- a/tests/test_litellm/test_type_check_gate.py +++ b/tests/test_litellm/test_type_check_gate.py @@ -200,16 +200,6 @@ def test_genuine_zero_and_empty_budget_are_not_vacuous(): ) -def test_vacuous_run_failure_tells_the_user_to_pull_latest_staging(capsys): - import pytest - - with pytest.raises(SystemExit): - gate.cmd_check({}, gate.DEFAULT_BASE) - out = capsys.readouterr().out - assert "refusing to certify a vacuous run" in out - assert "pull the latest litellm_internal_staging and merge or rebase onto it" in out - - def test_update_ratchets_a_limit_down_by_what_the_branch_fixed(): # A rule that dropped from 40 (branch point) to 30 (current) fixed 10, so its # limit of 100 falls to 90 -- the granted headroom (60) is preserved, not the From 0be8b8306e208c9f8b13ba0a6ceb5c08545de71a Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 6 Aug 2026 16:41:27 -0700 Subject: [PATCH 3/3] chore: rerun ci