Harden local debug stale listener cleanup

This commit is contained in:
npc0-hue
2026-07-14 18:27:25 +08:00
parent 4ba5bd6971
commit f64eb0831f
4 changed files with 86 additions and 11 deletions
@@ -16,6 +16,8 @@ git clone git@git.npc0.com:admin343/run.git run
If `RUN_REPO_DIR` is missing or does not contain a run `go.mod`, local debug scripts fail with a clear setup message.
Local debug start/stop scripts treat pid files as hints, not the only source of truth. If a previous local debug process still owns the configured platform or web port after pid files are removed, the scripts identify it by cwd/log ownership under this repository and stop it before starting a new stack.
## Docker Compose
The compose file keeps the run service for all-in-one local deployment, but its build context points at `${RUN_REPO_DIR:-./run}` and uses the external repository's `Dockerfile`.
@@ -3,6 +3,7 @@
- [x] Add OpenSpec proposal/design/spec for the repository split.
- [x] Remove `run/` from browser-owned project roots and structure checks.
- [x] Update README, local debug scripts, and Docker Compose to use `RUN_REPO_DIR`.
- [x] Harden local debug start/stop against stale owned listeners when pid files are missing.
- [x] Remove tracked `run/` source files from `browser.git`.
- [x] Run `scripts/check-structure.sh`.
- [x] Run `openspec validate split-run-into-independent-repository --strict`.