mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-13 15:23:44 +00:00
Make hot-dev-bg startup output teach browser entrypoint
This commit is contained in:
parent
25a28e3f27
commit
811e497d60
3 changed files with 41 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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}"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue