Skip to content

Commit c8456b9

Browse files
committed
Update
[ghstack-poisoned]
2 parents 5086706 + 96a9be3 commit c8456b9

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from greenlight import github_types
2+
3+
4+
def test_github_types_module_imports_and_exposes_runtime_protocols():
5+
# Every other Protocol in github_types is defined under TYPE_CHECKING; VerdictClient and ScanClient
6+
# are the only two that exist at import time, so importing the module and touching them is all there
7+
# is to exercise at runtime.
8+
assert isinstance(github_types.VerdictClient, type)
9+
assert isinstance(github_types.ScanClient, type)

greenlight/tests/test_review.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,8 +1254,11 @@ def factory(_token, *, seconds_between_requests=None):
12541254

12551255

12561256
def test_fingerprint_throttle_stays_under_burst_limit():
1257-
# Aggregate fan-out rate is workers / seconds-between-requests; keep it <= 8 req/s to stay
1258-
# under GitHub's secondary (burst-rate) limit.
1257+
# The asserted quantity is the fan-out's aggregate request rate (workers / seconds-between-requests).
1258+
# 8 req/s is our own conservative budget, NOT a GitHub-published limit -- it is the ceiling we chose
1259+
# to stay comfortably under GitHub's (undocumented, variable) secondary/burst rate limit. It bounds
1260+
# only this fingerprint fan-out; the listing, dispatch, verdict, and authz clients each pace
1261+
# themselves independently and sit outside this budget.
12591262
assert review._FINGERPRINT_WORKERS / review._FINGERPRINT_SECONDS_BETWEEN_REQUESTS <= 8
12601263

12611264

0 commit comments

Comments
 (0)