unoverse 0.1.143 → 0.1.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -212,7 +212,11 @@
|
|
|
212
212
|
echo "HTTP $RESULT"
|
|
213
213
|
[ "$RESULT" -ge 200 ] && [ "$RESULT" -lt 500 ]
|
|
214
214
|
loop:
|
|
215
|
-
|
|
215
|
+
# canvas.<domain>, NEVER the bare apex. Neither ground creates an apex record
|
|
216
|
+
# (aws/main.tf and digitalocean/main.tf publish api.<domain> and canvas.<domain>
|
|
217
|
+
# only), so `sub: ""` asked for a hostname that has no DNS at all and reported
|
|
218
|
+
# HTTP 000 FAILED on every healthy deploy.
|
|
219
|
+
- { name: "Canvas", sub: "canvas.", path: "/" }
|
|
216
220
|
- { name: "API Server", sub: "api.", path: "/health" }
|
|
217
221
|
register: domain_checks
|
|
218
222
|
ignore_errors: yes
|
package/operator/lib/deploy.sh
CHANGED
|
@@ -934,6 +934,25 @@ EOF
|
|
|
934
934
|
if [ -n "$smoke_api" ]; then
|
|
935
935
|
echo ""
|
|
936
936
|
info "Smoke-testing the deployed stack ${DIM}($smoke_api)${NC}"
|
|
937
|
+
# WAIT FOR STEADY STATE FIRST. A restart is ~36s of boot plus however many
|
|
938
|
+
# health-check intervals the load balancer needs to re-admit the droplet, and
|
|
939
|
+
# during that window EVERY api-side probe answers 503. The smoke test measures
|
|
940
|
+
# the stack's steady state, not the race — so it starts at the first 200 from
|
|
941
|
+
# /health THROUGH the balancer (which proves both the app and re-admission), and
|
|
942
|
+
# only a stack that never gets there fails. Observed live 2026-08-16: a healthy
|
|
943
|
+
# v1.13.79 deploy reported four FAILs and "fix forward or roll back", all of it
|
|
944
|
+
# re-admission lag. A false stop after the irreversible half is the worst kind.
|
|
945
|
+
local smoke_wait=0
|
|
946
|
+
until [ "$(curl -s -m 5 -o /dev/null -w '%{http_code}' "$smoke_api/health")" = 200 ]; do
|
|
947
|
+
if [ "$smoke_wait" -ge 180 ]; then
|
|
948
|
+
echo -e " ${RED}FAIL${NC} stack never became healthy (/health ≠ 200 after ${smoke_wait}s)"
|
|
949
|
+
smoke_fail=1
|
|
950
|
+
break
|
|
951
|
+
fi
|
|
952
|
+
[ "$smoke_wait" = 0 ] && echo -e " ${DIM}waiting for /health through the balancer (boot + LB re-admission)...${NC}"
|
|
953
|
+
sleep 5; smoke_wait=$((smoke_wait + 5))
|
|
954
|
+
done
|
|
955
|
+
[ "$smoke_fail" = 0 ] && [ "$smoke_wait" -gt 0 ] && echo -e " ${DIM}healthy after ${smoke_wait}s${NC}"
|
|
937
956
|
_smoke() { # name, then the test itself as "$@"
|
|
938
957
|
local name="$1"; shift
|
|
939
958
|
if "$@" >/dev/null 2>&1; then echo -e " ${GREEN}ok${NC} $name"
|
|
@@ -944,7 +963,11 @@ EOF
|
|
|
944
963
|
# Embed doorway is served AND compressed (identity-encoded JS was a live outage).
|
|
945
964
|
_smoke "embed.js gzipped" sh -c "curl -sf -m 10 -H 'accept-encoding: gzip' -D - '$smoke_api/embed.js' -o /dev/null | grep -qi '^content-encoding: gzip'"
|
|
946
965
|
# MCP lane accepts an initialize (every external connector dies here first).
|
|
947
|
-
|
|
966
|
+
# 200 (auth off) or 401 (auth on) prove the lane is ALIVE, the same judgement the
|
|
967
|
+
# database canary below makes. This used `curl -sf`, which fails on any error status,
|
|
968
|
+
# so a universe that boots "JWT enforced on /mcp" — every Cognito/AWS deployment —
|
|
969
|
+
# reported FAIL on a correctly protected endpoint and turned a healthy deploy red.
|
|
970
|
+
_smoke "MCP initialize" sh -c "code=\$(curl -s -m 10 -o /dev/null -w '%{http_code}' -X POST '$smoke_api/mcp' -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"smoke\",\"version\":\"0\"}}}'); [ \"\$code\" = 200 ] || [ \"\$code\" = 401 ]"
|
|
948
971
|
# Engine → Postgres canary: 200 (auth off) or 401 (auth on) prove the chain; a 500
|
|
949
972
|
# is the DB-unreachable incident that hides behind an otherwise healthy stack.
|
|
950
973
|
_smoke "engine reaches database" sh -c "code=\$(curl -s -m 10 -o /dev/null -w '%{http_code}' '$smoke_api/marketplace'); [ \"\$code\" = 200 ] || [ \"\$code\" = 401 ]"
|
package/package.json
CHANGED