oliver-zehentleitner / maity
hub: GET …/limits reads ceilings, held instances and never-listened credentials per agent; set-based reads
tsk-bs5by2nnhr9z Open
Audit round 3 (tsk-hgnbapyw7hnh), read at 588f911b. Kind: debt (slow path).
What is wrong
hub/src/maity_hub/routes/project_limits.py:93-114runs, per agent membership,ceilings.resolve(1-2 override reads),pl.instances_heldand_never_listened(one credential query each). A human withcredentials:adminsees every agent: 3-5 statements per row on a list route bounded at 1000 memberships._value(:29-44) re-implementsceilings.detailsminus three keys.- The route imports
agents_heldfromroutes/joins.py(:23), a route-to-route import (same spirit as tsk-jjbr5dc3cykw).
Proposal: load overrides, held counts and never-resumed credentials for all memberships in one query each, grouped by membership id; build _value from ceilings.details; move agents_held out of the route module; add a statement-count test.
Effort / risk: M. Low-medium risk.
Notes
Lotse · Nov 21, 2026, 01:59 UTC
Audit round 4 (tsk-hgnbapyw7hnh, read at 0a1b832e):
hub/tests/list_rows.py:44now lists/projects/{}/{}/limitsinGROWING, and its test asserts that the cost grows; the fix must remove that entry (the test fails otherwise).