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
feat(updates): surface digest-pinned Pro Docker update commands from the broker
rcourtman9560fe6c07c8
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 7a4d15ee98..991c28ee94 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -5322,6 +5322,12 @@ That same rule also applies to the shared update transport surface:`frontend-modern/src/api/updates.ts` and `internal/api/updates.go` must carry adirect API-contract proof path instead of relying only on the generic frontendclient or backend payload fallback coverage.+That shared update transport surface also owns the Pro Docker update command+block: `/api/updates/check` may attach `dockerUpdate` (the digest-pinned+private image reference plus broker-issued login/compose commands) only for+Docker deployments of the compiled Pro runtime, sourced from the license+server download broker response, and the transport must never carry a+mutable-tag image command in that block.That same rule also applies to the shared security transport surface:`frontend-modern/src/api/security.ts`, `internal/api/security.go`,`internal/api/security_tokens.go`, and `internal/api/system_settings.go` mustdiff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.mdindex 82f6d3eac7..0120fea258 100644--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md@@ -686,6 +686,18 @@ TLS floor in the dynamic config.affordance for auto-updatable Pro deployments (the broker path preservesthe Pro runtime) and surfaces the portal path for deployments the updatercannot drive, such as Docker.+ A Docker deployment of the compiled Pro binary is part of that same+ boundary: the container cannot self-replace its binary and a Pro compose+ file pins the previous image digest, so `internal/updates/pro_update.go`+ must relay the broker manifest's Docker command block (login plus compose+ pull/up referencing `image@sha256:<digest>`, never a mutable tag) as+ `UpdateInfo.dockerUpdate` on the update-check response for Docker+ deployments, behind the same stable/rc channel guard as the binary path,+ failing closed when the broker block is missing or not digest-pinned.+ In-app update guidance (the Settings updates surfaces, the update banner,+ and the docker update plan in `internal/updates/adapter_installsh.go`)+ must never show the community `rcourtman/pulse` pull commands when the+ compiled runtime is Pro.Customer-facing private Pro RC/GA promotion is part of that same boundary:for every non-draft v6 public release, `create-release.yml` must call theprivate `rcourtman/pulse-enterprise` `Build Pro Release` workflow afterdiff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 7dec6d8c41..08559d4599 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -274,6 +274,14 @@ deployment-lane-only panel. `UpdateInstallGuide` must render the canonicalupdate-plan readiness verdict inline with the update action, and a blockedreadiness status must make automatic install visibly unavailable until theblocking check is resolved.+That install guide also owns the Pro-runtime Docker guidance: when the+compiled runtime identity is `pro` (`runtimeCapabilities().runtime.build`,+the same signal the update banner keys off), the Docker install steps and+the idle Docker box must render the license server broker's digest-pinned+commands from `UpdateInfo.dockerUpdate` (or an explicit Pro notice when they+are absent) and must never show the community `rcourtman/pulse` pull+commands, which would silently downgrade the container to the community+build.`frontend-modern/src/components/shared/DiscoveryReadinessBadge.tsx` is theshared presentation primitive for discovery freshness/readiness indicators.diff --git a/frontend-modern/src/api/__tests__/updates.test.ts b/frontend-modern/src/api/__tests__/updates.test.tsindex c377590f75..57c1c273a9 100644--- a/frontend-modern/src/api/__tests__/updates.test.ts+++ b/frontend-modern/src/api/__tests__/updates.test.ts@@ -119,4 +119,34 @@ describe('UpdatesAPI', () => {await expect(UpdatesAPI.getUpdatePlan(' ', 'stable')).rejects.toThrow('Version is required');expect(apiFetchJSONMock).not.toHaveBeenCalled();});++ it('preserves digest-pinned Pro docker update commands from update checks', async () => {+ // Docker deployments of the Pro runtime cannot self-update; the check+ // response relays the license server broker's digest-pinned image+ // commands, and the transport must carry them through untouched.+ const digest = 'sha256:' + 'ab'.repeat(32);+ const pinnedRef = `registry.pulserelay.pro/pulse/pulse-pro@${digest}`;+ const response = {+ available: true,+ currentVersion: '6.0.0',+ latestVersion: '6.0.5',+ releaseNotes: '',+ releaseDate: '',+ downloadUrl: 'https://license.example.invalid/v1/downloads/pulse-pro?version=v6.0.5',+ isPrerelease: false,+ isMajorUpgrade: false,+ dockerUpdate: {+ version: 'v6.0.5',+ image: 'registry.pulserelay.pro/pulse/pulse-pro',+ imageDigest: digest,+ loginCommand:+ "printf '%s' '<activation-key>' | docker login registry.pulserelay.pro -u 'lic_test' --password-stdin",+ composePullCommand: `PULSE_IMAGE='${pinnedRef}' docker compose pull`,+ composeUpCommand: `PULSE_IMAGE='${pinnedRef}' docker compose up -d`,+ },+ };+ apiFetchJSONMock.mockResolvedValueOnce(response as any);++ await expect(UpdatesAPI.checkForUpdates()).resolves.toEqual(response);+ });});diff --git a/frontend-modern/src/api/updates.ts b/frontend-modern/src/api/updates.tsindex a4503dfaac..259529fb10 100644--- a/frontend-modern/src/api/updates.ts+++ b/frontend-modern/src/api/updates.ts@@ -11,6 +11,19 @@ export interface UpdateInfo {isPrerelease: boolean;isMajorUpgrade: boolean;warning?: string;+ dockerUpdate?: DockerUpdateCommands;+}++// Digest-pinned Docker update commands from the license server download+// broker. Only present for Docker deployments of the Pro runtime, which must+// never be pointed at the community rcourtman/pulse image.+export interface DockerUpdateCommands {+ version: string;+ image: string;+ imageDigest: string;+ loginCommand?: string;+ composePullCommand: string;+ composeUpCommand: string;}export interface UpdateStatus {diff --git a/frontend-modern/src/components/Settings/UpdateInstallGuide.tsx b/frontend-modern/src/components/Settings/UpdateInstallGuide.tsxindex 487ce8e5b1..11dd3bd4d6 100644--- a/frontend-modern/src/components/Settings/UpdateInstallGuide.tsx+++ b/frontend-modern/src/components/Settings/UpdateInstallGuide.tsx@@ -16,6 +16,7 @@ import {buildIdleDockerComposeCommand,buildIdleDockerUpdateCommand,buildUpdateInstallGuide,+ IDLE_DOCKER_PRO_NOTICE,type UpdateInstallStep,} from '@/components/Settings/updatesSettingsModel';@@ -26,6 +27,10 @@ interface UpdateInstallGuideProps {isInstalling: boolean;dockerImageTag: string;systemdDownloadCommand: string;+ // Compiled runtime identity (business hooks presence), not license tier: a+ // Pro-runtime container must never see the community rcourtman/pulse+ // commands, which would silently downgrade it to the community build.+ isProRuntime: boolean;onInstallUpdate: () => void;}@@ -136,6 +141,7 @@ export const UpdateInstallGuide: Component<UpdateInstallGuideProps> = (props) =>props.updatePlan,props.dockerImageTag,props.systemdDownloadCommand,+ props.isProRuntime,);const readinessBlocked = () => props.updatePlan?.readiness?.status === 'blocked';const introText = () =>@@ -157,23 +163,31 @@ export const UpdateInstallGuide: Component<UpdateInstallGuideProps> = (props) =></svg><p class="text-sm font-medium text-blue-800 dark:text-blue-200">Docker Installation</p></div>- <p class="text-xs text-blue-700 dark:text-blue-300">- Updates are managed through Docker. Use these commands to check for and apply updates:- </p>- <div class="space-y-2">- <CopyCommandBlock- command={buildIdleDockerComposeCommand()}- codeClass="block rounded-md border border-border bg-base p-2.5 font-mono text-xs text-blue-400"- />- <p class="text-[10px] text-blue-600 dark:text-blue-400">- Not using Compose?{' '}- <code class="rounded bg-blue-100 px-1 py-0.5 text-[10px] dark:bg-blue-800">- {buildIdleDockerUpdateCommand()}- </code>{' '}- then re-run your original docker run command. A plain docker restart keeps the old- image running.+ <Show+ when={!props.isProRuntime}+ fallback={+ <p class="text-xs text-blue-700 dark:text-blue-300">{IDLE_DOCKER_PRO_NOTICE}</p>+ }+ >+ <p class="text-xs text-blue-700 dark:text-blue-300">+ Updates are managed through Docker. Use these commands to check for and apply+ updates:</p>- </div>+ <div class="space-y-2">+ <CopyCommandBlock+ command={buildIdleDockerComposeCommand()}+ codeClass="block rounded-md border border-border bg-base p-2.5 font-mono text-xs text-blue-400"+ />+ <p class="text-[10px] text-blue-600 dark:text-blue-400">+ Not using Compose?{' '}+ <code class="rounded bg-blue-100 px-1 py-0.5 text-[10px] dark:bg-blue-800">+ {buildIdleDockerUpdateCommand()}+ </code>{' '}+ then re-run your original docker run command. A plain docker restart keeps the old+ image running.+ </p>+ </div>+ </Show></div></Show>diff --git a/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx b/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsxindex a26b8165de..ee425ab705 100644--- a/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx+++ b/frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx@@ -12,6 +12,7 @@ import CheckCircle from 'lucide-solid/icons/check-circle';import ArrowRight from 'lucide-solid/icons/arrow-right';import Package from 'lucide-solid/icons/package';import type { UpdateInfo, VersionInfo, UpdatePlan } from '@/api/updates';+import { runtimeCapabilities } from '@/stores/license';import { buildDockerImageTag, buildLinuxAmd64DownloadCommand } from '@/components/updateVersion';import { UpdateInstallGuide } from '@/components/Settings/UpdateInstallGuide';import { UpdateHistorySection } from '@/components/Settings/UpdateHistorySection';@@ -53,6 +54,9 @@ export const UpdatesSettingsPanel: Component<UpdatesSettingsPanelProps> = (propsconst latestVersion = () => props.updateInfo()?.latestVersion;const dockerImageTag = () => buildDockerImageTag(latestVersion());const systemdDownloadCommand = () => buildLinuxAmd64DownloadCommand(latestVersion());+ // Keys off the compiled runtime identity (same signal UpdateBanner uses):+ // a Pro-runtime install must never be shown community pull commands.+ const isProRuntime = () => runtimeCapabilities()?.runtime?.build === 'pro';const isPreviewChannel = () => props.updateChannel() === 'rc';const autoUpdateLocked = () => Boolean(props.versionInfo()?.isSourceBuild || isPreviewChannel());const updateChannelOptions = (): SelectionCardOption<UpdateChannelOptionValue>[] =>@@ -221,6 +225,7 @@ export const UpdatesSettingsPanel: Component<UpdatesSettingsPanelProps> = (propsisInstalling={props.isInstalling()}dockerImageTag={dockerImageTag()}systemdDownloadCommand={systemdDownloadCommand()}+ isProRuntime={isProRuntime()}onInstallUpdate={props.onInstallUpdate}/></div>diff --git a/frontend-modern/src/components/Settings/__tests__/UpdateInstallGuide.test.tsx b/frontend-modern/src/components/Settings/__tests__/UpdateInstallGuide.test.tsxindex e7d374753d..146d303281 100644--- a/frontend-modern/src/components/Settings/__tests__/UpdateInstallGuide.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/UpdateInstallGuide.test.tsx@@ -52,6 +52,7 @@ describe('UpdateInstallGuide', () => {isInstalling={false}dockerImageTag="v6.0.0"systemdDownloadCommand="curl -fsSL https://example.invalid | tar"+ isProRuntime={false}onInstallUpdate={vi.fn()}/>));@@ -107,6 +108,7 @@ describe('UpdateInstallGuide', () => {isInstalling={false}dockerImageTag="v6.0.0"systemdDownloadCommand="curl -fsSL https://example.invalid | tar"+ isProRuntime={false}onInstallUpdate={onInstallUpdate}/>));@@ -116,4 +118,125 @@ describe('UpdateInstallGuide', () => {fireEvent.click(installButton);expect(onInstallUpdate).not.toHaveBeenCalled();});++ const dockerVersionInfo = {+ version: 'v6.0.0',+ build: 'release',+ runtime: 'go',+ isDocker: true,+ isSourceBuild: false,+ isDevelopment: false,+ deploymentType: 'docker',+ };++ const dockerUpdatePlan = {+ canAutoUpdate: false,+ instructions: [],+ prerequisites: [],+ requiresRoot: false,+ rollbackSupport: true,+ };++ const digest = 'sha256:' + 'ab'.repeat(32);+ const pinnedRef = `registry.pulserelay.pro/pulse/pulse-pro@${digest}`;+ const dockerUpdate = {+ version: 'v6.0.5',+ image: 'registry.pulserelay.pro/pulse/pulse-pro',+ imageDigest: digest,+ loginCommand:+ "printf '%s' '<activation-key>' | docker login registry.pulserelay.pro -u 'lic_test' --password-stdin",+ composePullCommand: `PULSE_IMAGE='${pinnedRef}' docker compose pull`,+ composeUpCommand: `PULSE_IMAGE='${pinnedRef}' docker compose up -d`,+ };++ const availableDockerUpdateInfo = {+ available: true,+ currentVersion: 'v6.0.0',+ latestVersion: 'v6.0.5',+ releaseNotes: '',+ releaseDate: '2026-07-01T00:00:00Z',+ downloadUrl: 'https://license.example.invalid/v1/downloads/pulse-pro?version=v6.0.5',+ isPrerelease: false,+ isMajorUpgrade: false,+ };++ it('shows the broker digest-pinned commands for a Pro docker install, never the community image', () => {+ render(() => (+ <UpdateInstallGuide+ versionInfo={dockerVersionInfo}+ updateInfo={{ ...availableDockerUpdateInfo, dockerUpdate }}+ updatePlan={dockerUpdatePlan}+ isInstalling={false}+ dockerImageTag="v6.0.5"+ systemdDownloadCommand=""+ isProRuntime={true}+ onInstallUpdate={vi.fn()}+ />+ ));++ expect(screen.getByText(`PULSE_IMAGE='${pinnedRef}' docker compose pull`)).toBeInTheDocument();+ expect(+ screen.getByText(`PULSE_IMAGE='${pinnedRef}' docker compose up -d`),+ ).toBeInTheDocument();+ expect(screen.queryByText(/docker pull rcourtman\/pulse/)).not.toBeInTheDocument();+ });++ it('withholds community commands on a Pro docker install even without broker commands', () => {+ render(() => (+ <UpdateInstallGuide+ versionInfo={dockerVersionInfo}+ updateInfo={availableDockerUpdateInfo}+ updatePlan={dockerUpdatePlan}+ isInstalling={false}+ dockerImageTag="v6.0.5"+ systemdDownloadCommand=""+ isProRuntime={true}+ onInstallUpdate={vi.fn()}+ />+ ));++ expect(screen.getByText(/Private Release Access/)).toBeInTheDocument();+ expect(+ screen.queryByText(/docker compose pull && docker compose up -d/),+ ).not.toBeInTheDocument();+ });++ it('replaces the idle docker community commands with the Pro notice', () => {+ render(() => (+ <UpdateInstallGuide+ versionInfo={dockerVersionInfo}+ updateInfo={{ ...availableDockerUpdateInfo, available: false, latestVersion: 'v6.0.0' }}+ updatePlan={null}+ isInstalling={false}+ dockerImageTag="v6.0.0"+ systemdDownloadCommand=""+ isProRuntime={true}+ onInstallUpdate={vi.fn()}+ />+ ));++ expect(screen.getByText(/digest-pinned commands from your license server/)).toBeInTheDocument();+ expect(screen.queryByText(/docker pull rcourtman\/pulse/)).not.toBeInTheDocument();+ expect(+ screen.queryByText('docker compose pull && docker compose up -d'),+ ).not.toBeInTheDocument();+ });++ it('keeps the community docker guidance for community installs', () => {+ render(() => (+ <UpdateInstallGuide+ versionInfo={dockerVersionInfo}+ updateInfo={availableDockerUpdateInfo}+ updatePlan={dockerUpdatePlan}+ isInstalling={false}+ dockerImageTag="v6.0.5"+ systemdDownloadCommand=""+ isProRuntime={false}+ onInstallUpdate={vi.fn()}+ />+ ));++ expect(screen.getByText('docker compose pull && docker compose up -d')).toBeInTheDocument();+ expect(screen.getByText(/docker pull rcourtman\/pulse:v6\.0\.5/)).toBeInTheDocument();+ });});diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex 5fdaefdda1..e363387420 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -1098,6 +1098,21 @@ describe('settings architecture guardrails', () => {);});+ it('keeps Pro-runtime docker updates off the community image commands', () => {+ // A Pro-runtime container updates with digest-pinned commands from the+ // license server broker; pulling the community rcourtman/pulse image+ // would silently downgrade it to the community build. The panel keys the+ // suppression off the compiled runtime identity, and the install guide+ // routes both the available-update steps and the idle Docker box through+ // that flag.+ expect(updatesSettingsPanelSource).toContain(+ "runtimeCapabilities()?.runtime?.build === 'pro'",+ );+ expect(updatesSettingsPanelSource).toContain('isProRuntime={isProRuntime()}');+ expect(updateInstallGuideSource).toContain('isProRuntime: boolean');+ expect(updateInstallGuideSource).toContain('IDLE_DOCKER_PRO_NOTICE');+ });+it('keeps update history and rollback on the dedicated section boundary', () => {// The panel shell mounts the history section; it must not inline history// rows or rollback confirmation itself.diff --git a/frontend-modern/src/components/Settings/updatesSettingsModel.ts b/frontend-modern/src/components/Settings/updatesSettingsModel.tsindex 56028f75f0..0d481904ae 100644--- a/frontend-modern/src/components/Settings/updatesSettingsModel.ts+++ b/frontend-modern/src/components/Settings/updatesSettingsModel.ts@@ -1,4 +1,4 @@-import type { UpdateInfo, UpdatePlan, VersionInfo } from '@/api/updates';+import type { DockerUpdateCommands, UpdateInfo, UpdatePlan, VersionInfo } from '@/api/updates';export type UpdateChannelOptionValue = 'stable' | 'rc';@@ -54,15 +54,52 @@ export function buildIdleDockerUpdateCommand(): string {return 'docker pull rcourtman/pulse:latest && docker stop pulse && docker rm pulse';}+// Copy shown in the idle Docker box for Pro-runtime containers instead of the+// community pull commands: a Pro compose file pins the exact image digest, so+// a plain `docker compose pull` can never update it, and pulling the public+// rcourtman/pulse image would silently downgrade the install to the community+// build. The digest-pinned commands come from the license server on the+// update-check response when a new release is available.+export const IDLE_DOCKER_PRO_NOTICE =+ 'This container runs the Pulse Pro image, so it updates with digest-pinned commands from your license server, not the public rcourtman/pulse image. When a new release is available, the exact commands appear here.';++function buildProDockerUpdateSteps(dockerUpdate: DockerUpdateCommands): UpdateInstallStep[] {+ const steps: UpdateInstallStep[] = [+ {+ id: 'docker-pro-pull',+ title: 'Pull the new Pulse Pro image (pinned to this release’s digest)',+ command: dockerUpdate.composePullCommand,+ commandCodeClass:+ 'block rounded-md border border-border bg-base p-3 font-mono text-sm text-green-400 whitespace-pre-wrap break-all',+ },+ {+ id: 'docker-pro-up',+ title: 'Recreate the container on the new image',+ command: dockerUpdate.composeUpCommand,+ commandCodeClass:+ 'block rounded-md border border-border bg-base p-3 font-mono text-sm text-green-400 whitespace-pre-wrap break-all',+ },+ ];+ if (dockerUpdate.loginCommand) {+ steps.push({+ id: 'docker-pro-login-note',+ title: '',+ note: `If the pull is denied, sign in to the registry first (replace <activation-key> with the key from Settings → License): ${dockerUpdate.loginCommand}`,+ });+ }+ return steps;+}+export function buildUpdateInstallGuide(versionInfo: Pick<VersionInfo,'deploymentType' | 'isDocker'> | null | undefined,- updateInfo: Pick<UpdateInfo, 'latestVersion'> | null | undefined,+ updateInfo: Pick<UpdateInfo, 'latestVersion' | 'dockerUpdate'> | null | undefined,updatePlan: Pick<UpdatePlan, 'canAutoUpdate'> | null | undefined,dockerImageTag: string,systemdDownloadCommand: string,+ isProRuntime = false,): UpdateInstallGuide | null {if (!versionInfo) {return null;@@ -90,6 +127,31 @@ export function buildUpdateInstallGuide(}if (versionInfo.deploymentType === 'docker' || (!versionInfo.deploymentType && versionInfo.isDocker)) {+ // Pro runtime: only ever show the broker's digest-pinned commands. The+ // community pull below would replace the container with the community+ // build and silently strip Pro features.+ if (updateInfo?.dockerUpdate) {+ return {+ headerTitle: 'Update Available',+ headerSummary: `Version ${updateInfo?.latestVersion} is ready to install`,+ introText: 'Run these two commands on the Docker host to update:',+ steps: buildProDockerUpdateSteps(updateInfo.dockerUpdate),+ };+ }+ if (isProRuntime) {+ return {+ headerTitle: 'Update Available',+ headerSummary: `Version ${updateInfo?.latestVersion} is ready to install`,+ introText: 'Follow these steps to update:',+ steps: [+ {+ id: 'docker-pro-unavailable',+ title: '',+ note: 'This container runs the Pulse Pro image, and the license server did not provide Docker update commands for this release. Update from Private Release Access (https://pulserelay.pro/download.html), which shows the digest-pinned pull commands for your license. Do not pull the public rcourtman/pulse image: it would replace this container with the community build.',+ },+ ],+ };+ }return {headerTitle: 'Update Available',headerSummary: `Version ${updateInfo?.latestVersion} is ready to install`,diff --git a/frontend-modern/src/components/UpdateBanner.test.tsx b/frontend-modern/src/components/UpdateBanner.test.tsxindex 95aa933db1..30653c9389 100644--- a/frontend-modern/src/components/UpdateBanner.test.tsx+++ b/frontend-modern/src/components/UpdateBanner.test.tsx@@ -5,6 +5,16 @@ import { afterEach, describe, expect, it, vi } from 'vitest';const { mock } = vi.hoisted(() => ({mock: {runtimeBuild: 'community' as string,+ dockerUpdate: undefined as+ | {+ version: string;+ image: string;+ imageDigest: string;+ loginCommand?: string;+ composePullCommand: string;+ composeUpCommand: string;+ }+ | undefined,plan: {canAutoUpdate: true,requiresRoot: false,@@ -32,6 +42,7 @@ vi.mock('@/stores/updates', () => ({'https://github.com/rcourtman/Pulse/releases/download/v6.1.0/pulse-v6.1.0-linux-amd64.tar.gz',isPrerelease: false,isMajorUpgrade: false,+ dockerUpdate: mock.dockerUpdate,}),versionInfo: () => ({ version: '6.0.0', deploymentType: 'systemd' }),isUpdateVisible: () => true,@@ -57,6 +68,7 @@ const PORTAL_URL = 'https://pulserelay.pro/download.html';afterEach(() => {cleanup();mock.runtimeBuild = 'community';+ mock.dockerUpdate = undefined;mock.plan = { canAutoUpdate: true, requiresRoot: false, rollbackSupport: false, instructions: [] };});@@ -115,6 +127,34 @@ describe('UpdateBanner Pro edition update paths', () => {);});+ it('shows digest-pinned docker commands for Pro docker deployments when expanded', async () => {+ const digest = 'sha256:' + 'ab'.repeat(32);+ const pinnedRef = `registry.pulserelay.pro/pulse/pulse-pro@${digest}`;+ mock.runtimeBuild = 'pro';+ mock.plan = { canAutoUpdate: false, requiresRoot: false, rollbackSupport: false, instructions: [] };+ mock.dockerUpdate = {+ version: 'v6.1.0',+ image: 'registry.pulserelay.pro/pulse/pulse-pro',+ imageDigest: digest,+ composePullCommand: `PULSE_IMAGE='${pinnedRef}' docker compose pull`,+ composeUpCommand: `PULSE_IMAGE='${pinnedRef}' docker compose up -d`,+ };++ render(() => <UpdateBanner />);+ await screen.findByRole('link', { name: /Private Release Access/ });+ fireEvent.click(screen.getByTitle('Show more'));++ expect(screen.getByText('Pulse Pro update')).toBeInTheDocument();+ expect(screen.getByText(`PULSE_IMAGE='${pinnedRef}' docker compose pull`)).toBeInTheDocument();+ expect(+ screen.getByText(`PULSE_IMAGE='${pinnedRef}' docker compose up -d`),+ ).toBeInTheDocument();+ // The binary archive steps and community image must not appear for a+ // Docker Pro deployment with broker commands available.+ expect(screen.queryByText(/install\.sh --archive/)).not.toBeInTheDocument();+ expect(screen.queryByText(/docker pull rcourtman\/pulse/)).not.toBeInTheDocument();+ });+it('keeps the in-app apply button for the community binary', async () => {mock.runtimeBuild = 'community';diff --git a/frontend-modern/src/components/UpdateBanner.tsx b/frontend-modern/src/components/UpdateBanner.tsxindex 70add42475..963d206c30 100644--- a/frontend-modern/src/components/UpdateBanner.tsx+++ b/frontend-modern/src/components/UpdateBanner.tsx@@ -282,24 +282,54 @@ export function UpdateBanner() {<Show when={isProEdition() && updatePlan() && !updatePlan()?.canAutoUpdate}><div class="mt-2 p-3 rounded-md border bg-blue-100 dark:bg-blue-950 border-blue-300 dark:border-blue-700 text-blue-800 dark:text-blue-200"><div class="font-medium mb-1">Pulse Pro update</div>- <p>- This deployment updates manually, and the public community build would remove- Pro features (Audit, RBAC, Reporting, SSO). Update from Private Release- Access instead:- </p>- <ol class="list-decimal ml-5 mt-1 space-y-0.5">- <li>- Download the new Pro archive and its{' '}- <code class="font-mono text-xs">.sshsig</code> sidecar from the portal.- </li>- <li>- Run{' '}- <code class="font-mono text-xs">- sudo bash install.sh --archive ./pulse-pro-…tar.gz- </code>- .- </li>- </ol>+ <Show+ when={updateStore.updateInfo()?.dockerUpdate}+ fallback={+ <>+ <p>+ This deployment updates manually, and the public community build would+ remove Pro features (Audit, RBAC, Reporting, SSO). Update from Private+ Release Access instead:+ </p>+ <ol class="list-decimal ml-5 mt-1 space-y-0.5">+ <li>+ Download the new Pro archive and its{' '}+ <code class="font-mono text-xs">.sshsig</code> sidecar from the+ portal.+ </li>+ <li>+ Run{' '}+ <code class="font-mono text-xs">+ sudo bash install.sh --archive ./pulse-pro-…tar.gz+ </code>+ .+ </li>+ </ol>+ </>+ }+ >+ {(dockerUpdate) => (+ <>+ <p>+ This container runs the Pulse Pro image (the public rcourtman/pulse+ image would remove Pro features). Run these digest-pinned commands on+ the Docker host, or copy them from Settings → Updates:+ </p>+ <ol class="list-decimal ml-5 mt-1 space-y-0.5">+ <li>+ <code class="font-mono text-xs break-all">+ {dockerUpdate().composePullCommand}+ </code>+ </li>+ <li>+ <code class="font-mono text-xs break-all">+ {dockerUpdate().composeUpCommand}+ </code>+ </li>+ </ol>+ </>+ )}+ </Show><ahref={PRO_RELEASE_ACCESS_URL}target="_blank"diff --git a/internal/updates/adapter_installsh.go b/internal/updates/adapter_installsh.goindex 08bb67b6fb..fcd558e192 100644--- a/internal/updates/adapter_installsh.go+++ b/internal/updates/adapter_installsh.go@@ -5,6 +5,8 @@ import ("fmt""os""strings"++ "github.com/rcourtman/pulse-go-rewrite/pkg/edition")// The adapters in this file are plan providers only: they describe how an@@ -72,6 +74,22 @@ func (u *DockerUpdater) GetDeploymentType() string {}func (u *DockerUpdater) PrepareUpdate(ctx context.Context, request UpdateRequest) (*UpdatePlan, error) {+ // The compiled Pro binary must never be pointed at the community image:+ // pulling rcourtman/pulse silently replaces the container with the+ // community build. Its digest-pinned commands come from the license+ // server broker on the update-check response instead.+ if edition.IsPro() {+ return &UpdatePlan{+ CanAutoUpdate: false,+ Instructions: []string{+ fmt.Sprintf("Update to Pulse Pro %s with the digest-pinned Docker commands shown in Settings → Updates (fetched from your license server).", request.Version),+ },+ RequiresRoot: false,+ RollbackSupport: true,+ EstimatedTime: "1-2 minutes",+ }, nil+ }+imageRepo := strings.TrimSpace(os.Getenv("PULSE_DOCKER_IMAGE_REPO"))if imageRepo == "" {imageRepo = defaultDockerImageRepodiff --git a/internal/updates/manager.go b/internal/updates/manager.goindex 34d5facc10..1ea11aeac2 100644--- a/internal/updates/manager.go+++ b/internal/updates/manager.go@@ -65,6 +65,11 @@ type UpdateInfo struct {IsPrerelease bool `json:"isPrerelease"`IsMajorUpgrade bool `json:"isMajorUpgrade"`Warning string `json:"warning,omitempty"`+ // DockerUpdate carries digest-pinned image update commands from the+ // license server download broker. Only set for Docker deployments of the+ // compiled Pro binary, which cannot self-update in a container and must+ // never be pointed at the community rcourtman/pulse image.+ DockerUpdate *DockerUpdateCommands `json:"dockerUpdate,omitempty"`}var (diff --git a/internal/updates/manager_pro_update_test.go b/internal/updates/manager_pro_update_test.goindex 5ca49d7a7f..3431e0c108 100644--- a/internal/updates/manager_pro_update_test.go+++ b/internal/updates/manager_pro_update_test.go@@ -19,13 +19,14 @@ import (// signed R2 URLs it hands out: /v1/downloads/pulse-pro returns the manifest,// and the artifact/.sshsig endpoints simulate the presigned object URLs.type proBrokerFixture struct {- t *testing.T- server *httptest.Server- version string- prerelease bool- tarball []byte- sha256Hex string // manifest hash; may deliberately mismatch the tarball- omitSSHSig bool // drop the sshsig_url from the manifest+ t *testing.T+ server *httptest.Server+ version string+ prerelease bool+ tarball []byte+ sha256Hex string // manifest hash; may deliberately mismatch the tarball+ omitSSHSig bool // drop the sshsig_url from the manifest+ dockerBlock map[string]any // broker docker block; nil for the default digest-pinned onebrokerCalls inttarballCalls int@@ -66,12 +67,17 @@ func newProBrokerFixture(t *testing.T, version string, prerelease bool) *proBrokif !f.omitSSHSig {artifact["sshsig_url"] = f.server.URL + "/r2/pulse-pro.tar.gz.sshsig?X-Amz-Signature=signed"}+ dockerBlock := f.dockerBlock+ if dockerBlock == nil {+ dockerBlock = defaultBrokerDockerBlock(f.version)+ }resp := map[string]any{"release": map[string]any{"version": f.version,"prerelease": f.prerelease,},"artifacts": []any{artifact},+ "docker": dockerBlock,}w.Header().Set("Content-Type", "application/json")if err := json.NewEncoder(w).Encode(resp); err != nil {@@ -102,6 +108,24 @@ func newProBrokerFixture(t *testing.T, version string, prerelease bool) *proBrokreturn f}+// defaultBrokerDockerBlock mirrors the license server's docker block: a+// digest-pinned private image ref inside ready-to-run compose commands (the+// broker never emits mutable-tag commands; see pro_downloads_test.go in+// pulse-pro).+func defaultBrokerDockerBlock(version string) map[string]any {+ digest := "sha256:" + strings.Repeat("ab", 32)+ pinnedRef := "registry.pulserelay.pro/pulse/pulse-pro@" + digest+ return map[string]any{+ "registry": "registry.pulserelay.pro",+ "image": "registry.pulserelay.pro/pulse/pulse-pro",+ "tag": "v" + strings.TrimPrefix(version, "v"),+ "image_digest": digest,+ "login_command": "printf '%s' '<activation-key>' | docker login registry.pulserelay.pro -u 'lic_test' --password-stdin",+ "compose_pull_command": "PULSE_IMAGE='" + pinnedRef + "' docker compose pull",+ "compose_up_command": "PULSE_IMAGE='" + pinnedRef + "' docker compose up -d",+ }+}+func (f *proBrokerFixture) credentialSource() func() (ProUpdateCredentials, bool) {return func() (ProUpdateCredentials, bool) {return ProUpdateCredentials{@@ -215,6 +239,140 @@ func TestCheckForUpdatesProUsesBroker(t *testing.T) {})}+// TestCheckProUpdatesDockerCommands proves a Docker deployment of the Pro+// binary gets the broker's digest-pinned image commands on the update check+// (its only sane update path: the self-updater refuses to run in a container,+// and the community `docker pull rcourtman/pulse` guidance would silently+// downgrade the install to the community build).+func TestCheckProUpdatesDockerCommands(t *testing.T) {+ setupProUpdateTest(t, "6.0.0")++ dockerVersionInfo := func(version string) *VersionInfo {+ return &VersionInfo{Version: version, Build: "release", Runtime: "go", IsDocker: true, DeploymentType: "docker"}+ }++ t.Run("docker deployment gets digest-pinned commands", func(t *testing.T) {+ fixture := newProBrokerFixture(t, "6.0.5", false)+ manager := NewManager(&config.Config{DataPath: t.TempDir()})+ manager.SetProUpdateCredentialSource(fixture.credentialSource())++ currentVer, err := ParseVersion("6.0.0")+ if err != nil {+ t.Fatalf("ParseVersion: %v", err)+ }+ info, err := manager.checkProUpdates(context.Background(), "stable", dockerVersionInfo("6.0.0"), currentVer)+ if err != nil {+ t.Fatalf("checkProUpdates: %v", err)+ }+ if !info.Available {+ t.Fatalf("expected update to be available, got %+v", info)+ }+ cmds := info.DockerUpdate+ if cmds == nil {+ t.Fatal("expected DockerUpdate commands for a Pro docker deployment")+ }+ if cmds.Version != "v6.0.5" {+ t.Fatalf("DockerUpdate.Version = %q, want v6.0.5", cmds.Version)+ }+ pinnedRef := cmds.Image + "@" + cmds.ImageDigest+ if !strings.Contains(cmds.ComposePullCommand, pinnedRef) || !strings.Contains(cmds.ComposeUpCommand, pinnedRef) {+ t.Fatalf("compose commands must reference the digest-pinned image %q, got pull=%q up=%q", pinnedRef, cmds.ComposePullCommand, cmds.ComposeUpCommand)+ }+ if strings.Contains(cmds.ComposePullCommand, "rcourtman/pulse") {+ t.Fatalf("Pro docker commands must never reference the community image, got %q", cmds.ComposePullCommand)+ }+ // The frontend consumes this via /api/updates/check; pin the wire key.+ encoded, err := json.Marshal(info)+ if err != nil {+ t.Fatalf("marshal UpdateInfo: %v", err)+ }+ if !strings.Contains(string(encoded), `"dockerUpdate"`) {+ t.Fatalf("UpdateInfo JSON must carry dockerUpdate, got %s", encoded)+ }+ })++ t.Run("commands attach even when already up to date", func(t *testing.T) {+ fixture := newProBrokerFixture(t, "6.0.0", false)+ manager := NewManager(&config.Config{DataPath: t.TempDir()})+ manager.SetProUpdateCredentialSource(fixture.credentialSource())++ currentVer, err := ParseVersion("6.0.0")+ if err != nil {+ t.Fatalf("ParseVersion: %v", err)+ }+ info, err := manager.checkProUpdates(context.Background(), "stable", dockerVersionInfo("6.0.0"), currentVer)+ if err != nil {+ t.Fatalf("checkProUpdates: %v", err)+ }+ if info.Available {+ t.Fatalf("expected no update at the same version, got %+v", info)+ }+ if info.DockerUpdate == nil {+ t.Fatal("expected DockerUpdate commands to ride along even when up to date")+ }+ })++ t.Run("non-docker deployment gets no docker commands", func(t *testing.T) {+ fixture := newProBrokerFixture(t, "6.0.5", false)+ manager := NewManager(&config.Config{DataPath: t.TempDir()})+ manager.SetProUpdateCredentialSource(fixture.credentialSource())++ info, err := manager.CheckForUpdatesWithChannel(context.Background(), "stable")+ if err != nil {+ t.Fatalf("CheckForUpdatesWithChannel: %v", err)+ }+ if !info.Available {+ t.Fatalf("expected update to be available, got %+v", info)+ }+ if info.DockerUpdate != nil {+ t.Fatalf("non-docker deployments must not carry docker commands, got %+v", info.DockerUpdate)+ }+ })++ t.Run("stable channel prerelease pin withholds commands with the version", func(t *testing.T) {+ fixture := newProBrokerFixture(t, "6.1.0-rc.1", true)+ manager := NewManager(&config.Config{DataPath: t.TempDir()})+ manager.SetProUpdateCredentialSource(fixture.credentialSource())++ currentVer, err := ParseVersion("6.0.0")+ if err != nil {+ t.Fatalf("ParseVersion: %v", err)+ }+ info, err := manager.checkProUpdates(context.Background(), "stable", dockerVersionInfo("6.0.0"), currentVer)+ if err != nil {+ t.Fatalf("checkProUpdates: %v", err)+ }+ if info.Available || info.DockerUpdate != nil {+ t.Fatalf("stable channel must withhold prerelease docker commands, got %+v", info)+ }+ })++ t.Run("fails closed on a mutable-tag broker block", func(t *testing.T) {+ fixture := newProBrokerFixture(t, "6.0.5", false)+ fixture.dockerBlock = map[string]any{+ "registry": "registry.pulserelay.pro",+ "image": "registry.pulserelay.pro/pulse/pulse-pro",+ "tag": "v6.0.5",+ "compose_pull_command": "PULSE_IMAGE='registry.pulserelay.pro/pulse/pulse-pro:v6.0.5' docker compose pull",+ "compose_up_command": "PULSE_IMAGE='registry.pulserelay.pro/pulse/pulse-pro:v6.0.5' docker compose up -d",+ }+ manager := NewManager(&config.Config{DataPath: t.TempDir()})+ manager.SetProUpdateCredentialSource(fixture.credentialSource())++ currentVer, err := ParseVersion("6.0.0")+ if err != nil {+ t.Fatalf("ParseVersion: %v", err)+ }+ info, err := manager.checkProUpdates(context.Background(), "stable", dockerVersionInfo("6.0.0"), currentVer)+ if err != nil {+ t.Fatalf("checkProUpdates: %v", err)+ }+ if info.DockerUpdate != nil {+ t.Fatalf("a broker block without a digest-pinned ref must be dropped, got %+v", info.DockerUpdate)+ }+ })+}+// TestApplyUpdateProDownloadsFromBroker proves the Pro apply path resolves// fresh signed URLs from the broker, downloads the private archive, verifies// its .sshsig against the pinned key path and its sha256 against the manifest,diff --git a/internal/updates/pro_update.go b/internal/updates/pro_update.goindex eceb9892be..f6dc697d65 100644--- a/internal/updates/pro_update.go+++ b/internal/updates/pro_update.go@@ -10,6 +10,7 @@ import ("net/http""net/url""os"+ "regexp""runtime""strings""time"@@ -84,6 +85,21 @@ type proBrokerResponse struct {Channel string `json:"channel"`} `json:"release"`Artifacts []proBrokerArtifact `json:"artifacts"`+ Docker *proBrokerDocker `json:"docker"`+}++// proBrokerDocker mirrors the broker's docker block: the digest-pinned private+// Pro image plus ready-to-run login/compose commands. The broker deliberately+// never emits mutable-tag commands (a customer compose file pins the previous+// digest, so a plain `docker compose pull` can never update it).+type proBrokerDocker struct {+ Registry string `json:"registry"`+ Image string `json:"image"`+ Tag string `json:"tag"`+ ImageDigest string `json:"image_digest"`+ LoginCommand string `json:"login_command"`+ ComposePullCommand string `json:"compose_pull_command"`+ ComposeUpCommand string `json:"compose_up_command"`}type proBrokerArtifact struct {@@ -94,6 +110,55 @@ type proBrokerArtifact struct {SSHSignatureURL string `json:"sshsig_url"`}+// DockerUpdateCommands carries the digest-pinned Pulse Pro image reference and+// the copyable update commands for Docker deployments of the Pro binary. The+// self-updater cannot replace a binary inside a container, so this is the+// supported Docker update path: the commands come from the license server+// download broker and always pin the exact image digest. The community+// `docker pull rcourtman/pulse:<tag>` guidance must never be shown to a Pro+// container; following it silently downgrades the install to the community+// build (same failure mode the broker-based binary self-update already fixed).+type DockerUpdateCommands struct {+ Version string `json:"version"`+ Image string `json:"image"`+ ImageDigest string `json:"imageDigest"`+ LoginCommand string `json:"loginCommand,omitempty"`+ ComposePullCommand string `json:"composePullCommand"`+ ComposeUpCommand string `json:"composeUpCommand"`+}++var dockerImageDigestRe = regexp.MustCompile(`^sha256:[0-9a-f]{64}$`)++// proDockerUpdateCommands extracts the Docker update commands from a broker+// manifest. Fails closed: if the block is missing, incomplete, or either+// compose command does not reference the digest-pinned image, it returns nil+// rather than surface a command that could pull a mutable tag.+func proDockerUpdateCommands(manifest *proBrokerResponse) *DockerUpdateCommands {+ if manifest == nil || manifest.Docker == nil {+ return nil+ }+ d := manifest.Docker+ digest := strings.ToLower(strings.TrimSpace(d.ImageDigest))+ image := strings.TrimSpace(d.Image)+ pull := strings.TrimSpace(d.ComposePullCommand)+ up := strings.TrimSpace(d.ComposeUpCommand)+ if image == "" || pull == "" || up == "" || !dockerImageDigestRe.MatchString(digest) {+ return nil+ }+ pinnedRef := image + "@" + digest+ if !strings.Contains(pull, pinnedRef) || !strings.Contains(up, pinnedRef) {+ return nil+ }+ return &DockerUpdateCommands{+ Version: "v" + strings.TrimPrefix(strings.TrimSpace(manifest.Release.Version), "v"),+ Image: image,+ ImageDigest: digest,+ LoginCommand: strings.TrimSpace(d.LoginCommand),+ ComposePullCommand: pull,+ ComposeUpCommand: up,+ }+}+type proBrokerErrorResponse struct {Error struct {Code string `json:"code"`@@ -280,6 +345,12 @@ func (m *Manager) checkProUpdates(ctx context.Context, channel string, currentInIsPrerelease: isPrerelease,IsMajorUpgrade: isMajorUpgrade,}+ // A Pro binary in a container cannot self-update (ApplyUpdate refuses in+ // Docker), so relay the broker's digest-pinned image commands instead;+ // they ride the same channel-guarded manifest fetch as the version check.+ if currentInfo.IsDocker || currentInfo.DeploymentType == "docker" {+ info.DockerUpdate = proDockerUpdateCommands(manifest)+ }info.Warning = updateWarning(info.Available, isMajorUpgrade, isPrerelease, currentVer.Major, latestVer.Major)return info, nil}