Commit Graph

166 Commits

Author SHA1 Message Date
8065d4837a Mark milestone 7a as Done 2026-05-12 20:46:03 -05:00
b479f5981b M7-7b: archive operator-ia change — declare operator panel IA
Define the catalog/runtime/integration layering, per-org composite
view route, curated landing surface, breadcrumb positional contract,
reserved query-param real estate, and single-entry-point grant action
affordances. Adds 6 requirements to operator-panel-navigation; the
legacy ?tab= SPA contract stays until M7d retires it.

Also files an independent tech-debt item for member-console reading
products.product_type directly instead of the billing.product_kinds
view, per upstream membcons-db Doc 35 Product Kind Taxonomy.
2026-05-12 16:16:20 -05:00
fd7c61d594 Add Operator Panel IA decision record and spec delta
Introduce docs/operator-ia.md and an OpenSpec change "operator-ia" with
design, proposal, spec delta, and tasks; update status to mark M7b In
progress
2026-05-12 15:51:42 -05:00
bc5c309d12 Mark M6 complete; file Phase A v1+v2 UX bugs
status/milestones.md: mark M6 phases 6a-6f as Done — the plan-ladder
schema, transition primitive, operator catalog/auto-provisioning/
enrollment UIs, and member tier-aware view have all landed and are
exercised by Phase A v2 evidence.

status/issues.md: file 11 concrete bugs surfaced during Phase A v1
and v2 walkthroughs that were previously only living in
docs/operator-ux-walkthrough-evidence/INDEX.md. Distinction: research
findings stay in INDEX.md; bugs go in issues.md so they're tracked
for M7 sub-phases to pick up.

Filed:
- v1: heading hierarchy (a11y), missing autocomplete (a11y), inline
  event-handler (CSP), URL/route/code naming drift, FedWiki Sites
  empty under seed, operator SPA partial eager-fetch.
- v2: rules form supports only limit rules, revoke-and-transition
  empty-product-name interpolation defect, lifecycle_status not
  exposed in product edit, plan-ladder Tiers "no products" copy is
  misleading, two grant-issuance surfaces with no cross-link, two
  grant-revoke paths non-equivalent and indistinguishable.
2026-05-11 10:55:14 -05:00
7d60af65d1 Archive three demo-seeder & keycloak-fix OpenSpec changes
Move 2026-05-10-member-console-demo-seeder,
2026-05-11-keycloak-id-pinning-fix, and 2026-05-11-demo-seeder-persons
into openspec/changes/archive/ and fold their specs into
openspec/specs/{keycloak-test-seed,member-console-demo-seed}/spec.md.
2026-05-11 10:55:14 -05:00
81a11f8f5d Add Phase A v2 operator UX walkthrough evidence
Re-run Phase A walkthrough against the seeded baseline (demo seeder
+ Keycloak ID pinning fix + person seeding). 14 slugs gain
screenshot-v2.png; 10 previously-skipped slugs are now reachable.

INDEX.md gains:
- A Phase A v2 run-metadata block alongside the original v1 metadata.
- Status upgrades for the 10 newly-reachable slugs (✗ → ✓ v2).
- 10 cross-check findings (Phase A v2 findings section) comparing
  seeded evidence against the 7a.1 research doc — including the
  two-revoke-paths divergence in confirm-modal copy, per-org Issue
  Grant being plan-only, the empty-product-name interpolation defect
  on revoke-and-transition, and the rules form supporting only
  `limit` rules despite schema supporting boolean.

Adds a README.md documenting Phase A's overwrite-in-place contract
(non-LLM-keyed evidence reflecting current stack state).
2026-05-11 10:55:14 -05:00
9d11ee0328 Add member-console demo seeder with person seeding
Add a `seed-demo` subcommand (cmd/seed_demo.go + internal/demoseed/)
that inserts a fixed reference catalog into the member-console DB so
the operator panel has rows to walk through for UX research. Catalog:
6 demo-* products (4 by product_type + 2 extra plans), 1 plan ladder
with 3 tiers, 1 entitlement set with 2 rules (limit + boolean), and 1
grant on Alice's personal org (once she's logged in).

Person rows for bob/carlos/diana are seeded via provisioning.AutoProvision
keyed on the pinned Keycloak UUIDs — no longer fragile now that
seed-keycloak.sh's partialImport switch preserves the pinned id. Alice
is intentionally NOT pre-seeded so the lazy-creation OIDC flow stays
exercised on every fresh stack.

Idempotency: list+filter by `name` for catalog rows, by `oidc_subject`
for persons. Re-running is a no-op for created rows; warns + skips
the grant if alice hasn't logged in yet.

Host-side invocation only — run `./test/seed-demo.sh` after
bootstrap-stack.sh. Mirrors how member-console itself runs on the
host (config + secrets live under test/).

Two OpenSpec changes folded in: 2026-05-10-member-console-demo-seeder
(the seeder) and 2026-05-11-demo-seeder-persons (the persons follow-up
unlocked by the Keycloak fix).
2026-05-11 10:55:14 -05:00
dbde5bd59f Fix Keycloak test seed user-id pinning
POST /admin/realms/{realm}/users silently drops the `id` field on
Keycloak 26.x. Switch user creation in seed-keycloak.sh to
POST /admin/realms/{realm}/partialImport, which preserves the pinned
id (verified by round-trip). This restores deterministic UUIDs for
alice/bob/carlos/diana and unblocks downstream consumers that depend
on stable `sub` claims (FedWiki owner.json references, demo seeder
person rows).
2026-05-11 10:55:14 -05:00
eadcda30f9 Add Operator UX walkthrough for Claude Opus 4.7 2026-05-11 10:55:14 -05:00
1012a01028 Add Phase A operator UX walkthrough evidence
Deterministic capture of the operator panel: per-slug evidence
(screenshots, console/network dumps, a11y and tab-order data) stored
under docs/operator-ux-walkthrough-evidence. Add Phase A task briefing
and update status files to mark 7a progress and note downstream issues
2026-05-11 10:55:14 -05:00
ab766165a2 Add operator UX research and integrations 2026-05-11 10:55:14 -05:00
66d4c66a43 tokenmaxxing climate crisis accelerationism jestergooning LLM-pilled. 2026-05-07 02:30:48 -05:00
535810c2ef Seed FedWiki fixtures from Keycloak
Add a fedwiki-render compose service and render.sh to resolve real
Keycloak user UUIDs and render .tpl templates into testdata on compose
up.
Convert hardcoded FedWiki testdata into templates, add seed-stack.sh
helper,
and update compose/env and .gitignore to run seeding before starting
fedwiki.
2026-04-29 15:55:40 -05:00
66c8d84a2c worktree test stacks isolation. 2026-04-29 03:28:43 -05:00
043f4082dc Unify test startup, slug derivation, teardown
Use the unified ./cmd entrypoint in test docs and bootstrap scripts
instead of ./cmd/member-console. Add derive_slug to pick a more
informative SLUG for worktrees (prefer parent dir or branch when the
basename is "member-console"). Improve teardown to remove root-owned
test files via a short-lived docker container fallback.
2026-04-28 23:25:17 -05:00
a50084aee5 Add per-worktree test stack bootstrap and docs 2026-04-28 23:16:03 -05:00
95bb26d87b Add OPSX OpenSpec commands and skills 2026-04-28 03:10:30 -05:00
a0638e282e Add Operator UX Foundation milestone and docs. 2026-04-27 02:38:03 -05:00
690c70b113 Add cross-tab HTMX triggers and planLadderMutation
Signal dependent tabs to re-fetch when plan ladders change.
operator_plan_ladders handlers set HX-Trigger: planLadderMutation on
create/update/delete and tier operations so Org Types' plan dropdowns
refresh. operator.html adds explanatory comments and hx-trigger attrs
so Org Types, Grants, and Products panes listen for productMutation,
planLadderMutation, and entitlementMutation
2026-04-27 02:05:59 -05:00
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
7a7f5975eb Track grant lineage and add Extend transition
Introduce extends_grant_id on grants (models, CreateGrant param and
SQL), add
GetGrantLineage recursive query, and enforce same-org/immutability
guards via
migration triggers. Implement TransitionTarget.Extend with validation
and an
extend path that issues a chained grant + provision. Update docs, specs
and
tests accordingly.
2026-04-26 02:38:46 -05:00
beab142582 Mark entitlements package-boundary tasks complete 2026-04-25 03:46:22 -05:00
ba68b8e71b OpenSpec for plan-sole-writer-guards 2026-04-25 03:28:16 -05:00
8f6a93f74d Add operator enrollment UI and plan docs
Introduce operator enrollment partials and handlers that route plan-tier
granting and revocation through entitlements.Transition(). Add
member-facing
tier labels, plan architecture and grant-plan-safety documentation, plus
unit and e2e tests. Also add small querier helpers and wire Temporal
client
hooks for trial expiration scheduling.
2026-04-24 12:28:00 -05:00
720e546d16 Add operator plan ladder management UI and backend 2026-04-20 19:52:42 -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
0b57afb4ec Add plan management foundation design and specs 2026-04-19 14:10:37 -05:00
4893a2d556 Plan concept depth design update 1. 2026-04-19 02:43:30 -05:00
5424c6a75b Update design for plan management depth 2026-04-17 02:54:54 -05:00
24465c52a8 Fix margins inconsistency between pages. 2026-04-13 02:40:15 -05:00
cdd075dc0b fix meter in products page. 2026-04-13 02:36:02 -05:00
25a206e371 Fix operator panel tabs 2026-04-13 02:22:49 -05:00
89e97945c4 Clarify plan concept depth in milestones 2026-04-12 17:02:40 -05:00
bafa42b9a9 Use Product as Org Type Default 2026-04-12 16:56:25 -05:00
1a89bbd292 Products page done. 2026-04-11 20:40:36 -05:00
fe2767f5d1 Add OpenSpec for Member Products page 2026-04-11 19:49:12 -05:00
34388180ad Add deployment architecture doc and milestones 2026-04-11 04:23:42 -05:00
6f2788b9a0 Enable auto-provision of default entitlements. 2026-04-10 14:15:13 -05:00
479f44c5b4 Document FedWiki service tiers and status 2026-04-09 02:06:50 -05:00
ac83638852 Auto-provision default billing account 2026-04-07 08:14:35 -05:00
2ec770d011 Specify Stripe sync in price-management spec 2026-04-07 07:57:13 -05:00
9f719f263e Remove DB seed migrations for products and prices 2026-04-07 03:47:50 -05:00
64ced89432 Stripe Integration Price creation. 2026-04-07 03:24:12 -05:00
be91b73dbd Stripe Operator UI 2026-04-06 03:15:20 -05:00
786657eea3 Start Stripe workflows and handle webhooks
Expose /webhooks/stripe as a public path (signature-verified)

Verify webhook signatures with ConstructEventWithOptions and
IgnoreAPIVersionMismatch=true, and log API version mismatches.
Start two Temporal workflows: stripe-webhook-processor and
stripe-outbox-poller; workflow start failures are non-fatal.
2026-04-05 21:25:26 -05:00
1f1540d7e0 Use plain DB connection for migrations
Add ConnectPlain to open the DB without the custom search_path and
switch migration and CLI flows to run on that plain connection.
Wrap multi-statement goose migrations with StatementBegin/End to
ensure statements are executed atomically. Move Stripe price outbox
seeding into a dedicated stripe migration.
2026-04-05 18:25:05 -05:00
18a0969ad3 Stripe invoice payment projections. 2026-04-05 03:51:31 -05:00
82e1b2bd23 Close subscription creation spec workflow 2026-04-05 02:45:51 -05:00
f08357d6b5 Move comments from the copyable code blocks. 2026-04-05 02:39:22 -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