diff --git a/Makefile b/Makefile index d78161b22..09f49f36f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Pulse Makefile for development -.PHONY: build run dev dev-status dev-logs dev-stop dev-restart dev-backend-restart dev-verify frontend backend all clean distclean dev-hot lint lint-backend lint-frontend format format-backend format-frontend build-agents control-plane handoff +.PHONY: build run dev dev-status dev-logs dev-stop dev-restart dev-backend-restart dev-verify dev-foreground frontend backend all clean distclean dev-hot lint lint-backend lint-frontend format format-backend format-frontend build-agents control-plane handoff FRONTEND_DIR := frontend-modern FRONTEND_DIST := $(FRONTEND_DIR)/dist @@ -27,28 +27,31 @@ run: build # Development - managed local runtime dev: - ./scripts/hot-dev-bg.sh start --takeover + npm run dev dev-status: - ./scripts/hot-dev-bg.sh status + npm run dev:status dev-logs: - ./scripts/hot-dev-bg.sh logs + npm run dev:logs dev-stop: - ./scripts/hot-dev-bg.sh stop + npm run dev:stop dev-restart: - ./scripts/hot-dev-bg.sh restart --takeover + npm run dev:restart dev-backend-restart: - ./scripts/hot-dev-bg.sh backend-restart + npm run dev:backend-restart dev-verify: - ./scripts/hot-dev-bg.sh verify --takeover + npm run dev:verify + +dev-foreground: + npm run dev:foreground dev-hot: - ./scripts/hot-dev.sh + npm run dev:foreground # Clean build artifacts clean: diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md index dd220c72b..612019f62 100644 --- a/docs/release-control/v6/internal/subsystems/deployment-installability.md +++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md @@ -228,7 +228,11 @@ 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 route through the managed runtime control plane when they are operating on the local dev stack, instead of resurrecting lane-local `hot-dev.sh` or raw Vite -process management through separate shell folklore. +process management through separate shell folklore. For Makefile targets, that +means dispatching through the canonical repo-root npm wrappers (`npm run dev`, +`npm run dev:status`, `npm run dev:restart`, `npm run dev:backend-restart`, +`npm run dev:verify`, `npm run dev:stop`, and `npm run dev:foreground`) rather +than shelling directly into `scripts/hot-dev-bg.sh`. When `scripts/clean-mock-alerts.sh` needs to quiesce a local dev runtime, it must stop the managed session through `hot-dev-bg` before touching legacy compatibility services, and its operator recovery guidance must point back to diff --git a/scripts/tests/test-hot-dev-bg.sh b/scripts/tests/test-hot-dev-bg.sh index 426e16b90..b1a90ffe3 100755 --- a/scripts/tests/test-hot-dev-bg.sh +++ b/scripts/tests/test-hot-dev-bg.sh @@ -346,6 +346,21 @@ PY assert_contains "frontend package keeps explicit frontend-only escape hatch" "${output}" "dev:frontend-only=vite" } +test_makefile_routes_managed_runtime_through_npm() { + local output + output="$(cat "${ROOT_DIR}/Makefile")" + + assert_contains "make dev routes through npm wrapper" "${output}" $'dev:\n\tnpm run dev' + assert_contains "make dev-status routes through npm wrapper" "${output}" $'dev-status:\n\tnpm run dev:status' + assert_contains "make dev-logs routes through npm wrapper" "${output}" $'dev-logs:\n\tnpm run dev:logs' + assert_contains "make dev-stop routes through npm wrapper" "${output}" $'dev-stop:\n\tnpm run dev:stop' + assert_contains "make dev-restart routes through npm wrapper" "${output}" $'dev-restart:\n\tnpm run dev:restart' + assert_contains "make dev-backend-restart routes through npm wrapper" "${output}" $'dev-backend-restart:\n\tnpm run dev:backend-restart' + assert_contains "make dev-verify routes through npm wrapper" "${output}" $'dev-verify:\n\tnpm run dev:verify' + assert_contains "make dev-foreground routes through npm wrapper" "${output}" $'dev-foreground:\n\tnpm run dev:foreground' + assert_contains "make dev-hot routes through foreground wrapper" "${output}" $'dev-hot:\n\tnpm run dev:foreground' +} + test_hot_dev_script_advertises_foreground_escape_hatch() { local output output="$(sed -n '1,30p' "${ROOT_DIR}/scripts/hot-dev.sh")" @@ -605,6 +620,7 @@ main() { test_launchd_setup_advertises_managed_runtime_controls test_root_package_exposes_managed_runtime_entrypoints test_frontend_package_exposes_managed_runtime_entrypoints + test_makefile_routes_managed_runtime_through_npm test_hot_dev_script_advertises_foreground_escape_hatch test_hot_dev_bg_script_advertises_managed_entrypoint test_integration_readme_uses_managed_backend_restart_wrapper