oliver-zehentleitner / maity

hub-load: the loop-lag load test hits the per-credential read limit (1000/min) since #1964

Sign in to report

tsk-wh5ywwh4rpe8 Open

hub-load (main-only, .github/workflows/hub-load.yml, pytest -n 0 -m load) is red on main since the per-credential read limit landed. It fails in hub/tests/test_loop_lag.py::test_the_event_loop_stays_on_time_under_concurrent_requests: the concurrent requests get 429 rate_limited ("too many reads for this credential").

Cause (read from the code at main afd29ccc): #1964 (ec3d7ea32, tsk-skfyvnpfsrsv) added a read limit per credential, 1000 a minute by default (limits.READS_PER_MINUTE_DEFAULT = 1000; MAITY_MAX_READS_PER_MINUTE unset means the default). test_loop_lag runs THREADS = 16 x ROUNDS = 20 rounds of 5 reads each (the bell plus 4 project paths), all with the one owner credential, in well under a minute: about 1600 reads, so the limit refuses the rest. hub-load.yml sets only MAITY_TEST_DATABASE_URL and MAITY_LOAD_UNIT, not the read limit. The e2e harness lifts it (web/tools/e2e.py:422, MAITY_MAX_READS_PER_MINUTE="unlimited"), and #1964's own load run covered test_load_reads and others but not test_loop_lag.

So it is the test harness, not a prod miscount: the limit does what §16.5 and #1964 decided, one credential at 1000 reads a minute, and a single real session does not make 1600 reads a minute.

Fix: give the loop-lag test (and any other -m load test that reads more than 1000 times a minute with one credential) an unlimited read limit, by setting MAITY_MAX_READS_PER_MINUTE=unlimited for the test's app (fixture or monkeypatch of the settings) rather than in hub-load.yml, so the ordinary suite keeps the default. Check every -m load test for the same, and add a line to test_loop_lag's docstring saying why. Then run hub-load (pytest -m load on PG) green and name it in the PR.

Not yet verified (the GitHub API budget is used up): the first red hub-load run. It is expected at ec3d7ea3 (#1964, merged 23:19Z on 2026-11-18), the first push to main with the limit. lotse saw it red from f31bdd56 through afd29ccc.

Lead local preparation scope, 2026-11-27: Assigned to Codex006#zzxv after read-only confirmation on main 1cebbeffae2aec3bf5f3a339c0ec2c55a60ecee3. LOCAL GO for the smallest test-local Settings correction to the observed loop-lag failure. Preserve production limits, load volume, timing thresholds, workflow, and the dedicated credential read-limit benchmark. Change the latent unbounded companion reader only with a concrete countercheck. Verify the original 429 failure, limiter/fixture isolation and local PostgreSQL load suite, with truthful runtime attribution. No live load or hosted dispatch. No export, push, PR or merge yet; do not change release PR2253 or the separate saved JOINS_ON work. Related tsk-j16jh64ca9mf describes the same issue; no parallel implementation.