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