Repository navigation
feat: return deployment and effective subagent limits from the organization limits API - #78
Conversation
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closing and reopening only to make GitHub recompute the merge ref against current main ( |
The merge ref now points at current main ( |
Merge evidence for head
|
Part of #76.
The organization Coder Agents settings UI (next PR in this stack) must show each subagent limit's deployment value and effective value, but the deployment limits are only readable through
GET /api/v2/deployment/config, which org admins and org auditors cannot read.GETandPUT /api/v2/chats/fork/organizations/{organization}/subagent-limitsnow returnForkOrganizationSubagentLimitsResponse:organization: the stored organization limits (unchanged shape, unset = omitted).deployment: the four deployment limits, with the default depth applied.effective: the limits in force in the organization.The
PUTrequest body is stillForkOrganizationSubagentLimits.effectivecomes fromchatd.EffectiveSubagentLimits, whichsubagentLimitsin chatd now calls too, so the rule (the lower of the deployment and organization values wins, 0 means no limit) exists once.ForkLimits.withDefaultsis exported asWithDefaultsfor the handler. No behavior change in chatd. Fork files only, plus the existing fork hook line incoderd/x/chatd/limits.go.Tests:
TestForkChatOrganizationSubagentLimitsgainsDeploymentAndEffective(org lower, deployment 0 = no limit, deployment lower, org unset; PUT response, GET and an org auditor's GET) andDefaultDepth. Both were checked to fail with the rule or the default broken. Generated types and API docs regenerated. No dev-build UAT for this API-only PR (lead decision); the end-to-end UAT runs with the UI PR.