Plan-wide changes to ladders and defaults run inside HTTP handlers, each with its own transaction shape #187

Open
opened 2026-10-06 21:25:45 +00:00 by cgalo5758 · 1 comment
Owner

Grant acts live in internal/entitlements; three acts that move many organizations stayed in handlers. Tier removal (internal/server/operator_plan_ladders.go) runs in one transaction with sorted pool locks, and any failure changes nothing. The org-type default change (operator_org_types.go) and ladder reorder save the catalog first, then move each organization in its own transaction through enactOrgDisposition; a failure leaves that organization on the outgoing default, recorded only in the message after the commit.

Done when: the three acts are functions in internal/entitlements locking pools through one helper; the reorder and default change run in one transaction or record the organizations they did not move where a page can show them (#78); handlers only parse, call and render; and a test runs a tier removal concurrently with a default change on a shared pool. #82 builds on these functions.

Grant acts live in `internal/entitlements`; three acts that move many organizations stayed in handlers. Tier removal (`internal/server/operator_plan_ladders.go`) runs in one transaction with sorted pool locks, and any failure changes nothing. The org-type default change (`operator_org_types.go`) and ladder reorder save the catalog first, then move each organization in its own transaction through `enactOrgDisposition`; a failure leaves that organization on the outgoing default, recorded only in the message after the commit. Done when: the three acts are functions in `internal/entitlements` locking pools through one helper; the reorder and default change run in one transaction or record the organizations they did not move where a page can show them (#78); handlers only parse, call and render; and a test runs a tier removal concurrently with a default change on a shared pool. #82 builds on these functions.
cgalo5758 added this to the Public launch milestone 2026-10-06 21:25:45 +00:00
cgalo5758 added the
kind
design
area/entitlementsarea/operator-ui
labels 2026-10-06 21:25:45 +00:00
Author
Owner

This also covers tier add and tier delete. Both open their transactions in the handler, and tier delete renumbers the ladder as the reorder and the tier removal do (the race in #213). They move into internal/entitlements with the other three and take the same shape.

This also covers tier add and tier delete. Both open their transactions in the handler, and tier delete renumbers the ladder as the reorder and the tier removal do (the race in #213). They move into `internal/entitlements` with the other three and take the same shape.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#187