Route hot-dev-bg launchd guidance through npm wrapper

This commit is contained in:
rcourtman 2026-03-24 21:28:13 +00:00
parent 72e085d521
commit bab1b8ad5f
3 changed files with 6 additions and 4 deletions

View file

@ -210,9 +210,10 @@ entrypoint for routine startup instead of teaching direct script invocation as
the primary habit.
That operator-guidance rule also applies to the managed launcher's recovery and
diagnostic messages: when `hot-dev-bg` tells users how to start, restart,
verify, or inspect the routine local dev runtime, it must route them to the
repo-root `npm run dev`, `npm run dev:verify`, and `npm run dev:logs` wrappers
instead of teaching direct raw script invocations for those day-to-day flows.
verify, supervise, or inspect the routine local dev runtime, it must route them
to the repo-root `npm run dev`, `npm run dev:verify`, and `npm run dev:logs`
wrappers instead of teaching direct raw script invocations for those day-to-day
flows.
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

View file

@ -692,7 +692,7 @@ launchd_session_bg() {
managed_pid="$(managed_session_pid)"
if [[ -n "${managed_pid}" ]] && has_unmanaged_listeners "${managed_pid}"; then
if [[ "${takeover}" != "true" ]]; then
fail "Managed runtime has split ownership. Rerun with: ./scripts/hot-dev-bg.sh launchd-session --takeover"
fail "Managed runtime has split ownership. Rerun with: npm run dev"
fi
log "Managed runtime has split ownership. Reclaiming ports before launchd supervision..."
stop_bg

View file

@ -329,6 +329,7 @@ test_hot_dev_bg_script_advertises_managed_entrypoint() {
assert_contains "hot-dev-bg still documents direct launcher start" "${output}" "./scripts/hot-dev-bg.sh start [--takeover]"
assert_contains "hot-dev-bg routes log guidance to managed wrapper" "${output}" "Check logs with: npm run dev:logs"
assert_contains "hot-dev-bg routes verify guidance to managed wrapper" "${output}" "Rerun with: npm run dev:verify"
assert_contains "hot-dev-bg routes launchd supervision guidance to managed wrapper" "${output}" "Rerun with: npm run dev"
}
test_clean_mock_alerts_prefers_managed_runtime() {