Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Canonicalize self-hosted purchase handoff intent
rcourtman1bc08f3bc1b8
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex d8856df9d4..e077bff9e3 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -264,6 +264,11 @@ an add-only capacity posture.they must not strand install or fleet flows on a raw Pulse Account errortab, reinterpret `purchase=unavailable` as lifecycle repair state, orbypass the owned billing retry/recovery path.+ That same adjacent commercial/auth boundary also owns the canonical+ self-hosted purchase intent label: lifecycle-adjacent setup and install+ flows may observe `self_hosted_plan`, but they must not keep emitting or+ inferring legacy `max_monitored_systems` intent/query values once the+ uncapped self-hosted model is canonical.The same adjacentcommercial boundary now also owns migrated-v5 monitored-systemgrandfathering: lifecycle surfaces may react to the resulting license ordiff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 953914d205..951d908f39 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -778,6 +778,13 @@ browser to owned billing with `purchase=unavailable` so the runtime cansurface the failure in-product instead of leaving the operator on a rawservice error. When the upgrade flow was opened in a secondary tab,the callback may refresh the originating billing tab and close itself; when no+owned billing tab is present, the same contract still owns intent+normalization. Product-originated self-hosted purchase handoff must emit+`feature=self_hosted_plan` and `intent=self_hosted_plan` as the canonical+browser/runtime value. The older `max_monitored_systems` label may be accepted+only as a backward-compatible alias during request or callback normalization,+but Pulse and the license server must not emit it as the primary self-hosted+purchase intent once the uncapped self-hosted model is canonical.opener is available, the callback must still return the current tab to theowned billing route automatically instead of leaving the operator on a deadsuccess page.diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex fc6ff3b61e..4a47d5c11b 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -84,6 +84,12 @@ agreement, and cloud-specific enforcement rules.62. `frontend-modern/src/utils/selfHostedPlans.ts`63. `frontend-modern/src/utils/upgradePresentation.ts`64. `frontend-modern/src/components/Settings/selfHostedBillingPresentation.ts`+65. `pulse-pro:license-server/public_pricing.go`+66. `pulse-pro:license-server/v6_checkout.go`+67. `pulse-pro:landing-page/thanks.html`+68. `pulse-pro:scripts/grandfathered_recurring_cutover_preview.py`+69. `pulse-pro:scripts/validate_public_pricing_model.py`+70. `pulse-pro:V6_LAUNCH_CHECKLIST.md`## Shared Boundaries@@ -121,6 +127,12 @@ rolling trailing windows for "last 24 hours" and "previous 7 days" semanticsrather than UTC calendar-day buckets, so midnight does not suppress activecheckout regressions or leave the admin summary without the alert state theserver already observed.+That same public-pricing boundary also owns the machine-readable v6 pricing+validator and launch checklist in `pulse-pro:scripts/validate_public_pricing_model.py`+and `pulse-pro:V6_LAUNCH_CHECKLIST.md`. Those operator surfaces must describe+self-hosted Pulse as uncapped core monitoring, must not reintroduce monitored-system+upsell language, and must verify the no-cap release posture rather than legacy+Community limit enforcement.## Extension Pointsdiff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 59498ec01f..215a8ad632 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -294,6 +294,12 @@ querying, and the operator-facing storage health presentation layer.callbacks, owned billing purchase-arrival states, or demo-hiddencommercial route policy as recovery identity, restore proof, previewframing, or backup/recovery-local transport. That same adjacent commercial+ boundary also owns the canonical self-hosted purchase intent label:+ storage- and recovery-adjacent surfaces may observe `self_hosted_plan`, but+ they must not emit or reinterpret legacy `max_monitored_systems` intent or+ query state as a recovery-local contract once uncapped self-hosted+ monitoring is canonical.+ That same adjacent commercialboundary now also owns migrated-v5 monitored-system grandfathering:storage and recovery may read the resulting entitlement limits as context,but they must not infer a second capacity floor from protected inventory,diff --git a/internal/api/contract_test.go b/internal/api/contract_test.goindex 2a2cff51f0..7b0e6faeed 100644--- a/internal/api/contract_test.go+++ b/internal/api/contract_test.go@@ -6547,8 +6547,8 @@ func TestContract_SelfHostedPurchaseHandoffJSONSnapshot(t *testing.T) {if err != nil {t.Fatalf("verifyPurchaseReturnTokenFromLicensing: %v", err)}- if claims.Feature != "max_monitored_systems" {- t.Fatalf("claims.Feature=%q, want max_monitored_systems", claims.Feature)+ if claims.Feature != "self_hosted_plan" {+ t.Fatalf("claims.Feature=%q, want self_hosted_plan", claims.Feature)}if claims.OrgID != "default" {t.Fatalf("claims.OrgID=%q, want default", claims.OrgID)@@ -6582,10 +6582,10 @@ func TestContract_SelfHostedPurchaseHandoffJSONSnapshot(t *testing.T) {const want = `{"portal_utm_content":"legacy-bookmark","portal_handoff_id":"cph_placeholder",- "intent_feature":"max_monitored_systems",+ "intent_feature":"self_hosted_plan","purchase_return_jti":"placeholder","success_url_template":"https://pulse.example.com/auth/license-purchase-activate?purchase_return_token=placeholder\u0026session_id=%7BCHECKOUT_SESSION_ID%7D",- "cancel_url":"https://pulse.example.com/settings/system/billing/plan?intent=max_monitored_systems\u0026purchase=cancelled"+ "cancel_url":"https://pulse.example.com/settings/system/billing/plan?intent=self_hosted_plan\u0026purchase=cancelled"}`assertJSONSnapshot(t, got, want)@@ -6622,7 +6622,7 @@ func TestContract_SelfHostedPurchaseHandoffUnavailableJSONSnapshot(t *testing.T)StatusCode: rec.Code,TitlePresent: strings.Contains(rec.Body.String(), "Pulse Account unavailable"),RetryMessagePresent: strings.Contains(rec.Body.String(), "Retry from this instance in a moment"),- OwnedRedirectPath: strings.Contains(rec.Body.String(), "/settings/system/billing/plan?intent=max_monitored_systems&purchase=unavailable"),+ OwnedRedirectPath: strings.Contains(rec.Body.String(), "/settings/system/billing/plan?intent=self_hosted_plan&purchase=unavailable"),}, "", "\t")if err != nil {t.Fatalf("marshal unavailable handoff snapshot: %v", err)diff --git a/internal/api/license_handlers_test.go b/internal/api/license_handlers_test.goindex b8584005f4..3039b14010 100644--- a/internal/api/license_handlers_test.go+++ b/internal/api/license_handlers_test.go@@ -872,7 +872,7 @@ func TestHandleCheckoutActivation_GETRendersAutoSubmitBridge(t *testing.T) {if !strings.Contains(body, `name="portal_handoff_id" value="cph_success"`) {t.Fatalf("body = %q, want portal_handoff_id hidden field", body)}- if !strings.Contains(body, `name="feature" value="max_monitored_systems"`) {+ if !strings.Contains(body, `name="feature" value="self_hosted_plan"`) {t.Fatalf("body = %q, want feature hidden field derived from claims", body)}if !strings.Contains(body, "form.submit()") {@@ -956,7 +956,7 @@ func TestHandleCheckoutActivation_RedeemsCompletedCheckoutAndWritesSuccessBridgeif !strings.Contains(rec.Body.String(), "window.close()") {t.Fatalf("body = %q, want popup close bridge", rec.Body.String())}- if !strings.Contains(rec.Body.String(), "/settings/system/billing/plan?intent=max_monitored_systems&purchase=activated") {+ if !strings.Contains(rec.Body.String(), "/settings/system/billing/plan?intent=self_hosted_plan&purchase=activated") {t.Fatalf("body = %q, want monitored-system billing route", rec.Body.String())}if !handler.Service(context.Background()).IsActivated() {diff --git a/internal/api/licensing_handlers.go b/internal/api/licensing_handlers.goindex e86b21e469..68048d8c51 100644--- a/internal/api/licensing_handlers.go+++ b/internal/api/licensing_handlers.go@@ -375,12 +375,23 @@ func licensePurchaseActivationTemplateURL(returnURL, returnToken string) (stringreturn parsed.String(), nil}+func normalizeSelfHostedPurchaseFeature(feature string) string {+ switch strings.TrimSpace(feature) {+ case "":+ return ""+ case "max_monitored_systems", "self_hosted_plan":+ return "self_hosted_plan"+ default:+ return strings.TrimSpace(feature)+ }+}+func licensePurchaseActivationRedirectPath(feature, purchaseResult string) string {- normalizedFeature := strings.TrimSpace(feature)+ normalizedFeature := normalizeSelfHostedPurchaseFeature(feature)query := url.Values{}switch normalizedFeature {- case "max_monitored_systems":- query.Set("intent", "max_monitored_systems")+ case "self_hosted_plan":+ query.Set("intent", "self_hosted_plan")}switch strings.TrimSpace(purchaseResult) {case selfHostedBillingPurchaseActivated,@@ -1515,7 +1526,9 @@ func (h *LicenseHandlers) HandleCheckoutStart(w http.ResponseWriter, r *http.Reqreturn}- feature := strings.TrimSpace(r.URL.Query().Get(pulseAccountPortalFeatureQueryParam))+ feature := normalizeSelfHostedPurchaseFeature(+ r.URL.Query().Get(pulseAccountPortalFeatureQueryParam),+ )writeUnavailable := func(statusCode int, message string) {writeLicensePurchaseStartFailurePage(w, statusCode, feature, message)}@@ -1650,7 +1663,7 @@ func (h *LicenseHandlers) HandleCheckoutActivation(w http.ResponseWriter, r *httif r.Method == http.MethodGet {sessionID := strings.TrimSpace(r.URL.Query().Get(licensePurchaseSessionIDField))portalHandoffID := strings.TrimSpace(r.URL.Query().Get(pulseAccountPortalHandoffIDField))- feature := strings.TrimSpace(r.URL.Query().Get("feature"))+ feature := normalizeSelfHostedPurchaseFeature(r.URL.Query().Get("feature"))returnToken := strings.TrimSpace(r.URL.Query().Get(licensePurchaseReturnTokenField))if returnToken == "" || sessionID == "" {writeLicensePurchaseActivationFailurePage(w, http.StatusBadRequest, feature, selfHostedBillingPurchaseExpired, "Purchase activation link expired or is missing required state. Reopen the upgrade flow from Pulse Pro billing.")@@ -1663,7 +1676,7 @@ func (h *LicenseHandlers) HandleCheckoutActivation(w http.ResponseWriter, r *httreturn}if claims != nil && strings.TrimSpace(claims.Feature) != "" {- feature = strings.TrimSpace(claims.Feature)+ feature = normalizeSelfHostedPurchaseFeature(claims.Feature)}writeLicensePurchaseActivationContinuePage(w, sessionID, portalHandoffID, feature, returnToken)return@@ -1679,7 +1692,7 @@ func (h *LicenseHandlers) HandleCheckoutActivation(w http.ResponseWriter, r *httsessionID := strings.TrimSpace(r.FormValue(licensePurchaseSessionIDField))portalHandoffID := strings.TrimSpace(r.FormValue(pulseAccountPortalHandoffIDField))- feature := strings.TrimSpace(r.FormValue("feature"))+ feature := normalizeSelfHostedPurchaseFeature(r.FormValue("feature"))returnToken := strings.TrimSpace(r.FormValue(licensePurchaseReturnTokenField))if returnToken == "" {writeLicensePurchaseActivationFailurePage(w, http.StatusBadRequest, feature, selfHostedBillingPurchaseExpired, "Purchase activation link expired or is missing required state. Reopen the upgrade flow from Pulse Pro billing.")@@ -1693,11 +1706,12 @@ func (h *LicenseHandlers) HandleCheckoutActivation(w http.ResponseWriter, r *httreturn}if claims != nil && strings.TrimSpace(claims.Feature) != "" {- if feature != "" && feature != strings.TrimSpace(claims.Feature) {- writeLicensePurchaseActivationFailurePage(w, http.StatusBadRequest, strings.TrimSpace(claims.Feature), selfHostedBillingPurchaseExpired, "Purchase activation state did not match the completed upgrade flow.")+ normalizedClaimsFeature := normalizeSelfHostedPurchaseFeature(claims.Feature)+ if feature != "" && feature != normalizedClaimsFeature {+ writeLicensePurchaseActivationFailurePage(w, http.StatusBadRequest, normalizedClaimsFeature, selfHostedBillingPurchaseExpired, "Purchase activation state did not match the completed upgrade flow.")return}- feature = strings.TrimSpace(claims.Feature)+ feature = normalizedClaimsFeature}if sessionID == "" {writeLicensePurchaseActivationFailurePage(w, http.StatusBadRequest, feature, selfHostedBillingPurchaseFailed, "Purchase activation requires a completed checkout session.")diff --git a/internal/api/licensing_handlers_self_hosted_fallback_test.go b/internal/api/licensing_handlers_self_hosted_fallback_test.goindex 049a07f73d..42d8ac0865 100644--- a/internal/api/licensing_handlers_self_hosted_fallback_test.go+++ b/internal/api/licensing_handlers_self_hosted_fallback_test.go@@ -47,7 +47,7 @@ func TestHandleCheckoutStart_ReopensOwnedBillingWhenPulseAccountHandoffIsUnavailif !strings.Contains(body, "window.close()") {t.Fatalf("body = %q, want popup close bridge", body)}- if !strings.Contains(body, "/settings/system/billing/plan?intent=max_monitored_systems&purchase=unavailable") {+ if !strings.Contains(body, "/settings/system/billing/plan?intent=self_hosted_plan&purchase=unavailable") {t.Fatalf("body = %q, want owned billing unavailable route", body)}}