From f2633f9bd0d0a3b1e71b62de463badb6de8f9a45 Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Fri, 26 Jun 2026 20:06:53 -0400 Subject: [PATCH] fix: don't crash-loop the box when no user mapping is configured (#25) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit seed_store.sh (ExecStartPost) exited 1 when it couldn't resolve a user_mappings entry, which — with Type=simple — fails the whole unit and crash-loops the box. This contradicts the script's own OSWE-SEED-03 precedent (the server-not-ready path exits 0 specifically to avoid a restart loop). A missing user mapping is a seeding gap, not an unhealthy server: the @openswe trigger just won't resolve a commenter, which a deployment-validation env (dev) does not need. Make it non-fatal — warn and skip the user_mappings seed; team_settings is still seeded and the service starts. The empty MAPPINGS array makes the seed loop a no-op. Set SEED_USER_MAPPINGS / CONFIGURED_ADMINS / OPENSWE_OWNER_LOGIN+EMAIL to seed it. Verified on the dev box: service active, langgraph bound to 127.0.0.1:2024 (loopback), /ok 200, /healthz 200. --- deploy/seahaven/seed_store.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deploy/seahaven/seed_store.sh b/deploy/seahaven/seed_store.sh index 1125a760..e3765917 100755 --- a/deploy/seahaven/seed_store.sh +++ b/deploy/seahaven/seed_store.sh @@ -122,9 +122,14 @@ elif [ -n "$ADMINS" ]; then [ -n "$_login" ] && [ -n "$_email" ] && MAPPINGS+=("${_login}:${_email}") fi +# No user mapping is NON-FATAL (OSWE-SEED-03 precedent: never fail the unit into a +# restart loop over a seeding gap — same as the server-not-ready path below). The +# server itself is healthy; an unseeded user_mappings table only means the @openswe +# trigger won't resolve a commenter, which a deployment-validation env (e.g. dev) +# does not need. team_settings is still seeded. Set SEED_USER_MAPPINGS (or +# CONFIGURED_ADMINS / OPENSWE_OWNER_LOGIN+EMAIL) to seed the mapping when wanted. if [ "${#MAPPINGS[@]}" -eq 0 ]; then - echo "seed_store: no user mapping resolved — set SEED_USER_MAPPINGS or OPENSWE_OWNER_LOGIN/EMAIL" >&2 - exit 1 + echo "seed_store: no user mapping resolved — skipping user_mappings seed (set SEED_USER_MAPPINGS or OPENSWE_OWNER_LOGIN/EMAIL to enable)" >&2 fi NOW="$(date -u +%Y-%m-%dT%H:%M:%S+00:00)"