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.

Correct Patrol metrics and running state

rcourtman9875db743f88
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.md
index b541f56537..bd44816c94 100644
--- a/docs/release-control/v6/internal/subsystems/api-contracts.md
+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md
@@ -171,6 +171,7 @@ Own canonical runtime payload shapes between backend and frontend.
6. Keep Patrol status payloads explicit enough that the frontend can present blocked runtime state without treating a previously healthy summary snapshot as current runtime truth
7. Keep Patrol summary payload consumers aligned on one assessment hierarchy: transport-driven Patrol summary surfaces may show supporting counts and outcomes, but the canonical assessment and verification states must remain singular and not be repeated as a second compact verdict strip
8. Treat Patrol summary supporting metrics as readouts, not reinterpretations: when frontend consumers derive cards such as active findings, criticals, warnings, or fixes from the canonical payloads, those cards must stay numeric and must not synthesize new assessment labels like `Issues detected` or verification labels like `Partial verification` beneath the primary summary contract
+9. Treat active Patrol runtime transport as compatible with factual activity surfaces: when the runtime is currently running, frontend consumers may surface in-progress activity context, but they must not replace the activity strip with a second assessment verdict derived from runtime state alone
## Current State
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index 108d775909..1b82149952 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -40,6 +40,10 @@ server-side update execution surfaces.
18. `scripts/dev-launchd-setup.sh`
19. `scripts/dev-launchd-wrapper.sh`
20. `scripts/com.pulse.hot-dev.plist.template`
+21. `.github/workflows/create-release.yml`
+22. `.github/workflows/release-dry-run.yml`
+23. `.github/workflows/publish-docker.yml`
+24. `.github/workflows/promote-floating-tags.yml`
## Shared Boundaries
@@ -55,6 +59,7 @@ server-side update execution surfaces.
3. Add or change shell installer, Windows installer, container-agent installer, or auto-update script behavior through `scripts/install.sh`, `scripts/install.ps1`, `scripts/install-container-agent.sh`, and `scripts/pulse-auto-update.sh`
4. Add or change server update transport through `internal/api/updates.go` and `frontend-modern/src/api/updates.ts`
5. Add or change local dev-runtime orchestration, managed ownership, browser-runtime proof wiring, frontend/backend coherence diagnostics, canonical developer entry wrappers, or dev-runtime helper control surfaces through `scripts/hot-dev.sh`, `scripts/hot-dev-bg.sh`, `tests/integration/scripts/managed-dev-runtime.mjs`, `package.json`, `frontend-modern/package.json`, `scripts/dev-check.sh`, `scripts/toggle-mock.sh`, `scripts/clean-mock-alerts.sh`, `scripts/dev-launchd-setup.sh`, `scripts/dev-launchd-wrapper.sh`, and `scripts/com.pulse.hot-dev.plist.template`
+6. Add or change governed release-promotion workflow inputs, operator-facing promotion metadata, prerelease lineage enforcement, or stable-promotion rehearsal summaries through `.github/workflows/create-release.yml`, `.github/workflows/release-dry-run.yml`, `.github/workflows/publish-docker.yml`, and `.github/workflows/promote-floating-tags.yml`
## Forbidden Paths
@@ -101,6 +106,12 @@ for stable-versus-RC metadata validation shared by `.github/workflows/release-dr
and `.github/workflows/create-release.yml`. Promotion rollback targets, promoted
RC lineage, soak checks, and GA/v5 notice metadata may not drift between those
two workflows through duplicated inline shell validation.
+Those same governed release workflows now also own the operator-facing wording
+for that promotion metadata. Human-visible workflow inputs, summaries, and
+error messages must describe the path as a prerelease or preview flow rather
+than implying a near-ready release candidate, while the machine-owned channel
+and lineage identifiers such as `rc`, `rc-to-ga-*`, and `v6.0.0-rc.1` remain
+the canonical internal keys.
Those same workflows must also fetch and dispatch the governed release branch
derived from release-control metadata instead of hardcoding `pulse/v6`,
`pulse/v6-release`, or any later branch literal inline.
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 51dd208917..afba4667d2 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -200,6 +200,10 @@ Those supporting cards must also keep their content factual and count-based:
active findings, critical findings, warnings, and fixes are valid secondary
readouts, while labels such as `Issues detected` or `Partial verification`
belong only to the primary Patrol assessment and verification surfaces.
+The same applies to the Patrol activity strip during active execution: the
+shared feature surface may add an explicit run-in-progress badge, but the main
+status-strip label remains factual activity copy rather than shifting into a
+second Patrol verdict label while a run is underway.
`frontend-modern/src/components/shared/TagBadges.tsx` is now also the
canonical tag-badge primitive. Dashboard workload rows and the unified-resource
detail drawer must import that shared owner instead of keeping a dashboard-local
diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index be66d43307..50f1834cce 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -146,6 +146,10 @@ recent-activity strip, not a second health verdict: when Patrol is active it
should report recent run activity, run kind, latest run result, and run-count
context instead of emitting another green/amber all-clear headline that can
drift from the governed assessment summary above it.
+When Patrol is currently running, that strip should still stay factual rather
+than switching to another verdict label: the runtime may add an explicit
+in-progress indicator, but the primary activity label remains recent activity
+instead of a competing Patrol-state verdict.
That latest run result must come from the effective run outcome, not the raw
status field alone: shared Patrol run presentation helpers must treat any run
with execution errors as an error result even when the stored status text is
diff --git a/frontend-modern/src/components/patrol/PatrolStatusBar.tsx b/frontend-modern/src/components/patrol/PatrolStatusBar.tsx
index f8e45ce61c..86ad5acab1 100644
--- a/frontend-modern/src/components/patrol/PatrolStatusBar.tsx
+++ b/frontend-modern/src/components/patrol/PatrolStatusBar.tsx
@@ -73,10 +73,10 @@ export const PatrolStatusBar: Component<PatrolStatusBarProps> = (props) => {
return (
runtimeState === 'blocked' ||
runtimeState === 'disabled' ||
- runtimeState === 'unavailable' ||
- runtimeState === 'running'
+ runtimeState === 'unavailable'
);
});
+ const showRunInProgress = createMemo(() => props.runtimeState === 'running');
return (
<Show when={!runs.loading && stats()}>
@@ -111,6 +111,11 @@ export const PatrolStatusBar: Component<PatrolStatusBarProps> = (props) => {
<span class="text-blue-600 dark:text-blue-400 font-medium text-xs">
Recent activity
</span>
+ <Show when={showRunInProgress()}>
+ <span class="rounded border border-blue-200 bg-blue-50 px-1.5 py-0.5 text-[10px] font-medium text-blue-700 dark:border-blue-800 dark:bg-blue-900 dark:text-blue-300">
+ Run in progress
+ </span>
+ </Show>
</>
}
>
diff --git a/frontend-modern/src/components/patrol/__tests__/PatrolStatusBar.test.tsx b/frontend-modern/src/components/patrol/__tests__/PatrolStatusBar.test.tsx
index bc33a83c1b..852ceddb8e 100644
--- a/frontend-modern/src/components/patrol/__tests__/PatrolStatusBar.test.tsx
+++ b/frontend-modern/src/components/patrol/__tests__/PatrolStatusBar.test.tsx
@@ -195,4 +195,46 @@ describe('PatrolStatusBar', () => {
expect(within(latestRunSection as HTMLElement).queryByText('healthy')).not.toBeInTheDocument();
expect(within(latestRunSection as HTMLElement).getByText('error')).toBeInTheDocument();
});
+
+ it('keeps running patrols factual with a run-in-progress indicator', async () => {
+ getPatrolRunHistoryMock.mockResolvedValue([
+ {
+ id: 'run-startup',
+ started_at: '2026-03-12T10:00:00Z',
+ completed_at: '2026-03-12T10:01:00Z',
+ duration_ms: 60000,
+ type: 'patrol',
+ trigger_reason: 'startup',
+ resources_checked: 57,
+ nodes_checked: 0,
+ guests_checked: 0,
+ docker_checked: 0,
+ storage_checked: 0,
+ hosts_checked: 0,
+ pbs_checked: 0,
+ pmg_checked: 0,
+ kubernetes_checked: 0,
+ new_findings: 0,
+ existing_findings: 0,
+ rejected_findings: 0,
+ resolved_findings: 0,
+ auto_fix_count: 0,
+ findings_summary: 'Completed with errors',
+ finding_ids: [],
+ error_count: 1,
+ status: 'error',
+ triage_flags: 0,
+ tool_call_count: 0,
+ },
+ ]);
+
+ render(() => <PatrolStatusBar refreshTrigger={1} runtimeState="running" />);
+
+ await waitFor(() => {
+ expect(screen.getByText('Recent activity')).toBeInTheDocument();
+ });
+
+ expect(screen.getByText('Run in progress')).toBeInTheDocument();
+ expect(screen.queryByText('Patrol Running')).not.toBeInTheDocument();
+ });
});
diff --git a/frontend-modern/src/features/patrol/PatrolIntelligenceSummary.tsx b/frontend-modern/src/features/patrol/PatrolIntelligenceSummary.tsx
index 8fa36a322e..cd43cf7397 100644
--- a/frontend-modern/src/features/patrol/PatrolIntelligenceSummary.tsx
+++ b/frontend-modern/src/features/patrol/PatrolIntelligenceSummary.tsx
@@ -301,14 +301,14 @@ export function PatrolIntelligenceSummary(props: { state: PatrolIntelligenceStat
<div class="bg-surface rounded-md border border-border p-3">
<div class="flex items-center gap-2">
<div
- class={`p-1.5 rounded-md border ${criticalSummaryPresentation().iconContainerClass}`}
+ class={`p-1.5 rounded-md border ${warningSummaryPresentation().iconContainerClass}`}
>
- <ShieldAlertIcon class={`w-4 h-4 ${criticalSummaryPresentation().iconClass}`} />
+ <ActivityIcon class={`w-4 h-4 ${warningSummaryPresentation().iconClass}`} />
</div>
<div>
- <p class="text-xs text-muted">Critical</p>
- <p class={`text-lg font-bold ${criticalSummaryPresentation().valueClass}`}>
- {state.summaryStats().criticalFindings}
+ <p class="text-xs text-muted">Warnings</p>
+ <p class={`text-lg font-bold ${warningSummaryPresentation().valueClass}`}>
+ {state.summaryStats().warningFindings}
</p>
</div>
</div>
diff --git a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
index 1cdc66e24d..ea3400a899 100644
--- a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
+++ b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
@@ -813,6 +813,7 @@ describe('AIIntelligence entitlement gating', () => {
await waitFor(() => {
expect(screen.getAllByText('Coverage incomplete').length).toBeGreaterThan(0);
expect(screen.getByText('No recent full patrol')).toBeInTheDocument();
+ expect(screen.getByText('Warnings')).toBeInTheDocument();
});
expect(screen.queryByText('No issues found')).not.toBeInTheDocument();