← back to Model Arena
Add durable keepalive wrapper + launchd plist draft (paused, fail-closed)
01836312c1ecf3f96cd684113831c9909e6b9306 · 2026-09-23 09:05:17 -0700 · Steve Abrams
Wrapper sources .env and starts server paused (ARENA_PAUSED=1 + sentinel).
Plist is RunAtLoad+KeepAlive. Install stays a Steve-gated launchctl paste
(drafted to pending-approval/model-arena-keepalive-plist.md).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
A deploy/com.steve.model-arena.plistA scripts/keepalive-server.sh
Diff
commit 01836312c1ecf3f96cd684113831c9909e6b9306
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Sep 23 09:05:17 2026 -0700
Add durable keepalive wrapper + launchd plist draft (paused, fail-closed)
Wrapper sources .env and starts server paused (ARENA_PAUSED=1 + sentinel).
Plist is RunAtLoad+KeepAlive. Install stays a Steve-gated launchctl paste
(drafted to pending-approval/model-arena-keepalive-plist.md).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
deploy/com.steve.model-arena.plist | 17 +++++++++++++++++
scripts/keepalive-server.sh | 17 +++++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/deploy/com.steve.model-arena.plist b/deploy/com.steve.model-arena.plist
new file mode 100644
index 0000000..edf1115
--- /dev/null
+++ b/deploy/com.steve.model-arena.plist
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Label</key><string>com.steve.model-arena</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/bin/bash</string>
+ <string>/Users/macstudio3/Projects/model-arena/scripts/keepalive-server.sh</string>
+ </array>
+ <key>RunAtLoad</key><true/>
+ <key>KeepAlive</key><true/>
+ <key>StandardOutPath</key><string>/tmp/model-arena.log</string>
+ <key>StandardErrorPath</key><string>/tmp/model-arena.log</string>
+ <key>ProcessType</key><string>Background</string>
+</dict>
+</plist>
diff --git a/scripts/keepalive-server.sh b/scripts/keepalive-server.sh
new file mode 100644
index 0000000..55139a8
--- /dev/null
+++ b/scripts/keepalive-server.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+# Durable keepalive launcher for model-arena — PAUSED BY DEFAULT (DTD verdict 2026-09-23).
+#
+# Pause is enforced by TWO independent, fail-closed guards (see server.js isPaused()):
+# 1. the ARENA_PAUSED=1 export below (baked into the launcher), and
+# 2. the live ~/.claude/model-arena.PAUSED sentinel file, re-checked at EVERY spend decision.
+# Either one present => paused => zero metered LLM spend. This is deliberate: a KeepAlive
+# service must never be able to silently resurrect a *spending* arena after a crash.
+#
+# To UNPAUSE (a deliberate TWO-step override, by design):
+# 1. comment out the `export ARENA_PAUSED=1` line below, AND
+# 2. rm ~/.claude/model-arena.PAUSED
+# then: launchctl kickstart -k gui/$(id -u)/com.steve.model-arena
+cd /Users/macstudio3/Projects/model-arena || exit 1
+set -a; [ -f .env ] && . ./.env; set +a
+export ARENA_PAUSED=1
+exec node server.js
← a1b5af2 Harden ARENA_PAUSED to fail-closed (Cody/DTD): live sentinel
·
back to Model Arena
·
Add one-shot install-keepalive.sh so the launchd install pas 34d6cce →