- 18.1-VALIDATION.md: every task of plans 01 to 06 with its command and the gate result; status validated, nyquist_compliant and wave_0_complete true - deferred-items.md: reorder.flat and the pnpm store watch resolved; the layer's check-git-install.sh stays open (no gate or release step runs it)
13 KiB
phase, slug, status, nyquist_compliant, wave_0_complete, created, validated
| phase | slug | status | nyquist_compliant | wave_0_complete | created | validated |
|---|---|---|---|---|---|---|
| 18.1 | payment-gateway-subscriptions | validated | true | true | 2026-10-14 | 2026-10-14 |
Phase 18.1 — Validation Strategy
Per-phase validation contract for feedback sampling during execution. Source:
18.1-RESEARCH.md§ Validation Architecture.
Test Infrastructure
| Property | Value |
|---|---|
| Framework | Go testing + testcontainers Postgres 16 (Docker tests skip under -short); admin: vitest; layer: node --test via pnpm test |
| Config file | per-repo testmain_test.go (flag.Parse() + testing.Short()): framework modules/cabana, sm-paymentgatewaysubscriptions-plugin (root), sm-pgstripe-plugin (root and subscriptions) |
| Quick run command | go -C ../sm-paymentgatewaysubscriptions-plugin vet ./... && go -C ../sm-paymentgatewaysubscriptions-plugin test -short ./... ; go -C ../sm-pgstripe-plugin vet ./... && go -C ../sm-pgstripe-plugin test -short ./... |
| Full suite command | go test ./... (Docker) in both plugin repos; pnpm -C ../vue-paymentgateway-layer test; go vet ./... && go test -short ./... in summercms.go |
| Phase gate | scripts/check-phase18.1.sh --all in summercms.go (stages go, plugins, admin, layers, docs, postgres; --self-test; PHASE181_REQUIRE_POSTGRES=1 makes a missing Docker daemon fatal) |
| Estimated runtime | quick ~30 s per repo; full gate ~10 min (containers, vitest, docs) |
Sampling Rate
- After every task commit: the
-shortquick run of the touched repo - After every plan wave: full suite of the touched repos (Docker)
- Before
/msd-verify-work:scripts/check-phase18.1.sh --allgreen - Max feedback latency: 60 seconds for the quick run
Per-Task Verification Map
Every task of plans 01 to 06, with the command that proves it (run from the summercms.go root; sibling repositories through go -C ../<repo> or pnpm --dir ../<repo>). Docker rows ran on a Docker host. "File exists" names the plan and task that created the test. Status is the result of the 18.1-06 gate run (PHASE181_REQUIRE_POSTGRES=1 bash scripts/check-phase18.1.sh --all) unless noted.
| Task | Req | Behaviour | Type | Automated command | File exists | Status |
|---|---|---|---|---|---|---|
| 18.1-01 T1 | D-17 | taglist array mode: compile gates, save to a JSON column, record GET, OpenAPI, dist, docs | unit + Docker | go test -count=1 -short -run '^TestTaglistFieldCompile$' ./modules/cabana; Docker: go test -count=1 -run '^TestTaglistFieldSmoke$' ./modules/cabana |
✅ (01 T1) | ✅ green |
| 18.1-01 T2 | D-17 | taglist string mode, customTags, relation and settings save sites, repeater refusal, preview | unit + Docker + vitest | go test -count=1 -short -run '^(TestTaglistFieldCompile|TestTaglistFieldValidate|TestTaglistFieldHydrate)$' ./modules/cabana && npm --prefix admin test -- tests/form/TaglistField.test.ts |
✅ (01 T2, 06 T2) | ✅ green |
| 18.1-01 T3 | D-17 | flat reorder inference, flat save, flat on the list schema (localized too) and the reorder data |
unit + Docker | go test -count=1 -short -run '^(TestReorderFlatCompile|TestReorderFlatNodes)$' ./modules/cabana; Docker: go test -count=1 -run '^(TestReorderFlatSmoke|TestReorderPostgres)$' ./modules/cabana |
✅ (01 T3, 06 T2) | ✅ green |
| 18.1-01 T4 | D-17 | flat reorder in the SPA, dist rebuilt | vitest + gate | npm --prefix admin test -- tests/views/ReorderView.test.ts && bash scripts/check-admin-dist.sh |
✅ (01 T4, 06 T2) | ✅ green |
| 18.1-01 T5 | D-22 | framework release decision (reply "hold") | checkpoint | n/a (decision; the final push is 18.1-06 T5) | n/a | ✅ recorded |
| 18.1-02 T1 | D-04, D-16 | baseline shape confirmed (reply "baseline-jsonb") | checkpoint | n/a | n/a | ✅ recorded |
| 18.1-02 T2 | SC-1, SC-2 | plugin boots, baseline migrates, Apply stores an active subscription and fires activated once |
Docker | go -C ../sm-paymentgatewaysubscriptions-plugin test -count=1 -run '^TestSubscriptionsTracer$' . |
✅ (02 T2) | ✅ green |
| 18.1-02 T3 | SC-1, D-08, D-09 | registries, Gateway contract, built-in user subscriber, checkout stores the customer id | unit + Docker | go -C ../sm-paymentgatewaysubscriptions-plugin test -count=1 -short -run '^TestRegistry$' ./contracts; Docker: go -C ../sm-paymentgatewaysubscriptions-plugin test -count=1 -run '^(TestSubscriptionsCheckout|TestUserSubscribable)$' . |
✅ (02 T3, 06 T3) | ✅ green |
| 18.1-02 T4 | SC-1, SC-2, SC-3, D-03, D-05, D-13 | model checks, features, event diff, invoices, claim, service API, baseline names | unit + Docker | go -C ../sm-paymentgatewaysubscriptions-plugin test -count=1 -short -run '^(TestSubscriptionChecks|TestPlanPrices|TestFeatureList)$' ./models; Docker: go -C ../sm-paymentgatewaysubscriptions-plugin test -count=1 -run '^(TestSubscriptionsCoreSmoke|TestPlanJSONBColumns|TestApplyEvents|TestClaimEventConcurrent|TestBaselineSchema|TestServiceAPI)$' . |
✅ (02 T4, 06 T3) | ✅ green |
| 18.1-02 T5 | D-22 | pgsub remote created and main pushed at aad4647 (reply "create-and-push") |
checkpoint | git -C ../sm-paymentgatewaysubscriptions-plugin ls-remote origin main |
n/a | ✅ recorded |
| 18.1-03 T1 | D-10, D-11, D-18 | webhook contract confirmed (reply "php-plain-text") | checkpoint | n/a | n/a | ✅ recorded |
| 18.1-03 T2 | SC-2, SC-4 | checkout through the Stripe fake, signed customer.subscription.created, claim-first job, activated |
Docker | go -C ../sm-pgstripe-plugin test -count=1 -run '^TestHostSubscriptionFlow$' ./subscriptions |
✅ (03 T2) | ✅ green |
| 18.1-03 T3 | SC-2, SC-4, D-11, D-12, D-15, D-19 | gateway, plan sync, five event types in both shapes, app tag, refusals, real worker | unit + Docker | go -C ../sm-pgstripe-plugin test -count=1 -short -run '^(TestDecodeSubscription|TestDecodeInvoice|TestJobArgsMinimal)$' ./subscriptions; Docker: go -C ../sm-pgstripe-plugin test -count=1 -run '^(TestHostSubscriptionFlow|TestSubscriptionWebhookSmoke|TestSubscriptionJob|TestSyncPlan|TestSubscriptionGateway)$' ./subscriptions |
✅ (03 T3, 06 T4) | ✅ green |
| 18.1-03 T4 | D-18 | subscription secret fields, import target flag, READMEs, settings and import smokes | unit + Docker | go -C ../sm-pgstripe-plugin test -count=1 -short -run '^(TestStripeDataHandling|TestSDKPin)$' .; Docker: go -C ../sm-pgstripe-plugin test -count=1 -run '^(TestStripeSettingsSmoke|TestStripeImportWinterSmoke|TestStripeSubscriptionSecrets|TestHostStripeFlow)$' . |
✅ (03 T4, 06 T4) | ✅ green |
| 18.1-04 T1 | SC-3, D-17 | plans admin with permissions, navigation and the taglist form | Docker | go -C ../sm-paymentgatewaysubscriptions-plugin test -count=1 -run '^TestAdminPlansSmoke$' . |
✅ (04 T1) | ✅ green |
| 18.1-04 T2 | SC-3, D-13, D-17 | flat plan reorder, bulk and toolbar sync with per-plan failures | Docker | go -C ../sm-paymentgatewaysubscriptions-plugin test -count=1 -run '^(TestAdminPlansSmoke|TestAdminSyncActions)$' . |
✅ (04 T2, 06 T3) | ✅ green |
| 18.1-04 T3 | SC-3, D-02, D-08 | subscriptions admin, label field types, EN/PL phrasebook | unit + Docker | go -C ../sm-paymentgatewaysubscriptions-plugin test -count=1 -short -run '^(TestAdminCatalog|TestAdminLangParity|TestLangParity)$' .; Docker: go -C ../sm-paymentgatewaysubscriptions-plugin test -count=1 -run '^TestAdminSubscriptionsSmoke$' . |
✅ (04 T3, 06 T3) | ✅ green |
| 18.1-04 T4 | D-13 | customer API contract confirmed (reply "api-research") | checkpoint | n/a | n/a | ✅ recorded |
| 18.1-04 T5 | SC-3, D-13, D-21 | customer API endpoints, redirects from config, authorization matrix | unit + Docker | go -C ../sm-paymentgatewaysubscriptions-plugin test -count=1 -short -run '^TestRedirectURLs$' .; Docker: go -C ../sm-paymentgatewaysubscriptions-plugin test -count=1 -run '^(TestCustomerAPISmoke|TestCustomerAPIAuthz)$' . |
✅ (04 T5, 06 T3) | ✅ green |
| 18.1-05 T1 | SC-3, D-14 | typed client, PgPlans, PgSubscribeButton with a one-time checkout redirect | node | pnpm --dir ../vue-paymentgateway-layer test (files tests/subscriptions.test.ts, tests/subscribe.test.ts) |
✅ (05 T1, 06 T2) | ✅ green |
| 18.1-05 T2 | SC-3, D-14, D-21 | PgMySubscription with cancel, PgManageSubscriptionButton, useSubscription, copy | node | pnpm --dir ../vue-paymentgateway-layer test (files tests/subscriptionComponents.test.ts, tests/i18n.test.ts) |
✅ (05 T2, 06 T2) | ✅ green |
| 18.1-05 T3 | D-22 | layer release decision (reply "hold") | checkpoint | n/a (the final push is 18.1-06 T5) | n/a | ✅ recorded |
| 18.1-06 T1 | SC-5 | fail-closed gate with detector self-test | gate | bash scripts/check-phase18.1.sh --self-test |
✅ (06 T1) | ✅ green |
| 18.1-06 T2 | SC-5, D-17, D-14 | framework and layer coverage; the reorder.flat defect fixed |
gate | bash scripts/check-phase18.1.sh go && bash scripts/check-phase18.1.sh admin && bash scripts/check-phase18.1.sh layers |
✅ (06 T2) | ✅ green |
| 18.1-06 T3 | SC-5, D-03 to D-16, D-21 | pgsub coverage | gate | bash scripts/check-phase18.1.sh plugins && bash scripts/check-phase18.1.sh postgres |
✅ (06 T3) | ✅ green |
| 18.1-06 T4 | SC-5, D-11, D-12, D-15, D-18, D-19 | pgstripe coverage and the PHP map | gate | PHASE181_REQUIRE_POSTGRES=1 bash scripts/check-phase18.1.sh --all |
✅ (06 T4) | ✅ green |
| 18.1-06 T5 | D-22 | final push and tag decision | checkpoint | n/a (awaiting the human reply) | n/a | ⬜ pending |
The success-criterion view (seeded by the planner) maps onto the rows above:
| Req | Behaviour | Proven by |
|---|---|---|
| SC-1 | baseline up/down, idempotent re-run, names equal the PHP v2.4.0 dump; users.stripe_customer_id only when missing; registries; user subscriber; status, grace, feature and renewal matrices |
TestBaselineSchema, TestSubscriptionsCoreSmoke, TestRegistry, TestUserSubscribable, TestSubscriptionChecks, TestPlanPrices, TestFeatureList |
| SC-2 | webhook answers and URLs; claim-first job (STRIPE-006/007), duplicate and concurrent; event matrix; plan sync | TestSubscriptionWebhookSmoke, TestSubscriptionJob, TestApplyEvents, TestClaimEventConcurrent, TestSyncPlan, TestSubscriptionGateway |
| SC-3 | admin screens and actions; customer API; layer client and components | TestAdminPlansSmoke, TestAdminSubscriptionsSmoke, TestAdminSyncActions, TestCustomerAPISmoke, TestCustomerAPIAuthz, the layer's subscriptions: specs |
| SC-4 | the proof host flow incl. a real conga worker | TestHostSubscriptionFlow |
| SC-5 | the PHP test map and the gate | TestStripeSubscriptionReliability, TestSubscriptionAuthentication, TestStripeSubscriptionSecrets, TestSDKPin; scripts/check-phase18.1.sh --all |
Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky
Wave 0 Requirements
sm-paymentgatewaysubscriptions-plugin/testmain_test.go+ harness (18.1-02)- Subscription-endpoint Stripe fake in
sm-pgstripe-plugin/subscriptions(18.1-03; price failure switch added in 18.1-06) - Webhook event-body builders for both API shapes (
subscriptions/eventbody_test.go, 18.1-03) scripts/check-phase18.1.sh(18.1-06)
Manual-Only Verifications
| Behavior | Requirement | Why Manual | Test Instructions |
|---|---|---|---|
Billing-portal cancellation arrives as cancel_at_period_end or cancel_at |
SC-2, D-21 | Depends on live Stripe portal behaviour on the account's API version | Stripe test mode + stripe listen forwarding to the subscriptions URL; cancel through the portal; inspect the delivered customer.subscription.updated |
| Real Stripe test-mode checkout end to end | SC-4 | The fake cannot prove Stripe's hosted checkout | Test-mode keys in settings, run checkout from the layer playground, confirm activation and the activated event |
| Admin screens and layer components in a real browser | SC-3, D-17 | vitest and SSR specs do not drive a browser | Try the taglist chips, the flat drag reorder, the sync toasts, the plans page, Checkout and portal redirects and the cancel dialog once |
Validation Sign-Off
- All tasks have
<automated>verify or Wave 0 dependencies - Sampling continuity: no 3 consecutive tasks without automated verify
- Wave 0 covers all MISSING references
- No watch-mode flags
- Feedback latency < 60s for the quick run
nyquist_compliant: trueset in frontmatter
Approval: validated 2026-10-14 by the 18.1-06 gate run (PHASE181_REQUIRE_POSTGRES=1 bash scripts/check-phase18.1.sh --all, postgres run on a Docker host)