Skip to content

Commit 2011328

Browse files
stubbiclaude
andauthored
fix: bootstrap job uses wrong health endpoint (#21)
fix: use /api/health/details for bootstrap status check The bootstrap job checked /api/health which only returns {status, version}. The bootstrapStatus field is only available on /api/health/details (the authenticated endpoint). This caused the "already bootstrapped?" check to always fail, falling through to bootstrap-ceo which errors because the admin already exists. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f4a637b commit 2011328

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

internal/resources/bootstrap.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ else
107107
fi
108108
109109
# Step 2: Check if instance is already bootstrapped
110-
HEALTH=$(curl -sS -c "$COOKIE_JAR" -b "$COOKIE_JAR" "$SERVER_URL/api/health" 2>/dev/null) || true
110+
# Use /api/health/details (authenticated) which includes bootstrapStatus;
111+
# the plain /api/health endpoint does not return this field.
112+
HEALTH=$(curl -sS -c "$COOKIE_JAR" -b "$COOKIE_JAR" "$SERVER_URL/api/health/details" 2>/dev/null) || true
111113
if echo "$HEALTH" | grep -q '"bootstrapStatus":"ready"'; then
112114
echo "Instance already bootstrapped. Nothing to do."
113115
rm -f "$COOKIE_JAR"

0 commit comments

Comments
 (0)