Reset reused watcher state before starting a new ATVM run

- update the watcher start helper to stop any stale watcher instance for the same requested parent build name and remove its old state directory before starting fresh
- document that reused parent build names must not inherit stale cancelled, posted, state.json, or subruns state from older runs
- update the watcher install and design docs so the controller workflow explicitly treats stale reused-build-name state as part of startup cleanup
This commit is contained in:
2026-03-26 11:30:28 -04:00
parent dda0a0b4c0
commit f5849dde0c
4 changed files with 15 additions and 0 deletions

View File

@@ -49,6 +49,8 @@ if [[ -z "$BUILD_NAME" ]]; then
fi
RUN_DIR="${STATE_ROOT}/${BUILD_NAME}"
systemctl stop "atvm-run-watcher@${BUILD_NAME}.service" >/dev/null 2>&1 || true
rm -rf "$RUN_DIR"
mkdir -p "$RUN_DIR"
cat >"${RUN_DIR}/watch.env" <<EOF