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.

Add public copy audit to paid feature proof

rcourtmanb018c0531582
diff --git a/docs/release-control/v6/internal/records/paid-feature-claim-proof-matrix-2026-04-29.md b/docs/release-control/v6/internal/records/paid-feature-claim-proof-matrix-2026-04-29.md
index 30fd68973b..20a366de5e 100644
--- a/docs/release-control/v6/internal/records/paid-feature-claim-proof-matrix-2026-04-29.md
+++ b/docs/release-control/v6/internal/records/paid-feature-claim-proof-matrix-2026-04-29.md
@@ -4,7 +4,7 @@ Date: 2026-04-29
## Decision
-Self-hosted v6 paid claims are release-gated by an executable proof bundle. The bundle verifies that Community, Relay, and Pro claims line up across the canonical licensing contract, history entitlement enforcement, frontend plan copy, public checkout/pricing, download authorization, and Relay runtime entitlement behavior.
+Self-hosted v6 paid claims are release-gated by an executable proof bundle. The bundle verifies that Community, Relay, and Pro claims line up across public customer-facing copy, the canonical licensing contract, history entitlement enforcement, frontend plan copy, public checkout/pricing, download authorization, and Relay runtime entitlement behavior.
## Proof Command
@@ -17,5 +17,6 @@ python3 scripts/release_control/paid_feature_claims_proof.py --json
- Community keeps core monitoring free and does not introduce monitored-system volume caps.
- Relay claims only remote web access, mobile pairing, push notifications, and 14-day metric history.
- Pro preserves Relay capabilities and adds operator extras: root-cause analysis, safe remediation workflows, 90-day metric history, RBAC, audit logging, reporting, SAML SSO, and agent profiles.
+- Public app, docs, and site copy must not reintroduce old self-hosted monitoring-limit, higher-limit, default-trial, hosted-model-credit, or bundled-Patrol-credit claims.
- History claims are enforced by the runtime metrics-history API, not only shown in copy.
- Public pricing, checkout, download, and relay-server entitlement behavior remain consistent with those claims.
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.md
index ad06d16e10..5ea7673269 100644
--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md
+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md
@@ -195,10 +195,11 @@ rather than legacy Community limit enforcement.
Self-hosted paid-feature claims must also remain covered by the executable
cross-repo proof bundle in `scripts/release_control/paid_feature_claims_proof.py`.
When Community, Relay, or Pro claims change, that proof must continue to verify
-the canonical licensing matrix, runtime history entitlement enforcement,
-frontend plan presentation, public pricing/checkout/download behavior, and
-Relay entitlement acceptance together rather than treating copy, checkout, and
-runtime gating as separate unlinked claims.
+the public customer-facing copy, canonical licensing matrix, runtime history
+entitlement enforcement, frontend plan presentation, public
+pricing/checkout/download behavior, and Relay entitlement acceptance together
+rather than treating copy, checkout, and runtime gating as separate unlinked
+claims.
## Extension Points
diff --git a/scripts/release_control/internal/paid_feature_claims_proof.py b/scripts/release_control/internal/paid_feature_claims_proof.py
index 10fa32f43d..adba0b906d 100644
--- a/scripts/release_control/internal/paid_feature_claims_proof.py
+++ b/scripts/release_control/internal/paid_feature_claims_proof.py
@@ -5,6 +5,7 @@ from __future__ import annotations
import argparse
import json
+import re
import subprocess
from dataclasses import asdict, dataclass
from pathlib import Path
@@ -27,6 +28,95 @@ class CommandResult:
detail: str
+@dataclass(frozen=True)
+class CopyAuditFileSpec:
+ repo: str
+ relative_path: str
+ required_patterns: tuple[str, ...]
+
+
+FORBIDDEN_PUBLIC_COPY_PATTERNS: tuple[tuple[str, str], ...] = (
+ (
+ "unlimited self-hosted monitoring",
+ r"\bunlimited\s+(?:self-hosted\s+)?(?:core\s+)?monitoring\b",
+ ),
+ ("higher monitoring limits", r"\b(?:higher|larger)\s+(?:monitoring\s+)?limits\b"),
+ ("monitoring caps", r"\bmonitoring\s+caps?\b"),
+ ("monitored-system caps", r"\bmonitored[-\s]system\s+caps?\b"),
+ ("start trial CTA", r"\bstart\s+(?:a\s+)?(?:14[-\s]day\s+)?(?:pro\s+)?trial\b"),
+ ("free trial CTA", r"\bfree\s+trial\b"),
+ ("hosted model credits", r"\b(?:ai|model)\s+credits?\b"),
+ ("hosted Patrol quickstart", r"\bhosted\s+(?:patrol\s+)?quickstart\b"),
+ ("bundled Patrol run allowance", r"\b25\s+runs,\s+no\s+api\s+key\b"),
+)
+
+
+PUBLIC_COPY_AUDIT_FILES: tuple[CopyAuditFileSpec, ...] = (
+ CopyAuditFileSpec(
+ repo="pulse",
+ relative_path="docs/PULSE_PRO.md",
+ required_patterns=(
+ r"monitored[-\s]system volume is no longer the paid gate",
+ r"Relay.*14[-\s]day history",
+ r"Pro.*90[-\s]day history",
+ r"Alert-triggered root-cause analysis",
+ r"Safe remediation workflows",
+ ),
+ ),
+ CopyAuditFileSpec(
+ repo="pulse",
+ relative_path="docs/AI.md",
+ required_patterns=(
+ r"Pulse Patrol is available to everyone on the Community plan with BYOK",
+ r"Pro adds alert-triggered root-cause analysis and safe remediation workflows",
+ r"Community and Relay installs can still run scheduled Patrol findings with BYOK",
+ ),
+ ),
+ CopyAuditFileSpec(
+ repo="pulse",
+ relative_path="docs/UPGRADE_v6.md",
+ required_patterns=(
+ r"monitoring stays available across Community, Relay, and Pro",
+ r"Relay raises history to 14 days",
+ r"Pro raises it to 90 days",
+ r"does not expose a general in-app trial",
+ ),
+ ),
+ CopyAuditFileSpec(
+ repo="pulse",
+ relative_path="frontend-modern/src/utils/selfHostedPlans.ts",
+ required_patterns=(
+ r"Self-hosted Pulse includes core monitoring for free",
+ r"Remote web access, mobile pairing, and push",
+ r"14-day metric history",
+ r"Root-cause analysis, safe remediation workflows, 90-day history",
+ r"admin/reporting extras",
+ ),
+ ),
+ CopyAuditFileSpec(
+ repo="pulse-pro",
+ relative_path="landing-page/index.html",
+ required_patterns=(
+ r"Community keeps core monitoring free",
+ r"mobile app pairing, push notifications, and 14-day history",
+ r"root-cause analysis, safe remediation workflows, and 90-day history",
+ r"Do Relay or Pro charge by server\?",
+ r"Existing Pulse Pro and legacy Pro\+ holders keep their paid runtime access",
+ ),
+ ),
+ CopyAuditFileSpec(
+ repo="pulse-pro",
+ relative_path="license-server/public_pricing.go",
+ required_patterns=(
+ r"Community keeps core monitoring free",
+ r"mobile app pairing, push notifications, and 14-day history",
+ r"root-cause analysis, safe remediation workflows, team controls, and 90-day history",
+ r"not as the self-hosted paid gate",
+ ),
+ ),
+)
+
+
def default_pulse_dir() -> Path:
return Path(__file__).resolve().parents[3]
@@ -39,6 +129,10 @@ def default_pulse_pro_relay_server_dir() -> Path:
return default_pulse_dir().parent / "pulse-pro" / "relay-server"
+def default_pulse_pro_dir(args: argparse.Namespace) -> Path:
+ return Path(args.pulse_pro_license_server_dir).resolve().parent
+
+
def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="Run the automated proof bundle for v6 paid feature claims."
@@ -142,6 +236,68 @@ def build_command_specs(args: argparse.Namespace) -> list[CommandSpec]:
]
+def copy_audit_file_path(args: argparse.Namespace, spec: CopyAuditFileSpec) -> Path:
+ if spec.repo == "pulse":
+ return Path(args.pulse_dir).resolve() / spec.relative_path
+ if spec.repo == "pulse-pro":
+ return default_pulse_pro_dir(args) / spec.relative_path
+ raise ValueError(f"unknown copy audit repo {spec.repo!r}")
+
+
+def first_matching_line(content: str, pattern: str) -> str:
+ compiled = re.compile(pattern, flags=re.IGNORECASE)
+ for line in content.splitlines():
+ if compiled.search(line):
+ return line.strip()
+ return ""
+
+
+def audit_public_paid_claim_copy(args: argparse.Namespace) -> list[str]:
+ failures: list[str] = []
+ for spec in PUBLIC_COPY_AUDIT_FILES:
+ path = copy_audit_file_path(args, spec)
+ label = f"{spec.repo}:{spec.relative_path}"
+ if not path.exists():
+ failures.append(f"{label} is missing")
+ continue
+
+ content = path.read_text(encoding="utf-8")
+ for name, pattern in FORBIDDEN_PUBLIC_COPY_PATTERNS:
+ matching_line = first_matching_line(content, pattern)
+ if matching_line:
+ failures.append(f"{label} contains forbidden {name!r}: {matching_line}")
+
+ for pattern in spec.required_patterns:
+ if not re.search(pattern, content, flags=re.IGNORECASE | re.DOTALL):
+ failures.append(f"{label} is missing required paid-claim pattern: {pattern}")
+
+ return failures
+
+
+def run_public_paid_claim_copy_audit(args: argparse.Namespace) -> CommandResult:
+ failures = audit_public_paid_claim_copy(args)
+ if failures:
+ detail = "; ".join(failures[:3])
+ if len(failures) > 3:
+ detail += f"; plus {len(failures) - 3} more"
+ return CommandResult(
+ name="pulse-public-paid-claim-copy-audit",
+ cwd=str(Path(args.pulse_dir).resolve()),
+ command=["static-copy-audit", "public-paid-claim-copy"],
+ ok=False,
+ exit_code=1,
+ detail=detail,
+ )
+ return CommandResult(
+ name="pulse-public-paid-claim-copy-audit",
+ cwd=str(Path(args.pulse_dir).resolve()),
+ command=["static-copy-audit", "public-paid-claim-copy"],
+ ok=True,
+ exit_code=0,
+ detail=f"checked {len(PUBLIC_COPY_AUDIT_FILES)} public paid-claim files",
+ )
+
+
def summarize_output(stdout: str, stderr: str) -> str:
stdout_lines = [line.strip() for line in stdout.splitlines() if line.strip()]
stderr_lines = [line.strip() for line in stderr.splitlines() if line.strip()]
@@ -170,7 +326,10 @@ def run_command(spec: CommandSpec) -> CommandResult:
def run_proof(args: argparse.Namespace) -> list[CommandResult]:
- return [run_command(spec) for spec in build_command_specs(args)]
+ return [
+ run_public_paid_claim_copy_audit(args),
+ *[run_command(spec) for spec in build_command_specs(args)],
+ ]
def render_markdown_report(title: str, results: list[CommandResult]) -> str:
@@ -179,7 +338,7 @@ def render_markdown_report(title: str, results: list[CommandResult]) -> str:
"",
"## Scope",
"",
- "This proof checks that self-hosted paid claims map to concrete entitlement, API, UI, license-server, and relay-server behavior.",
+ "This proof checks that self-hosted paid claims map to concrete public copy, entitlement, API, UI, license-server, and relay-server behavior.",
"",
"## Results",
"",
diff --git a/scripts/release_control/internal/paid_feature_claims_proof_test.py b/scripts/release_control/internal/paid_feature_claims_proof_test.py
index 9dab9934bd..e34371fffc 100644
--- a/scripts/release_control/internal/paid_feature_claims_proof_test.py
+++ b/scripts/release_control/internal/paid_feature_claims_proof_test.py
@@ -23,6 +23,74 @@ def run_main(argv: list[str]) -> tuple[int, str]:
return exit_code, buffer.getvalue()
+def write_public_copy_fixture(root: Path) -> tuple[Path, Path]:
+ pulse_dir = root / "pulse"
+ pulse_pro_dir = root / "pulse-pro"
+ (pulse_dir / "docs").mkdir(parents=True)
+ (pulse_dir / "frontend-modern" / "src" / "utils").mkdir(parents=True)
+ (pulse_pro_dir / "landing-page").mkdir(parents=True)
+ (pulse_pro_dir / "license-server").mkdir(parents=True)
+ (pulse_pro_dir / "relay-server").mkdir(parents=True)
+
+ (pulse_dir / "docs" / "PULSE_PRO.md").write_text(
+ """
+ monitored-system volume is no longer the paid gate.
+ Relay gives 14-day history.
+ Pro gives 90-day history.
+ Alert-triggered root-cause analysis.
+ Safe remediation workflows.
+ """,
+ encoding="utf-8",
+ )
+ (pulse_dir / "docs" / "AI.md").write_text(
+ """
+ Pulse Patrol is available to everyone on the Community plan with BYOK.
+ Pro adds alert-triggered root-cause analysis and safe remediation workflows.
+ Community and Relay installs can still run scheduled Patrol findings with BYOK.
+ """,
+ encoding="utf-8",
+ )
+ (pulse_dir / "docs" / "UPGRADE_v6.md").write_text(
+ """
+ monitoring stays available across Community, Relay, and Pro.
+ Relay raises history to 14 days.
+ Pro raises it to 90 days.
+ Self-hosted v6 does not expose a general in-app trial.
+ """,
+ encoding="utf-8",
+ )
+ (pulse_dir / "frontend-modern" / "src" / "utils" / "selfHostedPlans.ts").write_text(
+ """
+ Self-hosted Pulse includes core monitoring for free.
+ Remote web access, mobile pairing, and push.
+ 14-day metric history.
+ Root-cause analysis, safe remediation workflows, 90-day history.
+ admin/reporting extras.
+ """,
+ encoding="utf-8",
+ )
+ (pulse_pro_dir / "landing-page" / "index.html").write_text(
+ """
+ Community keeps core monitoring free.
+ mobile app pairing, push notifications, and 14-day history.
+ root-cause analysis, safe remediation workflows, and 90-day history.
+ Do Relay or Pro charge by server?
+ Existing Pulse Pro and legacy Pro+ holders keep their paid runtime access.
+ """,
+ encoding="utf-8",
+ )
+ (pulse_pro_dir / "license-server" / "public_pricing.go").write_text(
+ """
+ Community keeps core monitoring free.
+ mobile app pairing, push notifications, and 14-day history.
+ root-cause analysis, safe remediation workflows, team controls, and 90-day history.
+ not as the self-hosted paid gate.
+ """,
+ encoding="utf-8",
+ )
+ return pulse_dir, pulse_pro_dir
+
+
class PaidFeatureClaimsProofTest(unittest.TestCase):
def test_default_paths_resolve_from_internal_script_location(self) -> None:
self.assertEqual(proof.default_pulse_dir(), Path(proof.__file__).resolve().parents[3])
@@ -70,6 +138,90 @@ class PaidFeatureClaimsProofTest(unittest.TestCase):
self.assertIn("pulse-pro-public-pricing-and-checkout-contract", names)
self.assertIn("pulse-pro-relay-entitlement-runtime", names)
+ def test_public_copy_audit_passes_for_current_claim_floor(self) -> None:
+ with tempfile.TemporaryDirectory() as tmp:
+ pulse_dir, pulse_pro_dir = write_public_copy_fixture(Path(tmp))
+ args = proof.parse_args(
+ [
+ "--pulse-dir",
+ str(pulse_dir),
+ "--pulse-pro-license-server-dir",
+ str(pulse_pro_dir / "license-server"),
+ "--pulse-pro-relay-server-dir",
+ str(pulse_pro_dir / "relay-server"),
+ ]
+ )
+
+ result = proof.run_public_paid_claim_copy_audit(args)
+
+ self.assertTrue(result.ok)
+ self.assertEqual(result.detail, "checked 6 public paid-claim files")
+
+ def test_public_copy_audit_rejects_stale_limit_and_trial_claims(self) -> None:
+ with tempfile.TemporaryDirectory() as tmp:
+ pulse_dir, pulse_pro_dir = write_public_copy_fixture(Path(tmp))
+ plans = pulse_dir / "frontend-modern" / "src" / "utils" / "selfHostedPlans.ts"
+ plans.write_text(
+ plans.read_text(encoding="utf-8")
+ + "\nUpgrade for higher limits and start a 14-day Pro trial.\n",
+ encoding="utf-8",
+ )
+ args = proof.parse_args(
+ [
+ "--pulse-dir",
+ str(pulse_dir),
+ "--pulse-pro-license-server-dir",
+ str(pulse_pro_dir / "license-server"),
+ "--pulse-pro-relay-server-dir",
+ str(pulse_pro_dir / "relay-server"),
+ ]
+ )
+
+ result = proof.run_public_paid_claim_copy_audit(args)
+
+ self.assertFalse(result.ok)
+ self.assertEqual(result.exit_code, 1)
+ self.assertIn("higher monitoring limits", result.detail)
+ self.assertIn("start trial CTA", result.detail)
+
+ def test_run_proof_includes_public_copy_audit_before_command_specs(self) -> None:
+ with tempfile.TemporaryDirectory() as tmp:
+ pulse_dir, pulse_pro_dir = write_public_copy_fixture(Path(tmp))
+ args = proof.parse_args(
+ [
+ "--pulse-dir",
+ str(pulse_dir),
+ "--pulse-pro-license-server-dir",
+ str(pulse_pro_dir / "license-server"),
+ "--pulse-pro-relay-server-dir",
+ str(pulse_pro_dir / "relay-server"),
+ ]
+ )
+ original_build_command_specs = proof.build_command_specs
+ original_run_command = proof.run_command
+ try:
+ proof.build_command_specs = lambda _args: [ # type: ignore[assignment]
+ proof.CommandSpec(name="fake-command", cwd=str(pulse_dir), command=["true"])
+ ]
+ proof.run_command = lambda spec: proof.CommandResult( # type: ignore[assignment]
+ name=spec.name,
+ cwd=spec.cwd,
+ command=spec.command,
+ ok=True,
+ exit_code=0,
+ detail="pass",
+ )
+
+ results = proof.run_proof(args)
+ finally:
+ proof.build_command_specs = original_build_command_specs # type: ignore[assignment]
+ proof.run_command = original_run_command # type: ignore[assignment]
+
+ self.assertEqual(
+ [result.name for result in results],
+ ["pulse-public-paid-claim-copy-audit", "fake-command"],
+ )
+
def test_run_command_success_and_failure(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
ok = proof.run_command(