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.

Make hot-dev-bg startup output teach browser entrypoint

rcourtman811e497d6073
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index b59c60c858..dd220c72b1 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -219,6 +219,10 @@ That same wrapper rule also applies to the managed recovery-proof docs in
bounce or verify the local managed runtime, they must use the repo-root wrapper
surface such as `npm run dev:backend-restart` instead of documenting raw
launcher commands directly.
+That runtime-guidance rule also applies to successful launcher startup output:
+`hot-dev-bg` must identify `http://127.0.0.1:5173` as the browser entrypoint
+and present `7655` as the managed backend dependency, rather than advertising
+frontend and backend URLs as if they were equal browser targets.
That same dev-runtime helper boundary also includes the auxiliary operator
controls that start, stop, restart, or recover local development. The repo-root
Makefile targets, `scripts/toggle-mock.sh`, and `scripts/clean-mock-alerts.sh` must
diff --git a/scripts/hot-dev-bg.sh b/scripts/hot-dev-bg.sh
index 42ccccc61b..ab884ca3f5 100755
--- a/scripts/hot-dev-bg.sh
+++ b/scripts/hot-dev-bg.sh
@@ -442,8 +442,8 @@ PY
log "Check logs with: npm run dev:logs"
fi
- log "Frontend: http://127.0.0.1:${FRONTEND_DEV_PORT}"
- log "Backend: http://127.0.0.1:${PULSE_DEV_API_PORT}"
+ log "Browser entrypoint: http://127.0.0.1:${FRONTEND_DEV_PORT}"
+ log "Managed backend: http://127.0.0.1:${PULSE_DEV_API_PORT}"
log "Logs: ${LOG_FILE}"
}
diff --git a/scripts/tests/test-hot-dev-bg.sh b/scripts/tests/test-hot-dev-bg.sh
index dd8ee9207a..426e16b90b 100755
--- a/scripts/tests/test-hot-dev-bg.sh
+++ b/scripts/tests/test-hot-dev-bg.sh
@@ -190,6 +190,40 @@ test_launchd_session_supervises_managed_runtime() {
assert_contains "launchd session exits nonzero on child crash" "${output}" "status=1"
}
+test_start_bg_reports_browser_entrypoint() {
+ local test_dir fake_bin output
+ test_dir="$(mktemp -d)"
+ temp_dirs+=("${test_dir}")
+ fake_bin="${test_dir}/bin"
+ mkdir -p "${fake_bin}"
+
+ cat > "${fake_bin}/python3" <<'EOF'
+#!/usr/bin/env bash
+printf '4242\n'
+EOF
+ chmod +x "${fake_bin}/python3"
+
+ output="$(
+ HOT_DEV_BG_PATH="${HOT_DEV_BG}" \
+ PATH="${fake_bin}:$PATH" \
+ bash -lc '
+ source "${HOT_DEV_BG_PATH}"
+ PID_FILE="'"${test_dir}"'/hot-dev-bg.pid"
+ LOG_FILE="'"${test_dir}"'/hot-dev-bg.log"
+ FRONTEND_DEV_PORT=5173
+ PULSE_DEV_API_PORT=7655
+ has_unmanaged_listeners(){ return 1; }
+ is_running(){ return 1; }
+ wait_for_managed_listener(){ return 0; }
+ start_bg false
+ '
+ )"
+
+ assert_contains "start reports browser entrypoint" "${output}" "Browser entrypoint: http://127.0.0.1:5173"
+ assert_contains "start reports managed backend" "${output}" "Managed backend: http://127.0.0.1:7655"
+ assert_not_contains "start no longer reports generic frontend url" "${output}" "Frontend: http://127.0.0.1:5173"
+}
+
test_launchd_wrapper_uses_managed_supervisor() {
local output
output="$(sed -n '1,80p' "${DEV_LAUNCHD_WRAPPER}")"
@@ -566,6 +600,7 @@ main() {
test_cli_parses_takeover_flag
test_verify_command_injects_managed_runtime_env
test_launchd_session_supervises_managed_runtime
+ test_start_bg_reports_browser_entrypoint
test_launchd_wrapper_uses_managed_supervisor
test_launchd_setup_advertises_managed_runtime_controls
test_root_package_exposes_managed_runtime_entrypoints