oliver-zehentleitner / maity

limits: every quota refusal says which limit, the count and where to raise it; one limits overview

Sign in to report

tsk-spmhjqm7szag Done Maity Coder Claude 002

The maintainer wants to scale agents on runners without running into limits he cannot see or change himself (2026-11-17). Today he hit three different refusals in one hour, and none told him which limit applied or where to raise it:

  • placement_quota: the project's max_placements, today settable only by API; #1932 adds the web field.
  • instance_quota: the agent's max_instances in its rulebook.
  • The runner's own max_agents.

Goal:

  1. Every quota refusal, in the dashboard and in the CLI, names the limit, the current count and the place to raise it, with a link for whoever may raise it.
  2. Settings show one overview of all limits that apply to agents on runners: project, agent, runner. It shows the current use, and each limit can be edited where the viewer may.
  3. A stale instance that never listened (joined, never woke) is shown as such, with "revoke" next to it, so it does not silently hold a slot.

Contract first (error details and the overview shape), then hub, web and CLI. Defaults are not changed here; that is a separate decision for the maintainer.

Notes

  1. Lotse · Nov 17, 2026, 18:33 UTC

    Korrektur zum PR-Body von #1937: Die Basis ist main fd461be68c33767e7841a5489009b16fae03f08d (Merge-Base, Parent des ersten Commits), nicht 7ae56994. Gegen main 7ae5699454947fcd00757866c540042c752e7cc2 ist der Merge sauber. Head seit dem A1087-Fix: 5599fe5e4a7f05003e6cc4d23abcb7b532b8925b (zwei Commits). Der Fix bringt außerdem: NOT_ROUTED-Einträge in hub/tests/test_contract_routes.py, runners nur für Leser von GET …/runners, ceiling.value nur für wer den Wert setzt, raise null an der Grenze 1000, und für max_open_claims null gilt die Obergrenze.

  2. Lotse · Nov 17, 2026, 20:19 UTC

    #1937 description of record for head 8609bc2afc2ec37868b28c1e664f57f8199b9f7a (from eyq5 155211; replaces the earlier state; the GitHub body is older):

    Stand #1937 bei Head 8609bc2afc2ec37868b28c1e664f57f8199b9f7a (vier Commits auf main fd461be6): Vertrag für tsk-spmhjqm7szag und tsk-t63d50qy3s0k, nicht gebaut. Neu §6.31 Limits (vier Projektwerte mit Obergrenze, Rangfolge Projekt → Konto → Default, unlimited bis zur Hub-Grenze 1000, gemeinsame Quota-details mit name/limit/count/max/scope/source/ceiling/raise, GET …/limits) und §16.5.1 (Overrides nur durch instance:admin, pro Projekt und Konto, inkl. max_attachment_storage_per_project, mit Step-up). max_open_claims null bleibt ohne Cap, außer ein Override setzt eine Zahl. max_placements setzt nur ein Mensch mit project:admin. Runner melden bei capacity ein quota. KTW context/scope.md 7d8669c6. Reviews: A1087, A1096 (Grok), A1091 (Design) eingearbeitet.

    Lead decisions (lotse, 2026-11-17): max_open_claims null stays no cap unless an override sets a number ("defaults stay", req-xzfcpq84ka9f); max_attachment_storage_per_project is included as a project override (the card asks for every per-project cap).

  3. Lotse · Nov 17, 2026, 20:48 UTC

    Stand #1937 bei Head 03936e16ac25418d5787bd69f07d6d5a7f2361b2 (acht Commits auf main fd461be6): Vertrag für tsk-spmhjqm7szag und tsk-t63d50qy3s0k, nicht gebaut. Neu §6.31 Limits (vier Projektwerte mit Obergrenze, Rangfolge Projekt → Konto → Default, Org-Projekte nur Projekt-Override außer max_instances über den Profil-Owner, unlimited bis zur Hub-Grenze 1000, gemeinsame Quota-details name/limit/count/max/scope/source/ceiling/raise, GET …/limits) und §16.5.1 (Overrides nur durch instance:admin, pro Projekt und Konto, inkl. max_attachment_storage_per_project vor dem Instanzwert aus jeder Quelle, mit Step-up). max_open_claims null bleibt ohne Cap, außer ein Override setzt eine Zahl. max_placements setzt nur ein Mensch mit project:admin. Runner melden bei capacity ein quota. KTW context/scope.md 7d8669c6; context/attachments.md 24123f11 offen geändert: „env wins“ gilt nur noch für den Instanzwert. Reviews A1087, A1096, A1124 (Grok), A1091, A1125 (Design) eingearbeitet.

  4. Lotse · Nov 17, 2026, 21:44 UTC

    Stand #1937 bei Head 6e33a3f4e40c87a9eca4d82afe6b2b90255e475f (neun Commits auf main fd461be6): wie die Notiz zu 03936e16, dazu: raise ist nur null, wenn nichts limit anheben kann (kein Cap, oder Hub-Grenze 1000 bei max_placements/member_agents_max/max_instances); max_agents nennt immer runner_owner. never_listened im Limits-Overview sind aktive Instanzen ohne jede Session (nie resume), unabhängig von last_seen_at. Reviews zusätzlich: A1134 (Grok), A1135 (Design), A1144 (ChatGPT) eingearbeitet.

  5. Lotse · Nov 17, 2026, 22:00 UTC

    Stand #1937 bei Head 418d70d264339c2c04097cbf5d2c6777607e12c2 (elf Commits auf main fd461be6): wie die Notiz zu 6e33a3f4, dazu: raise für max_open_claims bei 1000 richtet sich nach dem gespeicherten Wert (null unter numerischem Override-Ceiling: instance:admin; Zahl ohne numerischen Override: project:admin mit policy.max_open_claims, Ausnahme von „instance:admin am Ceiling“; Zahl unter numerischem Override 1000: project:admin, der Cap fällt erst, wenn instance:admin auch den Override hebt). never_listened ist dieselbe Menge wie never_resumed (resumed_at null, §10). Reviews zusätzlich: A1157 (Grok) eingearbeitet.

  6. Lotse · Nov 17, 2026, 22:51 UTC

    PR 1 of 3 (contract) merged as 59743f0dbb963e427649e07657e5f4b2b3970966 (#1937). Card stays in progress for PR 2 (hub and CLI) and PR 3 (web).

  7. Maity Coder Claude 004 · Nov 17, 2026, 23:23 UTC

    For PR 3 (web), lead's decision 156680: PATCH /admin/settings/limits stays invalid for an out-of-range value, the new endpoints /admin/projects/{owner}/{slug}/limits and /admin/users/{id}/limits answer out_of_range (§16.5.1). The web's limits settings must read both.