unoverse 0.1.142 → 0.1.143
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.
- package/operator/.env.example +6 -0
- package/operator/lib/deploy.sh +43 -0
- package/package.json +1 -1
package/operator/.env.example
CHANGED
|
@@ -67,3 +67,9 @@ AUTH_AUDIENCE=gravity-api
|
|
|
67
67
|
|
|
68
68
|
# Quick no-login mode (local only — production refuses to start with it):
|
|
69
69
|
# AUTH_ENABLED=false
|
|
70
|
+
|
|
71
|
+
# Node memoization (docs/unoverseCopilot/EXECUTION_EFFICIENCY.md §3). OFF by default.
|
|
72
|
+
# Cacheable nodes (capabilities.cacheable in the node YAML) reuse a prior run's output when
|
|
73
|
+
# the fingerprint matches — saves re-running expensive parses/scrapes across test cycles.
|
|
74
|
+
# WORKFLOW_NODE_MEMOIZATION=true
|
|
75
|
+
# WORKFLOW_NODE_MEMOIZATION_TTL_MS=21600000
|
package/operator/lib/deploy.sh
CHANGED
|
@@ -918,6 +918,49 @@ EOF
|
|
|
918
918
|
|
|
919
919
|
rm -f "$tmp_inventory"
|
|
920
920
|
|
|
921
|
+
# ── POST-DEPLOY SMOKE ───────────────────────────────────────────────────────
|
|
922
|
+
# The deployed stack, probed from the outside. SELF-CONTAINED (curl only): this script
|
|
923
|
+
# is vendored into the operator CLI and runs in a universe folder, so it can lean on no
|
|
924
|
+
# repo test suite. Every check is an outage that shipped and was found by hand: the
|
|
925
|
+
# blank canvas (uncompressed/uncached bundle, 2026-08-15), the no-login boot (empty
|
|
926
|
+
# auth config, 2026-08-14), and the engine→Postgres 500 behind a healthy-looking stack
|
|
927
|
+
# (Trusted Sources, 2026-08-13). The repo twin with more detail lives at
|
|
928
|
+
# apps/canvas/tests/smoke/deployed.test.ts.
|
|
929
|
+
# Runs on the plain deploy only — init/db/harden are not "the site is live" moments.
|
|
930
|
+
if [ -z "$subcommand" ] || [ "$subcommand" = "deploy" ]; then
|
|
931
|
+
local smoke_canvas smoke_api smoke_fail=0
|
|
932
|
+
smoke_canvas=$(terraform -chdir="$ROOT/infra/$cloud" output -raw canvas_url 2>/dev/null)
|
|
933
|
+
smoke_api=$(terraform -chdir="$ROOT/infra/$cloud" output -raw api_url 2>/dev/null)
|
|
934
|
+
if [ -n "$smoke_api" ]; then
|
|
935
|
+
echo ""
|
|
936
|
+
info "Smoke-testing the deployed stack ${DIM}($smoke_api)${NC}"
|
|
937
|
+
_smoke() { # name, then the test itself as "$@"
|
|
938
|
+
local name="$1"; shift
|
|
939
|
+
if "$@" >/dev/null 2>&1; then echo -e " ${GREEN}ok${NC} $name"
|
|
940
|
+
else echo -e " ${RED}FAIL${NC} $name"; smoke_fail=1; fi
|
|
941
|
+
}
|
|
942
|
+
# Universe discovery answers (the connector's first question).
|
|
943
|
+
_smoke "universe discovery" curl -sf -m 10 "$smoke_api/.well-known/unoverse-universe" -o /dev/null
|
|
944
|
+
# Embed doorway is served AND compressed (identity-encoded JS was a live outage).
|
|
945
|
+
_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
|
+
# MCP lane accepts an initialize (every external connector dies here first).
|
|
947
|
+
_smoke "MCP initialize" sh -c "curl -sf -m 10 -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\"}}}' -o /dev/null"
|
|
948
|
+
# Engine → Postgres canary: 200 (auth off) or 401 (auth on) prove the chain; a 500
|
|
949
|
+
# is the DB-unreachable incident that hides behind an otherwise healthy stack.
|
|
950
|
+
_smoke "engine reaches database" sh -c "code=\$(curl -s -m 10 -o /dev/null -w '%{http_code}' '$smoke_api/marketplace'); [ \"\$code\" = 200 ] || [ \"\$code\" = 401 ]"
|
|
951
|
+
if [ -n "$smoke_canvas" ]; then
|
|
952
|
+
# The canvas page and the hashed bundle it names: present, compressed, cacheable.
|
|
953
|
+
_smoke "canvas page + compressed bundle" sh -c "asset=\$(curl -sf -m 10 '$smoke_canvas/' | grep -o '/assets/index-[^\"]*\.js' | head -1); [ -n \"\$asset\" ] && curl -sf -m 20 -H 'accept-encoding: gzip' -D - \"$smoke_canvas\$asset\" -o /dev/null | grep -qi '^content-encoding: gzip'"
|
|
954
|
+
# Empty auth values in config.js = the no-login boot where every call 401s.
|
|
955
|
+
_smoke "canvas auth config present" sh -c "! curl -sf -m 10 '$smoke_canvas/config.js' | grep -qE '(issuer|clientId): *\"\"'"
|
|
956
|
+
fi
|
|
957
|
+
if [ "$smoke_fail" = 1 ]; then
|
|
958
|
+
fail "Deploy finished but the smoke test FAILED — the stack above is live and misbehaving. Fix forward or roll back."
|
|
959
|
+
exit 1
|
|
960
|
+
fi
|
|
961
|
+
fi
|
|
962
|
+
fi
|
|
963
|
+
|
|
921
964
|
echo ""
|
|
922
965
|
echo -e " ${GREEN}${BOLD}Done${NC} ${DIM}in $(timer_elapsed)${NC}"
|
|
923
966
|
echo ""
|
package/package.json
CHANGED