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
Harden dev runtime status semantics
rcourtman01648d93a766
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex 8cc21459d0..285904830a 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -219,8 +219,9 @@ instead of inventing page-local wording for what warning, offline, or unknownmeans on a counted monitored system.That same cloud-paid surface must now also render the canonical status reasonlist when present, so customers can see exactly which grouped source or-top-level surface degraded and when it last reported rather than only reading-generic status copy beside a fresh aggregate `Last Seen` value.+top-level surface degraded and its canonical `reported_at` timestamp rather+than only reading generic status copy beside a fresh aggregate `Last Seen`+value.That same settings surface must also label the monitored-system signal by itsreal meaning. The canonical API shape is now the structured`latest_included_signal` object, and the normalized frontend client contract@@ -338,6 +339,12 @@ because the live stream is transiently recovering. Future hosted shell workmust keep the top-right connection badge aligned to overall authenticatedruntime availability first, with websocket churn treated as a narrower livestream status instead of the shell-level truth.+That same hosted shell badge must also stay explicit about degraded-but-usable+paid runtime states. When the backend remains healthy but the live stream is+recovering, the authenticated shell should surface a degraded sync state+instead of collapsing back to the same disconnected wording used for total+runtime loss, so hosted operators can tell the difference between browser/API+usability and live-stream freshness at a glance.That same route/provider shell must stay page-oriented as well: `App.tsx`should lazy-load route shells like `frontend-modern/src/pages/Storage.tsx`and `frontend-modern/src/pages/Operations.tsx`diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.mdindex 1da836482d..00234aa7ec 100644--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md@@ -29,6 +29,8 @@ server-side update execution surfaces.7. `scripts/install.sh`8. `scripts/install-container-agent.sh`9. `scripts/pulse-auto-update.sh`+10. `scripts/hot-dev.sh`+11. `scripts/hot-dev-bg.sh`## Shared Boundaries@@ -43,6 +45,7 @@ server-side update execution surfaces.2. Add or change release-build metadata injection, release artifact assembly, or governed promotion metadata resolution through `scripts/build-release.sh`, `scripts/release_ldflags.sh`, and `scripts/release_control/resolve_release_promotion.py`, plus the container Dockerfile and governed release workflows that consume those same contracts3. 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, or frontend/backend coherence diagnostics through `scripts/hot-dev.sh` and `scripts/hot-dev-bg.sh`## Forbidden Paths@@ -118,6 +121,19 @@ release artifacts. `scripts/install.sh`, `scripts/install.ps1`,`scripts/install-container-agent.sh`, and `scripts/pulse-auto-update.sh`define supported deployment entry points and update behavior, even when theshell and Windows installers also sit on the shared agent-lifecycle boundary.+The local dev-runtime launcher now sits on that same installability boundary.+`scripts/hot-dev.sh` and `scripts/hot-dev-bg.sh` are the canonical owned entry+points for a coherent local Pulse runtime, so frontend shell health, proxy+health, backend health, and listener ownership diagnostics may not drift into+ad hoc shell snippets or undocumented operator lore outside those scripts.+When the managed launcher reports runtime status, it must tell operators which+browser URL to use and whether the frontend shell, proxied API path, and+direct backend health endpoint all agree, instead of leaving `5173` versus+`7655` interpretation to manual inference from whichever process still happens+to be listening.+Changes to `scripts/hot-dev.sh` and `scripts/hot-dev-bg.sh` must therefore+stay on their own direct dev-runtime orchestration proof path instead of+piggybacking on installer proof coverage for unrelated deployment scripts.That shared `scripts/install.sh` boundary must also keep one canonical serviceargument builder for the runtime flags it persists. Token-bearing installpaths, token-file systemd paths, wrapper-script launches, and later servicediff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 558825b364..560099d1d3 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -151,7 +151,10 @@ websocket liveness: `frontend-modern/src/AppLayout.tsx` and`frontend-modern/src/useAppRuntimeState.ts` must keep the top-right connectionbadge aligned to overall backend availability so a healthy dev/runtime backenddoes not present the whole shell as reconnecting just because the live stream-is transiently renegotiating.+is transiently renegotiating. That shell badge must now stay on an explicit+state model as well: healthy runtime, backend-healthy-but-stream-degraded,+full reconnect, and full disconnect are distinct operator states, and the+shared shell may not collapse them back into one generic reconnect label.Shared feature presentation helpers under `frontend-modern/src/features/` nowalso need to preserve route-owned page-health semantics when the owning surfaceis REST-backed: operators should only see reconnect or disconnected shells when@@ -230,6 +233,12 @@ and `frontend-modern/src/components/shared/interactiveSparklineModel.ts` ownssparkline downsampling, gap segmentation, axis-tick math, and hover-selectionpolicy. Future sparkline work should extend those owners instead of pushingcanvas scheduling or chart-shape math back into the shared component shell.+The dashboard overview trend cards now also have an explicit shared-shell+obligation: `frontend-modern/src/features/dashboardOverview/TrendCharts.tsx`+must treat missing infrastructure history as a governed empty state rather than+as a silent blank sparkline box. Error copy and empty-history copy belong to+the feature shell, while the data path and chart-shaping logic must stay in the+owned hook/model layers that feed it.The shared density map now follows that same owner split.`frontend-modern/src/components/shared/DensityMap.tsx` stays the render shell,`frontend-modern/src/components/shared/useDensityMapState.ts` owns hoverdiff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 0263b4c75a..b3e2323e80 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -1987,6 +1987,8 @@"frontend-modern/src/api/updates.ts","internal/api/updates.go","scripts/build-release.sh",+ "scripts/hot-dev-bg.sh",+ "scripts/hot-dev.sh","scripts/install-container-agent.sh","scripts/install.ps1","scripts/install.sh",@@ -2078,6 +2080,20 @@"scripts/installtests/root_install_sh_test.go"]},+ {+ "id": "dev-runtime-orchestration",+ "label": "dev runtime orchestration proof",+ "match_prefixes": [],+ "match_files": [+ "scripts/hot-dev-bg.sh",+ "scripts/hot-dev.sh"+ ],+ "allow_same_subsystem_tests": false,+ "test_prefixes": [],+ "exact_files": [+ "scripts/tests/test-hot-dev-bg.sh"+ ]+ },{"id": "shell-installer-runtime","label": "shell installer runtime proof",diff --git a/frontend-modern/src/App.tsx b/frontend-modern/src/App.tsxindex db5b60ffab..4bf2e9a9d1 100644--- a/frontend-modern/src/App.tsx+++ b/frontend-modern/src/App.tsx@@ -324,13 +324,11 @@ function App() {<divclass={`app-scroll-shell flex-1 min-w-0 overflow-y-scroll bg-base text-base-content font-sans py-4 sm:py-6 transition-all duration-300`}>- <AppLayout- backendHealthy={runtime.backendHealthy}- connected={runtime.connected}- reconnecting={runtime.reconnecting}- dataUpdated={runtime.dataUpdated}- lastUpdateText={runtime.lastUpdateText}- versionInfo={runtime.versionInfo}+ <AppLayout+ connectionStatus={runtime.connectionStatus}+ dataUpdated={runtime.dataUpdated}+ lastUpdateText={runtime.lastUpdateText}+ versionInfo={runtime.versionInfo}hasAuth={runtime.hasAuth}needsAuth={runtime.needsAuth}proxyAuthInfo={runtime.proxyAuthInfo}diff --git a/frontend-modern/src/AppLayout.tsx b/frontend-modern/src/AppLayout.tsxindex e82698cc50..87ead8d413 100644--- a/frontend-modern/src/AppLayout.tsx+++ b/frontend-modern/src/AppLayout.tsx@@ -39,6 +39,7 @@ import { getKioskModePreference, setKioskMode } from '@/utils/url';import { updateStore } from '@/stores/updates';import { aiChatStore } from '@/stores/aiChat';import { isMultiTenantEnabled, isPro } from '@/stores/license';+import type { AppConnectionStatus } from '@/useAppRuntimeState';const ROOT_INFRASTRUCTURE_PATH = buildInfrastructurePath();const ROOT_WORKLOADS_PATH = buildWorkloadsPath();@@ -68,9 +69,7 @@ type UtilityTab = {};export interface AppLayoutProps {- backendHealthy: () => boolean;- connected: () => boolean;- reconnecting: () => boolean;+ connectionStatus: () => AppConnectionStatus;dataUpdated: () => boolean;lastUpdateText: () => string;versionInfo: () => VersionInfo | null;@@ -87,26 +86,44 @@ export interface AppLayoutProps {children?: JSX.Element;}-function ConnectionStatusBadge(props: {- backendHealthy: () => boolean;- connected: () => boolean;- reconnecting: () => boolean;+export function ConnectionStatusBadge(props: {+ connectionStatus: () => AppConnectionStatus;class?: string;}) {- const shellAvailable = () => props.connected() || props.backendHealthy();- const showSyncing = () => !props.connected() && props.backendHealthy() && props.reconnecting();+ const status = () => props.connectionStatus();+ const showSpinner = () =>+ status().kind === 'sync-reconnecting' || status().kind === 'reconnecting';+ const showLabelByDefault = () => status().tone !== 'healthy';+ const containerClass = () => {+ if (status().tone === 'healthy') {+ return 'connected bg-green-200 dark:bg-green-700 text-green-700 dark:text-green-300 min-w-6 h-6 group-hover:px-3';+ }+ if (status().tone === 'warning') {+ return 'degraded bg-amber-200 dark:bg-amber-700 text-amber-800 dark:text-amber-200 py-1 px-2';+ }+ if (status().kind === 'reconnecting') {+ return 'reconnecting bg-yellow-200 dark:bg-yellow-700 text-yellow-700 dark:text-yellow-300 py-1 px-2';+ }+ return 'disconnected bg-surface-hover text-base-content min-w-6 h-6 group-hover:px-3';+ };+ const indicatorClass = () => {+ if (status().tone === 'healthy') {+ return 'bg-green-600 dark:bg-green-400';+ }+ if (status().tone === 'warning') {+ return 'bg-amber-600 dark:bg-amber-300';+ }+ return 'bg-slate-600';+ };return (<div- class={`group status text-xs rounded-full flex items-center justify-center transition-all duration-500 ease-in-out px-1.5 ${- shellAvailable()- ? 'connected bg-green-200 dark:bg-green-700 text-green-700 dark:text-green-300 min-w-6 h-6 group-hover:px-3'- : props.reconnecting()- ? 'reconnecting bg-yellow-200 dark:bg-yellow-700 text-yellow-700 dark:text-yellow-300 py-1'- : 'disconnected bg-surface-hover text-base-content min-w-6 h-6 group-hover:px-3'- } ${props.class ?? ''}`}+ class={`group status text-xs rounded-full flex items-center justify-center transition-all duration-500 ease-in-out ${containerClass()} ${props.class ?? ''}`}+ title={status().detail}+ role="status"+ aria-label={status().detail}>- <Show when={!shellAvailable() && props.reconnecting()}>+ <Show when={showSpinner()}><svg class="animate-spin h-3 w-3 flex-shrink-0" fill="none" viewBox="0 0 24 24"><circleclass="opacity-25"@@ -123,26 +140,17 @@ function ConnectionStatusBadge(props: {/></svg></Show>- <Show when={shellAvailable()}>- <span class="h-2.5 w-2.5 rounded-full bg-green-600 dark:bg-green-400 flex-shrink-0" />- </Show>- <Show when={!shellAvailable() && !props.reconnecting()}>- <span class="h-2.5 w-2.5 rounded-full bg-slate-600 flex-shrink-0" />+ <Show when={!showSpinner()}>+ <span class={`h-2.5 w-2.5 rounded-full flex-shrink-0 ${indicatorClass()}`} /></Show><spanclass={`whitespace-nowrap overflow-hidden transition-all duration-500 ${- shellAvailable() || (!shellAvailable() && !props.reconnecting())- ? 'max-w-0 group-hover:max-w-[100px] group-hover:ml-2 group-hover:mr-1 opacity-0 group-hover:opacity-100'- : 'max-w-[100px] ml-1 opacity-100'+ showLabelByDefault()+ ? 'max-w-[170px] ml-2 opacity-100'+ : 'max-w-0 group-hover:max-w-[120px] group-hover:ml-2 group-hover:mr-1 opacity-0 group-hover:opacity-100'}`}>- {shellAvailable()- ? showSyncing()- ? 'Connected'- : 'Connected'- : props.reconnecting()- ? 'Reconnecting...'- : 'Disconnected'}+ {status().label}</span></div>);@@ -600,9 +608,7 @@ export function AppLayout(props: AppLayoutProps) {</div></Show><ConnectionStatusBadge- backendHealthy={props.backendHealthy}- connected={props.connected}- reconnecting={props.reconnecting}+ connectionStatus={props.connectionStatus}class="flex-shrink-0"/></div>diff --git a/frontend-modern/src/__tests__/App.architecture.test.ts b/frontend-modern/src/__tests__/App.architecture.test.tsindex 47d1c532ec..d23f81e299 100644--- a/frontend-modern/src/__tests__/App.architecture.test.ts+++ b/frontend-modern/src/__tests__/App.architecture.test.ts@@ -23,9 +23,11 @@ describe('App architecture', () => {it('keeps authenticated chrome in AppLayout and hosted bootstrap in useAppRuntimeState', () => {expect(appLayoutSource).toContain('export function AppLayout(props: AppLayoutProps)');expect(appLayoutSource).toContain('<OrgSwitcher');- expect(appLayoutSource).toContain('const shellAvailable = () => props.connected() || props.backendHealthy();');+ expect(appLayoutSource).toContain('const status = () => props.connectionStatus();');+ expect(appLayoutSource).toContain("status().kind === 'sync-reconnecting' || status().kind === 'reconnecting'");expect(appLayoutSource).toContain('const utilityTabs = createMemo(() =>');expect(appRuntimeStateSource).toContain('export const useAppRuntimeState = () =>');+ expect(appRuntimeStateSource).toContain('const connectionStatus = createMemo<AppConnectionStatus>(() => {');expect(appRuntimeStateSource).toContain('const beginAuthenticatedRuntime = async () =>');expect(appRuntimeStateSource).toContain("const [backendHealthy, setBackendHealthy] = createSignal(false);");expect(appRuntimeStateSource).toContain("const checkBackendHealth = async () => {");diff --git a/frontend-modern/src/__tests__/ConnectionStatusBadge.test.tsx b/frontend-modern/src/__tests__/ConnectionStatusBadge.test.tsxnew file mode 100644index 0000000000..652c8ce420--- /dev/null+++ b/frontend-modern/src/__tests__/ConnectionStatusBadge.test.tsx@@ -0,0 +1,64 @@+import { cleanup, render, screen } from '@solidjs/testing-library';+import { afterEach, describe, expect, it } from 'vitest';+import { ConnectionStatusBadge } from '@/AppLayout';++afterEach(() => {+ cleanup();+});++describe('ConnectionStatusBadge', () => {+ it('renders a healthy connected state', () => {+ render(() => (+ <ConnectionStatusBadge+ connectionStatus={() => ({+ kind: 'connected',+ label: 'Connected',+ detail: 'Backend and live data stream are connected.',+ tone: 'healthy',+ })}+ />+ ));++ expect(screen.getByText('Connected')).toBeInTheDocument();+ expect(+ screen.getByRole('status', { name: 'Backend and live data stream are connected.' }),+ ).toBeInTheDocument();+ });++ it('renders a degraded sync reconnecting state without marking the shell disconnected', () => {+ render(() => (+ <ConnectionStatusBadge+ connectionStatus={() => ({+ kind: 'sync-reconnecting',+ label: 'Sync reconnecting',+ detail: 'Backend is healthy. Live updates are reconnecting.',+ tone: 'warning',+ })}+ />+ ));++ expect(screen.getByText('Sync reconnecting')).toBeInTheDocument();+ expect(+ screen.getByRole('status', { name: 'Backend is healthy. Live updates are reconnecting.' }),+ ).toBeInTheDocument();+ expect(screen.queryByText('Disconnected')).not.toBeInTheDocument();+ });++ it('renders a disconnected state when both backend and stream are unavailable', () => {+ render(() => (+ <ConnectionStatusBadge+ connectionStatus={() => ({+ kind: 'disconnected',+ label: 'Disconnected',+ detail: 'Backend and live data stream are unavailable.',+ tone: 'offline',+ })}+ />+ ));++ expect(screen.getByText('Disconnected')).toBeInTheDocument();+ expect(+ screen.getByRole('status', { name: 'Backend and live data stream are unavailable.' }),+ ).toBeInTheDocument();+ });+});diff --git a/frontend-modern/src/useAppRuntimeState.ts b/frontend-modern/src/useAppRuntimeState.tsindex 4308b1e384..075a58b9f8 100644--- a/frontend-modern/src/useAppRuntimeState.ts+++ b/frontend-modern/src/useAppRuntimeState.ts@@ -1,5 +1,6 @@import {createEffect,+ createMemo,createSignal,getOwner,onCleanup,@@ -60,6 +61,18 @@ import {type EnhancedStore = ReturnType<typeof getGlobalWebSocketStore>;+export type AppConnectionStatus = {+ kind:+ | 'connected'+ | 'sync-reconnecting'+ | 'backend-healthy'+ | 'reconnecting'+ | 'disconnected';+ label: string;+ detail: string;+ tone: 'healthy' | 'warning' | 'offline';+};+const ROOT_INFRASTRUCTURE_PATH = buildInfrastructurePath();export const useAppRuntimeState = () => {@@ -188,6 +201,50 @@ export const useAppRuntimeState = () => {const [dataUpdated, setDataUpdated] = createSignal(false);const [lastUpdateText, setLastUpdateText] = createSignal('');const [versionInfo, setVersionInfo] = createSignal<VersionInfo | null>(null);+ const connectionStatus = createMemo<AppConnectionStatus>(() => {+ if (connected()) {+ return {+ kind: 'connected',+ label: 'Connected',+ detail: 'Backend and live data stream are connected.',+ tone: 'healthy',+ };+ }++ if (backendHealthy() && reconnecting()) {+ return {+ kind: 'sync-reconnecting',+ label: 'Sync reconnecting',+ detail: 'Backend is healthy. Live updates are reconnecting.',+ tone: 'warning',+ };+ }++ if (backendHealthy()) {+ return {+ kind: 'backend-healthy',+ label: 'Backend healthy',+ detail: 'Backend is healthy, but the live data stream is not connected.',+ tone: 'warning',+ };+ }++ if (reconnecting()) {+ return {+ kind: 'reconnecting',+ label: 'Reconnecting...',+ detail: 'Attempting to reconnect to the backend and live data stream.',+ tone: 'offline',+ };+ }++ return {+ kind: 'disconnected',+ label: 'Disconnected',+ detail: 'Backend and live data stream are unavailable.',+ tone: 'offline',+ };+ });const initialThemePreference = getStoredThemePreference();const [themePreference, setThemePreference] =@@ -433,19 +490,20 @@ export const useAppRuntimeState = () => {});createEffect(() => {- if (connected()) {- setBackendHealthy(true);+ if (!hasAuth()) {+ setBackendHealthy(false);return;}- if (!reconnecting()) {+ if (connected()) {+ setBackendHealthy(true);return;}void checkBackendHealth();const interval = window.setInterval(() => {void checkBackendHealth();- }, 5000);+ }, reconnecting() ? 5000 : 15000);onCleanup(() => {window.clearInterval(interval);@@ -668,6 +726,7 @@ export const useAppRuntimeState = () => {state,connected,backendHealthy,+ connectionStatus,reconnecting,dataUpdated,lastUpdateText,diff --git a/scripts/hot-dev-bg.sh b/scripts/hot-dev-bg.shindex 10114f04a9..55075c412b 100755--- a/scripts/hot-dev-bg.sh+++ b/scripts/hot-dev-bg.sh@@ -33,6 +33,19 @@ fail() {exit 1}+http_status_code() {+ local url="$1"+ local code+ code="$(curl -sS -m 2 -o /dev/null -w '%{http_code}' "${url}" 2>/dev/null || true)"+ [[ -n "${code}" ]] || code="000"+ printf "%s\n" "${code}"+}++http_status_ok() {+ local code="$1"+ [[ "${code}" =~ ^2[0-9][0-9]$ || "${code}" =~ ^3[0-9][0-9]$ ]]+}+is_port_listening() {local port="$1"lsof -nP -iTCP:"${port}" -sTCP:LISTEN >/dev/null 2>&1@@ -283,13 +296,20 @@ status_bg() {log "Backend port ${PULSE_DEV_API_PORT} is not listening"fi- local frontend_code backend_code- frontend_code="$(curl -sS -m 2 -o /dev/null -w '%{http_code}' "http://127.0.0.1:${FRONTEND_DEV_PORT}/" 2>/dev/null || true)"- backend_code="$(curl -sS -m 2 -o /dev/null -w '%{http_code}' "http://127.0.0.1:${PULSE_DEV_API_PORT}/api/health" 2>/dev/null || true)"- [[ -n "${frontend_code}" ]] || frontend_code="000"- [[ -n "${backend_code}" ]] || backend_code="000"- log "Frontend HTTP: ${frontend_code}"- log "Backend HTTP: ${backend_code}"+ local browser_url frontend_url proxy_health_url backend_health_url+ browser_url="http://127.0.0.1:${FRONTEND_DEV_PORT}"+ frontend_url="${browser_url}/"+ proxy_health_url="${browser_url}/api/health"+ backend_health_url="http://127.0.0.1:${PULSE_DEV_API_PORT}/api/health"++ local frontend_code proxy_code backend_code+ frontend_code="$(http_status_code "${frontend_url}")"+ proxy_code="$(http_status_code "${proxy_health_url}")"+ backend_code="$(http_status_code "${backend_health_url}")"+ log "Browser entrypoint: ${browser_url}"+ log "Frontend shell HTTP: ${frontend_code}"+ log "Frontend proxy /api/health: ${proxy_code}"+ log "Backend /api/health: ${backend_code}"describe_listener "${FRONTEND_DEV_PORT}" "${managed_pid}" || truedescribe_listener "${PULSE_DEV_API_PORT}" "${managed_pid}" || true@@ -299,6 +319,18 @@ status_bg() {elif [[ -n "${managed_pid}" ]] && has_unmanaged_listeners "${managed_pid}"; thenlog "Detected split ownership: managed session is running, but one or more dev ports are owned by another process."fi++ if http_status_ok "${frontend_code}" && http_status_ok "${proxy_code}" && http_status_ok "${backend_code}"; then+ log "Runtime summary: frontend shell, proxy, and backend are healthy. Use ${browser_url} in the browser."+ elif http_status_ok "${frontend_code}" && ! http_status_ok "${proxy_code}" && http_status_ok "${backend_code}"; then+ log "Runtime summary: frontend shell is up and the backend is healthy, but the frontend proxy path is unhealthy."+ elif http_status_ok "${frontend_code}" && ! http_status_ok "${backend_code}"; then+ log "Runtime summary: frontend shell is up, but the backend health endpoint is unavailable."+ elif ! http_status_ok "${frontend_code}" && http_status_ok "${backend_code}"; then+ log "Runtime summary: backend is healthy, but the frontend dev shell is unavailable. Use the backend URL only for direct API debugging."+ else+ log "Runtime summary: frontend shell and backend are not both healthy. Fix the runtime before trusting browser results."+ fi}logs_bg() {diff --git a/scripts/tests/test-hot-dev-bg.sh b/scripts/tests/test-hot-dev-bg.shindex b5acd10e20..025e96e128 100755--- a/scripts/tests/test-hot-dev-bg.sh+++ b/scripts/tests/test-hot-dev-bg.sh@@ -73,8 +73,10 @@ test_status_without_runtime() {)"assert_contains "status reports no managed runtime" "${output}" "[hot-dev-bg] Not running"+ assert_contains "status reports the browser entrypoint" "${output}" "[hot-dev-bg] Browser entrypoint: http://127.0.0.1:${frontend_port}"assert_contains "status reports idle frontend port" "${output}" "[hot-dev-bg] Frontend port ${frontend_port} is not listening"assert_contains "status reports idle backend port" "${output}" "[hot-dev-bg] Backend port ${backend_port} is not listening"+ assert_contains "status reports proxy health probe" "${output}" "[hot-dev-bg] Frontend proxy /api/health: 000"}test_detects_unmanaged_listeners() {@@ -99,6 +101,9 @@ test_detects_unmanaged_listeners() {assert_contains "status reports unmanaged frontend listener" "${status_output}" "[hot-dev-bg] Port ${frontend_port}: unmanaged listener"assert_contains "status reports unmanaged backend listener" "${status_output}" "[hot-dev-bg] Port ${backend_port}: unmanaged listener"assert_contains "status explains unmanaged runtime ownership" "${status_output}" "[hot-dev-bg] Detected unmanaged dev listeners. hot-dev-bg is not managing the current runtime."+ assert_contains "status reports shell HTTP" "${status_output}" "[hot-dev-bg] Frontend shell HTTP: 200"+ assert_contains "status reports proxied health mismatch" "${status_output}" "[hot-dev-bg] Frontend proxy /api/health: 404"+ assert_contains "status reports backend health probe" "${status_output}" "[hot-dev-bg] Backend /api/health: 404"start_output="$(set +e