Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

Warn paid users on missing Pro runtime

rcourtmanc9198dd54b26
diff --git a/docs/release-control/v6/internal/records/paid-runtime-build-attribution-alerting-2026-05-07.md b/docs/release-control/v6/internal/records/paid-runtime-build-attribution-alerting-2026-05-07.md
index ef02976223..faa5b0c084 100644
--- a/docs/release-control/v6/internal/records/paid-runtime-build-attribution-alerting-2026-05-07.md
+++ b/docs/release-control/v6/internal/records/paid-runtime-build-attribution-alerting-2026-05-07.md
@@ -48,6 +48,50 @@ continue running the community build with a valid paid key.
runtime and the public community runtime negative case.
- Alerting is rate-limited or delayed enough to avoid noisy false positives.
+## Implementation Slice - 2026-05-07
+
+The first product and support guardrail slice now exists:
+
+- active paid self-hosted plans treat any non-Pro or missing runtime identity as
+ a private-runtime mismatch;
+- the Plans surface renders `Pro runtime missing` plus the private Pulse Pro
+ download handoff when a paid install reports community runtime or no runtime;
+- activation-success and value-proof copy use the same runtime identity check,
+ so a freshly accepted paid key cannot present as fully healthy without the
+ private runtime;
+- license-server installation responses preserve raw `runtime_build` and add
+ normalized `runtime_status` values: `pro`, `community`, or `unknown`;
+- admin/customer support JSON and the admin UI expose runtime status per
+ installation, plus a per-license runtime-status rollup for support triage.
+
+Local proof added:
+
+- `go test ./internal/api -run 'TestHandleRuntimeCapabilities_CommunityRuntimeBlocksPrivateProCapabilities|TestHandleRuntimeCapabilities_ProRuntimePreservesPrivateProCapabilities'`
+- `go test ./...` from `repos/pulse-pro/license-server`
+- `npm test -- --run src/utils/__tests__/licensePresentation.test.ts src/components/Settings/__tests__/ProLicensePanel.test.tsx`
+- `npm run type-check` from `repos/pulse/frontend-modern`
+- `PULSE_BASE_URL=http://127.0.0.1:5173 npx playwright test tests/59-self-hosted-plans-entitlement-summary.spec.ts --project=chromium` from `repos/pulse/tests/integration`
+
+The Playwright proof exercises the real hot-dev browser surface with a paid Pro
+payload that reports the Pro runtime and a negative paid Pro payload with the
+runtime identity omitted.
+
+## Remaining Proof Before Passing
+
+The release gate remains pending until the negative path is exercised against a
+managed runtime rather than only a browser-stubbed paid payload. The remaining
+proof should run a valid paid activation against the public community runtime
+and confirm:
+
+- Pulse reports `runtime.build=community` in local entitlement/runtime payloads;
+- Pro-only runtime capabilities are blocked with `paid_runtime_required`;
+- Plans displays the private-runtime warning and download handoff;
+- license-server support/admin telemetry records `runtime_status=community`;
+- the private Pulse Pro runtime path still reports `runtime_status=pro`.
+
+Direct Linux/LXC coverage should use the same contract with the private archive
+and public community archive before this gate is marked `passed`.
+
## Result
This record creates a new release-ready gate. It should remain pending until the
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.md
index aa450a94b2..c40d85d4b3 100644
--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md
+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md
@@ -125,6 +125,14 @@ cloud-specific enforcement rules.
values on activate, legacy exchange, and grant refresh instead of inferring
install version or paid-runtime status from browser state, dev build
metadata, public image tags, or anonymous telemetry.
+ Active self-hosted paid entitlements must also treat runtime identity as a
+ first-class product state. A paid Pro, Pro Annual, Pro+, lifetime, or
+ enterprise entitlement on a non-Pro or missing runtime identity must render
+ the private Pulse Pro runtime handoff in the local Plans surface rather than
+ presenting as fully healthy. License-server support/admin payloads must
+ preserve the raw runtime build and expose a normalized `pro`, `community`,
+ or `unknown` status so paid-runtime support triage does not depend on
+ interpreting Docker tags, public release names, or customer screenshots.
5. `internal/api/payments_webhook_handlers.go` shared with `api-contracts`: commercial payment webhook handlers carry both API payload contract and cloud-paid billing boundary ownership.
6. `internal/api/public_signup_handlers.go` shared with `api-contracts`: hosted signup handlers carry both API payload contract and cloud-paid hosted provisioning boundary ownership.
That shared monitored-system presentation boundary also owns disabled
diff --git a/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx
index cc6c491678..8aeaf33c19 100644
--- a/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx
@@ -28,6 +28,12 @@ import {
let mockEntitlements: LicenseEntitlements | null = null;
+const PRO_RUNTIME_IDENTITY = {
+ build: 'pro',
+ label: 'Pulse Pro runtime',
+ download_url: 'https://pulserelay.pro/download.html',
+};
+
const loadRuntimeLicenseStatusMock = vi.fn();
const loadCommercialPostureMock = vi.fn();
const loadLicenseEntitlementsMock = vi.fn();
@@ -326,6 +332,7 @@ describe('ProLicensePanel', () => {
licensed_email: '[email protected]',
is_lifetime: false,
trial_eligible: false,
+ runtime: PRO_RUNTIME_IDENTITY,
};
renderPanel();
@@ -360,6 +367,7 @@ describe('ProLicensePanel', () => {
licensed_email: '[email protected]',
is_lifetime: true,
trial_eligible: false,
+ runtime: PRO_RUNTIME_IDENTITY,
};
renderPanel();
@@ -412,6 +420,7 @@ describe('ProLicensePanel', () => {
licensed_email: '[email protected]',
is_lifetime: false,
trial_eligible: false,
+ runtime: PRO_RUNTIME_IDENTITY,
};
renderPanel();
@@ -475,6 +484,7 @@ describe('ProLicensePanel', () => {
licensed_email: '[email protected]',
max_history_days: 90,
trial_eligible: false,
+ runtime: PRO_RUNTIME_IDENTITY,
};
renderPanel();
@@ -569,6 +579,7 @@ describe('ProLicensePanel', () => {
plan_version: 'legacy_migration_fallback',
licensed_email: '[email protected]',
trial_eligible: false,
+ runtime: PRO_RUNTIME_IDENTITY,
};
renderPanel();
@@ -611,6 +622,7 @@ describe('ProLicensePanel', () => {
plan_version: 'legacy_migration_fallback',
licensed_email: '[email protected]',
trial_eligible: false,
+ runtime: PRO_RUNTIME_IDENTITY,
};
renderPanel();
@@ -654,6 +666,7 @@ describe('ProLicensePanel', () => {
plan_version: 'legacy_migration_fallback',
licensed_email: '[email protected]',
trial_eligible: false,
+ runtime: PRO_RUNTIME_IDENTITY,
};
renderPanel();
@@ -710,6 +723,7 @@ describe('ProLicensePanel', () => {
subscription_state: 'active',
upgrade_reasons: [],
tier: 'enterprise',
+ runtime: PRO_RUNTIME_IDENTITY,
};
renderPanel();
@@ -810,6 +824,7 @@ describe('ProLicensePanel', () => {
tier: 'pro',
licensed_email: '[email protected]',
trial_eligible: false,
+ runtime: PRO_RUNTIME_IDENTITY,
};
}
useLocationMock.mockReturnValue({
@@ -853,6 +868,7 @@ describe('ProLicensePanel', () => {
tier: 'pro',
licensed_email: '[email protected]',
trial_eligible: false,
+ runtime: PRO_RUNTIME_IDENTITY,
};
useLocationMock.mockReturnValue({
search: `?purchase=${SELF_HOSTED_PRO_BILLING_PURCHASE_ACTIVATED}&intent=${SELF_HOSTED_PRO_BILLING_PLAN_SELECTION_INTENT}`,
@@ -895,6 +911,7 @@ describe('ProLicensePanel', () => {
plan_version: 'legacy_migration_fallback',
licensed_email: '[email protected]',
trial_eligible: false,
+ runtime: PRO_RUNTIME_IDENTITY,
};
useLocationMock.mockReturnValue({
search: '?details=counting-rules',
@@ -986,6 +1003,7 @@ describe('ProLicensePanel', () => {
plan_version: 'legacy_migration_fallback',
licensed_email: '[email protected]',
trial_eligible: false,
+ runtime: PRO_RUNTIME_IDENTITY,
};
useLocationMock.mockReturnValue({
search: '',
diff --git a/frontend-modern/src/utils/__tests__/licensePresentation.test.ts b/frontend-modern/src/utils/__tests__/licensePresentation.test.ts
index 53ba6b6c02..e528261e1d 100644
--- a/frontend-modern/src/utils/__tests__/licensePresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/licensePresentation.test.ts
@@ -249,6 +249,7 @@ describe('licensePresentation', () => {
capabilities: ['relay', 'ai_autofix'],
limits: [{ key: 'max_monitored_systems', limit: 10, current: 23, state: 'enforced' }],
upgrade_reasons: [],
+ runtime: { build: 'pro', label: 'Pulse Pro runtime' },
},
displayableCapabilities: ['Pulse Relay (Remote Access)', 'Safe Remediation Workflows'],
}),
@@ -267,6 +268,7 @@ describe('licensePresentation', () => {
capabilities: ['relay', 'mobile_app', 'ai_autofix'],
limits: [],
upgrade_reasons: [],
+ runtime: { build: 'pro', label: 'Pulse Pro runtime' },
},
displayableCapabilities: [
'Pulse Relay (Remote Access)',
@@ -302,6 +304,7 @@ describe('licensePresentation', () => {
capabilities: ['relay', 'ai_autofix'],
limits: [],
upgrade_reasons: [],
+ runtime: { build: 'pro', label: 'Pulse Pro runtime' },
},
displayableCapabilities: ['Pulse Relay (Remote Access)', 'Safe Remediation Workflows'],
}),
@@ -325,6 +328,7 @@ describe('licensePresentation', () => {
capabilities: ['relay'],
limits: [],
upgrade_reasons: [],
+ runtime: { build: 'pro', label: 'Pulse Pro runtime' },
},
displayableCapabilities: ['Pulse Relay (Remote Access)'],
}),
@@ -401,6 +405,53 @@ describe('licensePresentation', () => {
});
});
+ it('surfaces active Pro licenses when runtime identity is missing', () => {
+ const entitlements = {
+ tier: 'pro',
+ subscription_state: 'active',
+ capabilities: ['relay', 'audit_logging', 'rbac', 'ai_autofix'],
+ limits: [],
+ upgrade_reasons: [],
+ max_history_days: 90,
+ };
+
+ expect(hasPulseProRuntimeMismatch(entitlements)).toBe(true);
+ expect(
+ getSelfHostedCurrentPlanPresentation({
+ entitlements,
+ displayableCapabilities: ['Pulse Relay (Remote Access)', 'Audit Logging'],
+ }),
+ ).toMatchObject({
+ title: 'Current plan: Pulse Pro',
+ body: expect.stringContaining('not reporting the private Pulse Pro runtime'),
+ supplementalBadges: ['Pro runtime missing'],
+ privateRuntimeAction: {
+ actionLabel: 'Open Pulse Pro downloads',
+ actionUrl: 'https://pulserelay.pro/download.html',
+ },
+ });
+ expect(getSelfHostedActivationProofPresentation(entitlements)?.items[0]).toMatchObject({
+ label: 'Pulse Pro runtime',
+ statusLabel: 'Needs attention',
+ state: 'missing',
+ detail: expect.stringContaining('not reporting a Pulse Pro runtime identity'),
+ });
+ expect(
+ getSelfHostedActivationSuccessPresentation({
+ entitlements,
+ displayableCapabilities: ['Pulse Relay (Remote Access)', 'Audit Logging'],
+ source: 'manual',
+ }),
+ ).toMatchObject({
+ title: 'Pulse Pro license is active',
+ tone: expect.stringContaining('amber'),
+ body: expect.stringContaining('not reporting the private Pulse Pro runtime'),
+ highlightsLabel: 'Licensed capabilities',
+ actionLabel: 'Open Pulse Pro downloads',
+ actionUrl: 'https://pulserelay.pro/download.html',
+ });
+ });
+
it('sources active self-hosted current-plan summaries from the shared plan contract', () => {
expect(
getSelfHostedCurrentPlanPresentation({
@@ -427,6 +478,7 @@ describe('licensePresentation', () => {
capabilities: ['relay', 'ai_autofix'],
limits: [],
upgrade_reasons: [],
+ runtime: { build: 'pro', label: 'Pulse Pro runtime' },
},
displayableCapabilities: ['Pulse Relay (Remote Access)', 'Safe Remediation Workflows'],
}).body,
@@ -563,10 +615,12 @@ describe('licensePresentation', () => {
limits: [],
upgrade_reasons: [],
max_history_days: 90,
+ runtime: { build: 'pro', label: 'Pulse Pro runtime' },
}),
).toMatchObject({
title: 'Pulse Pro value proof',
items: [
+ { label: 'Pulse Pro runtime', statusLabel: 'Active' },
{ label: 'Remote access, pairing, and push', statusLabel: 'Active' },
{ label: '90-day metric history', statusLabel: 'Active' },
{ label: 'Root-cause analysis and remediation', statusLabel: 'Active' },
@@ -582,8 +636,10 @@ describe('licensePresentation', () => {
limits: [],
upgrade_reasons: [],
max_history_days: 14,
+ runtime: { build: 'pro', label: 'Pulse Pro runtime' },
})?.items.map((item) => [item.label, item.statusLabel]),
).toEqual([
+ ['Pulse Pro runtime', 'Active'],
['Remote access, pairing, and push', 'Partial'],
['90-day metric history', 'Partial'],
['Root-cause analysis and remediation', 'Partial'],
@@ -610,6 +666,7 @@ describe('licensePresentation', () => {
capabilities: ['relay', 'mobile_app', 'push_notifications', 'ai_autofix'],
limits: [],
upgrade_reasons: [],
+ runtime: { build: 'pro', label: 'Pulse Pro runtime' },
},
displayableCapabilities: [
'Pulse Relay (Remote Access)',
diff --git a/frontend-modern/src/utils/licensePresentation.ts b/frontend-modern/src/utils/licensePresentation.ts
index e573a54f7d..ce31f00526 100644
--- a/frontend-modern/src/utils/licensePresentation.ts
+++ b/frontend-modern/src/utils/licensePresentation.ts
@@ -192,16 +192,33 @@ export const hasPulseProRuntime = (
entitlements?: Pick<LicenseCommercialEntitlements, 'runtime'> | null,
): boolean => (entitlements?.runtime?.build || '').trim().toLowerCase() === 'pro';
+const getPulseProRuntimeBuild = (
+ entitlements?: Pick<LicenseCommercialEntitlements, 'runtime'> | null,
+): string => (entitlements?.runtime?.build || '').trim().toLowerCase();
+
export const hasPulseProRuntimeMismatch = (
entitlements?: Pick<
LicenseCommercialEntitlements,
'hosted_mode' | 'runtime' | 'subscription_state' | 'tier'
> | null,
): boolean => {
- const runtimeBuild = (entitlements?.runtime?.build || '').trim().toLowerCase();
- return requiresPulseProRuntime(entitlements) && runtimeBuild !== '' && runtimeBuild !== 'pro';
+ return requiresPulseProRuntime(entitlements) && getPulseProRuntimeBuild(entitlements) !== 'pro';
};
+const getPulseProRuntimeMismatchSummary = (
+ entitlements?: Pick<LicenseCommercialEntitlements, 'runtime'> | null,
+): string =>
+ getPulseProRuntimeBuild(entitlements) === 'community'
+ ? 'running the community runtime'
+ : 'not reporting the private Pulse Pro runtime';
+
+const getPulseProRuntimeMismatchDetail = (
+ entitlements?: Pick<LicenseCommercialEntitlements, 'runtime'> | null,
+): string =>
+ getPulseProRuntimeBuild(entitlements) === 'community'
+ ? `This install reports the community runtime. Open ${PULSE_PRO_DOWNLOAD_URL} with your activation key and install the private Pulse Pro runtime; public GitHub releases and the public Docker image do not include Pro-only runtime hooks.`
+ : `This install is not reporting a Pulse Pro runtime identity. Open ${PULSE_PRO_DOWNLOAD_URL} with your activation key and install the private Pulse Pro runtime; public GitHub releases and the public Docker image do not include Pro-only runtime hooks.`;
+
export const getLicenseTierLabel = (tier?: string | null): string => {
const normalized = (tier || '').trim().toLowerCase();
if (!normalized) return 'Unknown';
@@ -453,7 +470,7 @@ export const getSelfHostedCurrentPlanPresentation = ({
return {
title: `Current plan: ${planLabel} Trial`,
body: runtimeMismatch
- ? `${planLabel} trial entitlement is active, but this install is running the community runtime. Open Pulse Pro downloads with your activation key and install the private Pulse Pro runtime to use Pro-only features.`
+ ? `${planLabel} trial entitlement is active, but this install is ${getPulseProRuntimeMismatchSummary(current)}. Open Pulse Pro downloads with your activation key and install the private Pulse Pro runtime to use Pro-only features.`
: unlockedFeatures.length > 0
? `${planLabel} trial capabilities are active on this instance right now.`
: `${planLabel} trial entitlement is being confirmed for this instance.`,
@@ -496,7 +513,7 @@ export const getSelfHostedCurrentPlanPresentation = ({
);
return {
title: `Current plan: ${planLabel}`,
- body: `${planLabel} is active, but this install is running the community runtime. Open Pulse Pro downloads with your activation key and install the private Pulse Pro runtime to use Pro-only features such as Audit Log, Audit Webhooks, RBAC, and governed remediation.`,
+ body: `${planLabel} is active, but this install is ${getPulseProRuntimeMismatchSummary(current)}. Open Pulse Pro downloads with your activation key and install the private Pulse Pro runtime to use Pro-only features such as Audit Log, Audit Webhooks, RBAC, and governed remediation.`,
unlockedFeaturesLabel,
unlockedFeatures,
includedExtrasLabel: includedExtras.length > 0 ? 'Included extras' : undefined,
@@ -603,7 +620,7 @@ export const getSelfHostedActivationProofPresentation = (
(entitlements.capabilities || []).map((capability) => capability.trim().toLowerCase()),
);
const items: SelfHostedActivationProofItem[] = [];
- if (requiresPulseProRuntime(entitlements) && entitlements.runtime?.build) {
+ if (requiresPulseProRuntime(entitlements)) {
const hasProRuntime = hasPulseProRuntime(entitlements);
items.push({
label: 'Pulse Pro runtime',
@@ -611,7 +628,7 @@ export const getSelfHostedActivationProofPresentation = (
statusLabel: hasProRuntime ? 'Active' : 'Needs attention',
detail: hasProRuntime
? 'This install reports the private Pulse Pro runtime.'
- : `This install reports the community runtime. Open ${PULSE_PRO_DOWNLOAD_URL} with your activation key and install the private Pulse Pro runtime; public GitHub releases and the public Docker image do not include Pro-only runtime hooks.`,
+ : getPulseProRuntimeMismatchDetail(entitlements),
});
}
items.push(
@@ -721,10 +738,10 @@ export const getSelfHostedActivationSuccessPresentation = ({
body:
source === 'purchase'
? runtimeMismatch
- ? `Checkout completed and the license is active. This install is still running the community runtime, so open Pulse Pro downloads with your activation key and install the private Pulse Pro runtime before using Pro-only features.`
+ ? `Checkout completed and the license is active. This install is ${getPulseProRuntimeMismatchSummary(current)}, so open Pulse Pro downloads with your activation key and install the private Pulse Pro runtime before using Pro-only features.`
: `Checkout completed and this instance is now running ${planLabel}.`
: runtimeMismatch
- ? `The activation key was accepted. This install is still running the community runtime, so open Pulse Pro downloads with your activation key and install the private Pulse Pro runtime before using Pro-only features.`
+ ? `The activation key was accepted. This install is ${getPulseProRuntimeMismatchSummary(current)}, so open Pulse Pro downloads with your activation key and install the private Pulse Pro runtime before using Pro-only features.`
: `The activation key was accepted and this instance is now running ${planLabel}.`,
highlightsLabel: runtimeMismatch ? 'Licensed capabilities' : 'Available now on this instance',
highlights,
diff --git a/internal/api/entitlement_handlers_test.go b/internal/api/entitlement_handlers_test.go
index d5f65c9eb6..8f3fe3ad2f 100644
--- a/internal/api/entitlement_handlers_test.go
+++ b/internal/api/entitlement_handlers_test.go
@@ -629,6 +629,9 @@ func TestHandleRuntimeCapabilities_CommunityRuntimeBlocksPrivateProCapabilities(
if err := json.Unmarshal(entitlementRec.Body.Bytes(), &entitlementPayload); err != nil {
t.Fatalf("unmarshal entitlement payload failed: %v", err)
}
+ if entitlementPayload.Runtime == nil || entitlementPayload.Runtime.Build != pkglicensing.RuntimeBuildCommunity {
+ t.Fatalf("entitlement runtime identity=%+v, want community", entitlementPayload.Runtime)
+ }
for _, feature := range []string{license.FeatureAuditLogging, license.FeatureRBAC, license.FeatureAIAutoFix} {
if !containsCapability(entitlementPayload.Capabilities, feature) {
t.Fatalf("entitlements lost licensed feature %q: %v", feature, entitlementPayload.Capabilities)
diff --git a/tests/integration/tests/59-self-hosted-plans-entitlement-summary.spec.ts b/tests/integration/tests/59-self-hosted-plans-entitlement-summary.spec.ts
index 05b8da5cdb..1d2ac29c54 100644
--- a/tests/integration/tests/59-self-hosted-plans-entitlement-summary.spec.ts
+++ b/tests/integration/tests/59-self-hosted-plans-entitlement-summary.spec.ts
@@ -2,6 +2,12 @@ import { expect, test, type Page } from '@playwright/test';
import { ensureAuthenticated } from './helpers';
+const PRO_RUNTIME_IDENTITY = {
+ build: 'pro',
+ label: 'Pulse Pro runtime',
+ download_url: 'https://pulserelay.pro/download.html',
+};
+
const PRO_PLAN_ENTITLEMENTS = {
capabilities: [
'update_alerts',
@@ -46,6 +52,7 @@ const PRO_PLAN_ENTITLEMENTS = {
in_grace_period: false,
grace_period_end: null,
max_history_days: 90,
+ runtime: PRO_RUNTIME_IDENTITY,
};
const PRO_PLAN_COMMERCIAL_POSTURE = {
@@ -64,14 +71,26 @@ const PRO_PLAN_RUNTIME_CAPABILITIES = {
monitored_system_capacity: PRO_PLAN_ENTITLEMENTS.monitored_system_capacity,
hosted_mode: false,
max_history_days: 90,
+ runtime: PRO_RUNTIME_IDENTITY,
};
-async function stubSelfHostedPlanEndpoints(page: Page) {
+async function stubSelfHostedPlanEndpoints(
+ page: Page,
+ payloads: {
+ entitlements?: Record<string, unknown>;
+ commercialPosture?: Record<string, unknown>;
+ runtimeCapabilities?: Record<string, unknown>;
+ } = {},
+) {
+ const runtimeCapabilities = payloads.runtimeCapabilities ?? PRO_PLAN_RUNTIME_CAPABILITIES;
+ const entitlements = payloads.entitlements ?? PRO_PLAN_ENTITLEMENTS;
+ const commercialPosture = payloads.commercialPosture ?? PRO_PLAN_COMMERCIAL_POSTURE;
+
await page.route('**/api/license/runtime-capabilities', async (route) => {
await route.fulfill({
status: 200,
contentType: 'application/json',
- body: JSON.stringify(PRO_PLAN_RUNTIME_CAPABILITIES),
+ body: JSON.stringify(runtimeCapabilities),
});
});
@@ -79,7 +98,7 @@ async function stubSelfHostedPlanEndpoints(page: Page) {
await route.fulfill({
status: 200,
contentType: 'application/json',
- body: JSON.stringify(PRO_PLAN_ENTITLEMENTS),
+ body: JSON.stringify(entitlements),
});
});
@@ -87,7 +106,7 @@ async function stubSelfHostedPlanEndpoints(page: Page) {
await route.fulfill({
status: 200,
contentType: 'application/json',
- body: JSON.stringify(PRO_PLAN_COMMERCIAL_POSTURE),
+ body: JSON.stringify(commercialPosture),
});
});
}
@@ -153,6 +172,39 @@ test.describe('Self-hosted plans entitlement summary', () => {
).toBeVisible();
});
+ test('warns when an active Pro plan does not report the private runtime', async ({
+ page,
+ }, testInfo) => {
+ test.skip(testInfo.project.name.startsWith('mobile-'), 'Desktop-only plans coverage');
+
+ const unknownRuntimeEntitlements: Record<string, unknown> = { ...PRO_PLAN_ENTITLEMENTS };
+ delete unknownRuntimeEntitlements.runtime;
+ const unknownRuntimeCapabilities: Record<string, unknown> = {
+ ...PRO_PLAN_RUNTIME_CAPABILITIES,
+ };
+ delete unknownRuntimeCapabilities.runtime;
+
+ await stubSelfHostedPlanEndpoints(page, {
+ entitlements: unknownRuntimeEntitlements,
+ runtimeCapabilities: unknownRuntimeCapabilities,
+ });
+ await ensureAuthenticated(page);
+ await page.goto('/settings/system/billing/plan', { waitUntil: 'domcontentloaded' });
+
+ const currentPlanCard = page
+ .locator('div.rounded-md.border.border-border.bg-surface-alt.p-4')
+ .filter({ has: page.getByText('Current plan: Pulse Pro') })
+ .first();
+
+ await expect(currentPlanCard.getByText('Pro runtime missing')).toBeVisible();
+ await expect(
+ currentPlanCard.getByText(/not reporting the private Pulse Pro runtime/i),
+ ).toBeVisible();
+ await expect(
+ currentPlanCard.getByRole('link', { name: 'Open Pulse Pro downloads' }),
+ ).toHaveAttribute('href', 'https://pulserelay.pro/download.html');
+ });
+
test('surfaces advertised Pro settings sections when Pro capabilities are active', async ({
page,
}, testInfo) => {