docs(18.1): record context amendments from research premise shifts
This commit is contained in:
@@ -56,6 +56,17 @@ Not in this phase: Quotify's lead fees and metered billing, featured placements
|
||||
- **Reversibility:** one-way — a published API that apps and the layer consume.
|
||||
- **D-14:** **`vue-paymentgateway-layer` (P18 D-06) gets the subscription pieces.** These are a typed subscriptions client plus components for a plans or pricing table, a my-subscription status, and checkout and portal redirects. They use the same distribution (a pnpm git dependency pinned to a tag), neutral CSS tokens and overridable components. There is no separate subscriptions layer repo.
|
||||
|
||||
### Amendments (2026-10-14, at the plan-count checkpoint after research)
|
||||
Research (`18.1-RESEARCH.md` § Premise Shifts S-1..S-10) found premises that no longer hold now that Phase 18 is built. The user decided:
|
||||
- **D-15 (amends D-01):** The Stripe plan sync is ported from pgstripe `d00f850` (in Horoskopia's HEAD `d54dcde`). Only `classes/StripeSubscriptionGateway.php` is read at `d00f850`; every other pgstripe file stays at `8b47457`. pgsub is read from the working tree (`a522376` = `ac3d73c` + `5fb9dac`). Both checkouts need `git -c safe.directory=*`.
|
||||
- **D-16 (amends D-04):** The baseline omits `golem15_pgsub_usage_records` and `golem15_pgsub_featured_placements` (they exist only where Quotify is installed and carry Quotify FKs; Quotify's port creates them). The baseline stays idempotent (`IF NOT EXISTS`) and is **import-compatible** (same table, column and index names, compatible types) rather than adopting a MariaDB DB in place; adoption goes through Phase 20's `summer import:winter` runner, and the pgsub import mapper is deferred to Phase 20 / the Horoskopia port.
|
||||
- **D-17 (framework plan):** The phase starts with a `summercms.go` plan that adds a flat (Sortable, non-tree) reorder and a core `taglist` form field to cabana (admin SPA, OpenAPI, committed `dist`, docs, framework tag at the phase gate as in P18). The SubscriptionPlans screens then port faithfully: a reorder page and `features` as `taglist` (`mode: array`).
|
||||
- **D-18 (S-4):** pgstripe settings gain separate `subscription_webhook_secret` / `test_subscription_webhook_secret` encrypted columns (additive). `pgstripe:import-winter` gets an explicit target flag for where the PHP `stripe.webhookSecret`/`testWebhookSecret` lands; P18's current default behaviour is unchanged. The README notes that on PHP one secret served both routes.
|
||||
- **D-19 (S-5):** The hard-coded `metadata.app = 'queststream'` becomes a config key on the Stripe subscriptions plugin, empty by default (write nothing, filter nothing). Horoskopia's cutover sets it to `queststream`. `billing_owner_id` is dropped from the generic gateway; apps add metadata through a checkout options map.
|
||||
- **D-20 (S-8, S-9):** The Stripe subscriptions subpackage is its own party plugin, `golem15.pgstripesubscriptions`, at module path `git.golem15.com/golem15/sm-pgstripe-plugin/subscriptions`. It gets its own importable or package-local Stripe fake; P18's root `stripefake_test.go` stays unchanged.
|
||||
- **D-21:** Behaviour defaults: keep PHP's `cancel_at_period_end` mapping (a manual test-mode check decides whether `cancel_at` from the billing portal also needs handling); out-of-order events behave as PHP does; the job reads both pre-basil and basil payload shapes; customer `GET /subscription` returns the latest subscription with `has_access` and `in_grace_period` flags.
|
||||
- **D-22 (plan split, 6 plans):** (1) framework: cabana flat reorder + `taglist`; (2) pgsub core tracer in the new repo (created with `tea repos create --owner golem15`); (3) pgstripe secret columns + import mapping + `subscriptions` plugin (gateway, both webhook routes, River job, host test); (4) pgsub admin screens + customer API; (5) `vue-paymentgateway-layer` pieces (tag `v0.2.0` only on go-ahead); (6) unit tests across all repos + `scripts/check-phase18.1.sh`. Plan 2's repo is committed before plan 3's `go.mod` points at it. No push, tag or deploy without the user's go-ahead.
|
||||
|
||||
### Claude's Discretion
|
||||
- Go package, type and identifier names (registry, `Subscribable`, gateway interface, event types, service API), provided D-06 to D-09 hold. A short package name such as `pgsub` is fine; the plugin ID and table prefix stay as in D-01 and D-04.
|
||||
- Typed festival event shapes for the six events (`golem15.pgsub.subscription.activated`, `.canceled`, `.past_due`, `.reactivated`, `golem15.pgsub.invoice.paid` and `.invoice.payment_failed`), keeping the PHP names as identifiers. Horoskopia listens to the four subscription events.
|
||||
|
||||
Reference in New Issue
Block a user