Commit Graph

22 Commits

Author SHA1 Message Date
751bae7768 Use plan ladder for org defaults
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.
2026-04-27 01:57:17 -05:00
667e9ffe24 Add plan ladders and pool provision transitions
Introduce DB migrations for ladder and pool-attachment tables and an
audit log for provision transitions. Make product_type nullable and add
lifecycle_status plus a product_kinds view. Implement Transition and
ReapplyDefaultsForPool primitives, SQLC queries/models, webhook and
Temporal workflow integration, and accompanying unit/integration tests.
2026-04-19 20:45:56 -05:00
6f2788b9a0 Enable auto-provision of default entitlements. 2026-04-10 14:15:13 -05:00
18a0969ad3 Stripe invoice payment projections. 2026-04-05 03:51:31 -05:00
f23a84999c sqlc: standardize generated type names across all modules
Drop redundant schema prefixes from all sqlc-generated Go types. Since
each module generates into its own package, the package already provides
the namespace — billing.Account is unambiguous without
billing.BillingAccount.

Changes:
- Add rename: blocks to all 6 sqlc.yaml files mapping schema-prefixed
  names to clean idiomatic names (e.g. BillingBillingAccount → Account,
  IdentityPerson → Person, OrganizationOrganization → Organization)
- Rename billing.billing_accounts → billing.accounts (table name
  repeated
  the schema; the schema already provides that context)
- Rename integration.integration_outbox → integration.outbox (same
  reason)
- Regenerate all sqlc output across billing, identity, organization,
  entitlements, stripe, and fedwiki modules
- Update all calling code (server, workflows, provisioning, tests) to
  use
  the new names
- Add internal/db/sqlc_schemas.sql — sqlc-only schema declarations so
  every module can resolve schema-qualified names without including the
  full db migrations
- Update docs/database-management.md with the naming convention and
  standard sqlc.yaml template

Convention going forward: table names must not repeat the schema name;
generated types carry no schema prefix; the Go package provides the
namespace (like http.Request, not http.HttpRequest).
2026-04-05 02:35:36 -05:00
7ef1d32529 Stripe subcription creation 2026-04-05 02:00:07 -05:00
e5698d5fcc Stripe product catalog sync. 2026-04-04 14:58:18 -05:00
3d602c0601 Add billing accounts and Stripe customer sync 2026-04-04 04:08:23 -05:00
3aad9268df Stripe Billing Plumbing 2026-04-03 19:25:24 -05:00
675a4d93a3 Buffer template rendering and fix FedWiki sync
Introduce SafeTemplates.Render to execute templates into a buffer and
prevent partial HTML on errors. Replace direct ExecuteTemplate calls in
partial handlers and add a make lint-templates target to catch bypasses.
Update operator sites template/view model to use OwnerOrgName. Guard the
FedWiki sync by skipping inserts when DefaultWorkspaceID is empty and
scope deletes to the configured default workspace only.
2026-03-29 04:58:02 -05:00
6330ae7a42 Grants management! 2026-03-24 17:35:14 -05:00
f737dd0314 Identity and organization modules. 2026-03-23 17:28:14 -05:00
2d579b377c Move from sqlite to postgres. 2026-02-02 22:19:16 -06:00
b1282c7488 Make site ownership work correctly for fucks sake. 2026-01-01 22:07:11 -06:00
c07487e324 Implement FedWiki site synchronization workflow and related configurations 2025-12-29 19:24:52 -06:00
6ef8ef7782 Update site deletion methods to use hard delete in FarmManager API 2025-12-29 18:44:31 -06:00
98b5cee5a7 Create site flow now assigns ownership correctly. FedWiki access token issues are now not retryable. 2025-12-27 17:57:21 -06:00
8512f368fb Implement Temporal OAuth2 authentication support and configuration 2025-12-24 16:46:54 -06:00
cc30219e1c Documentation 2025-12-19 15:47:32 -06:00
b9ccae5929 Refactor FedWiki site management UI and error handling; enhance user feedback for site creation and deletion processes. 2025-12-18 16:09:58 -06:00
74002e424f Rough FedWiki Site management through temporal workflows! 2025-12-18 01:05:55 -06:00
9009c3f133 Add Temporal workflows scaffolding and documentation. 2025-12-13 16:42:07 -06:00