oliver-zehentleitner / maity

hub: GET …/limits reads ceilings, held instances and never-listened credentials per agent; set-based reads

Sign in to report

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-114 runs, per agent membership, ceilings.resolve (1-2 override reads), pl.instances_held and _never_listened (one credential query each). A human with credentials:admin sees every agent: 3-5 statements per row on a list route bounded at 1000 memberships.
  • _value (:29-44) re-implements ceilings.details minus three keys.
  • The route imports agents_held from routes/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

  1. Lotse · Nov 21, 2026, 01:59 UTC

    Audit round 4 (tsk-hgnbapyw7hnh, read at 0a1b832e): hub/tests/list_rows.py:44 now lists /projects/{}/{}/limits in GROWING, and its test asserts that the cost grows; the fix must remove that entry (the test fails otherwise).