From d43d4394d741fd5711a1cfb9922c189c22b8e64a Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Thu, 8 Oct 2026 18:53:39 +0000 Subject: [PATCH] publish-jobs: `restart --what app` is refused unless --allow-app-restart (PC 1, 6 October 2026 19:10Z and 8 October 14:50Z: on a 0.3.x engine the restart kind leaves a relaunch helper racing the window host for the single instance; it lost both times, the app down for hours with the whole queue behind it; the fix, the host's ladder with no helper, is v2.0.0's restart-kind-20). The flag is the publisher's word that the target's last upload reads 2.0.0 or later; the node and miners restarts are unchanged. Known-failed first: the shape that hit PC 1 now exits 2 with the reason Co-Authored-By: Claude Fable 5.1 --- packaging/ota/publish-jobs.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packaging/ota/publish-jobs.sh b/packaging/ota/publish-jobs.sh index e1fba7a81..df56e3f9f 100755 --- a/packaging/ota/publish-jobs.sh +++ b/packaging/ota/publish-jobs.sh @@ -96,6 +96,7 @@ while [ $# -gt 0 ]; do --glob) GLOBS+=("$2"); shift 2 ;; --command) COMMAND="$2"; shift 2 ;; --what) WHAT="$2"; shift 2 ;; + --allow-app-restart) ALLOW_APP_RESTART=1; shift ;; --zip) ZIP="$2"; shift 2 ;; --fixtures) FIXTURES="$2"; shift 2 ;; --cap-minutes) CAP_MIN="$2"; shift 2 ;; @@ -117,6 +118,14 @@ while [ $# -gt 0 ]; do *) echo "unknown argument: $1" >&2; exit 2 ;; esac done +# restart --what app (PC 1, 6 October 2026 19:10Z and 8 October 14:50Z): on a 0.3.x engine the restart kind leaves a relaunch +# helper racing the window host for the single instance, and it lost both times, the app down for hours with the whole queue +# behind it; the fix (the host's ladder, no helper) is v2.0.0's. An app restart is refused here unless --allow-app-restart +# says the target runs 2.0.0 or later (the publisher's word: the engine cannot be asked from here). +if [ "$CMD" = add ] && [ "${KIND:-}" = restart ] && [ "${WHAT:-app}" = app ] && [ "${ALLOW_APP_RESTART:-0}" != 1 ]; then + echo "refused: restart --what app is the losing race on a 0.3.x engine (PC 1, 6 and 8 October 2026); pass --allow-app-restart only when the target's last upload reads 2.0.0 or later (restart-kind-20), or restart the node or the miners instead" >&2 + exit 2 +fi case "$CMD" in add|list|remove|sign|verify) ;; *) sed -n '2,35p' "$0" | sed 's/^# \{0,1\}//'; exit 2 ;; esac [ -f "$KEY" ] || { echo "no $KEY (see packaging/ota/README.md, Keys)" >&2; exit 1; }