Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

fix(service): bound lifecycle exclusion wait

Rahman82d3b1592415
diff --git a/bin/mso b/bin/mso
index 552e19fb..d3278613 100755
--- a/bin/mso
+++ b/bin/mso
@@ -256,7 +256,7 @@ service_restore_fallback_after_failure() {
service_lifecycle_safe() {
local verb="$1" rc=0 active=0
require_service_checkout_cli
- runtime_exclusion_acquire_exclusive \
+ runtime_exclusion_acquire_service \
|| die "offline update/deploy is mutating this checkout or another service handoff is active; retry after it finishes"
service_manager_read is-active --quiet mso.service && active=1 || true
SERVICE_FALLBACK_QUIESCED=0; SERVICE_HANDOFF_URL=''; SERVICE_HANDOFF_MARKER=''
diff --git a/scripts/lib/runtime-exclusion.sh b/scripts/lib/runtime-exclusion.sh
index 97b10733..8afc7bfc 100755
--- a/scripts/lib/runtime-exclusion.sh
+++ b/scripts/lib/runtime-exclusion.sh
@@ -42,6 +42,13 @@ runtime_exclusion_acquire_exclusive() {
runtime_exclusion_acquire exclusive "${MSO_RUNTIME_EXCLUSION_UPDATE_TIMEOUT_SECONDS:-900}"
}
+runtime_exclusion_acquire_service() {
+ # Service start/restart must serialize exclusively with builds and fallback
+ # runtimes, but it is an interactive lifecycle action: use the bounded
+ # service timeout rather than waiting for the updater's long transaction window.
+ runtime_exclusion_acquire exclusive "${MSO_RUNTIME_EXCLUSION_TIMEOUT_SECONDS:-12}"
+}
+
runtime_exclusion_release() {
[ "$RUNTIME_EXCLUSION_HELD" = 1 ] || return 0
if [ -n "${RUNTIME_EXCLUSION_FD:-}" ]; then