From fa4f841fe6cbadbe8f0f7e21615edfbe71fefa05 Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Wed, 18 Nov 2026 17:01:10 +0000 Subject: [PATCH] =?UTF-8?q?scripts:=20check-config-sync=20=E2=80=94=20comp?= =?UTF-8?q?are=20repo=20librechat.yaml=20to=20the=20live=20mounted=20confi?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/check-config-sync.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/check-config-sync.sh diff --git a/scripts/check-config-sync.sh b/scripts/check-config-sync.sh new file mode 100755 index 0000000..9d22c1d --- /dev/null +++ b/scripts/check-config-sync.sh @@ -0,0 +1,12 @@ +# Fail if the live chat config differs from this repo's librechat.yaml. +# Config is data (/app/data/librechat.yaml), so the image tag may lag main — this is +# the check that actually matters. +set -euo pipefail +APP="${CHAT_APP:-4023ccbf-d57a-4500-97df-14de9cf3516e}" +REPO_HASH=$(sha256sum librechat.yaml | cut -c1-16) +LIVE_HASH=$(printf 'import hashlib;print(hashlib.sha256(open("/app/data/librechat.yaml","rb").read()).hexdigest()[:16])' > /tmp/_h.py + cloudron --server "${CLOUDRON_SERVER:-my.inference.coop}" --token "$CLOUDRON_TOKEN" push --app "$APP" /tmp/_h.py /tmp/_h.py >/dev/null + cloudron --server "${CLOUDRON_SERVER:-my.inference.coop}" --token "$CLOUDRON_TOKEN" exec --app "$APP" python3 /tmp/_h.py | tr -d '\r') +echo "repo=$REPO_HASH live=$LIVE_HASH" +[ "$REPO_HASH" = "$LIVE_HASH" ] || { echo "DRIFT: deploy librechat.yaml (push to /app/data) before assuming main is live"; exit 1; } +echo "OK: live config matches repo main"