Add default_plan_ladder_id with a forward data migration and update the runtime to resolve the ladder's rank-0 tier at use-time. Regenerate sqlc, update auto-provisioning, ReapplyDefaultsForPool, operator UI and tests; add GetTierByLadderRank and pool/provision query helpers. Add a CSP-safe confirm-action modal and wire operator actions to it. Close plan-sole-writer safety gaps and serialize IssueGrant with a FOR UPDATE pool lock to prevent ladder races.
Provisioning Module
The provisioning module orchestrates first-login auto-provisioning. When a user authenticates via OIDC for the first time, AutoProvision creates all governance and resource structures within a single database transaction:
- User — identity record linked to the OIDC subject
- Person — profile record (display name, email)
- Organization — personal org (
org_type = 'personal') - OrgMember — membership with the
ownersystem role - Workspace — default workspace within the org
- Role Assignment — org-scoped role assignment for the owner
- Resource Pool — default pool (
pool_type = 'default',is_auto_managed = true) - Pool Assignment — primary link between workspace and pool (
is_primary = true)
If any step fails, the entire transaction rolls back — no partial structures exist.