From fd56f087c60d6841d150b6d127e0cc698d30d7bc Mon Sep 17 00:00:00 2001 From: john Date: Fri, 14 Aug 2026 22:23:07 +0800 Subject: [PATCH] fix(canary): reuse the healthy shared DeepSeek proxy on 18036 Stable 103 already runs deepseek-no-think on 18036. Require that contract instead of demanding a free port, so canary install does not fight production. Co-authored-by: Cursor --- release-gate/release-script.test.mjs | 1 + scripts/release-portal-canary-prod.sh | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/release-gate/release-script.test.mjs b/release-gate/release-script.test.mjs index da50bf3..1f03a0b 100644 --- a/release-gate/release-script.test.mjs +++ b/release-gate/release-script.test.mjs @@ -159,6 +159,7 @@ test('production canary keeps stable 8081 live and switches only after verified const deepseekCompatStart = source.indexOf( 'Start the DeepSeek tool-round compatibility proxy on 18036', ); + assert.match(source, /Reuse the already healthy DeepSeek compatibility proxy/); const proxyStart = source.indexOf('Start the fail-closed identity router on 18082'); const tunnelStart = source.indexOf('Start the isolated 105 reverse tunnel on 19082'); const edgeSwitch = source.indexOf( diff --git a/scripts/release-portal-canary-prod.sh b/scripts/release-portal-canary-prod.sh index 5ff80d6..fd8f5cf 100755 --- a/scripts/release-portal-canary-prod.sh +++ b/scripts/release-portal-canary-prod.sh @@ -206,7 +206,9 @@ ssh -o BatchMode=yes -o ConnectTimeout=15 "${HOST}" \ && test -x '${CANARY_AIDER_BIN}' \ && curl -fsS http://127.0.0.1:8081/api/status >/dev/null \ && ! lsof -nP -iTCP:${CANARY_PROXY_PORT} -sTCP:LISTEN >/dev/null 2>&1 \ - && ! lsof -nP -iTCP:${DEEPSEEK_COMPAT_PORT} -sTCP:LISTEN >/dev/null 2>&1 \ + && { ! lsof -nP -iTCP:${DEEPSEEK_COMPAT_PORT} -sTCP:LISTEN >/dev/null 2>&1 \ + || curl -fsS --max-time 5 http://127.0.0.1:${DEEPSEEK_COMPAT_PORT}/health \ + | grep -q '"deepseekThinking":"disabled"'; } \ && ! lsof -nP -iTCP:18081 -sTCP:LISTEN >/dev/null 2>&1 \ && ! lsof -nP -iTCP:18015 -sTCP:LISTEN >/dev/null 2>&1 \ && /opt/homebrew/bin/docker inspect goosed-prod-1 >/dev/null \ @@ -536,6 +538,9 @@ done sh -lc 'test -x /usr/local/bin/node && test -f /opt/portal/mindspace-sandbox-mcp.mjs' say "Start the DeepSeek tool-round compatibility proxy on 18036" +if deepseek_compat_healthy; then + say "Reuse the already healthy DeepSeek compatibility proxy on ${DEEPSEEK_COMPAT_PORT}" +else cat > "${DEEPSEEK_COMPAT_PLIST}" < @@ -564,6 +569,7 @@ for _ in $(seq 1 30); do sleep 1 done deepseek_compat_healthy +fi "${DOCKER_BIN}" exec goosed-prod-canary \ sh -lc "curl -fsS --max-time 5 http://host.docker.internal:${DEEPSEEK_COMPAT_PORT}/health \ | grep -q '\"deepseekThinking\":\"disabled\"'"