Normalize fullwidth punctuation to ASCII across codebase.

Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-08 23:42:26 +08:00
parent aaa72c7961
commit b733e551a0
392 changed files with 71522 additions and 71369 deletions
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# 在服务器上检查中控是否为最新代码无 api_trade_key已装 multipart进程可访问
# 在服务器上检查中控是否为最新代码(无 api_trade_key,已装 multipart,进程可访问)
set -euo pipefail
HUB_DIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$HUB_DIR"
@@ -13,14 +13,14 @@ PING_URL="http://127.0.0.1:${HUB_PORT}/api/ping"
echo "=== hub.py 检查 ==="
if grep -n 'def api_trade_key' hub.py 2>/dev/null; then
echo "FAIL: 仍是旧版 hub.py含 api_trade_key),请 git pull"
echo "FAIL: 仍是旧版 hub.py(含 api_trade_key),请 git pull"
exit 1
fi
if ! grep -q 'HUB_BUILD' hub.py; then
echo "FAIL: hub.py 缺少 HUB_BUILD 标记"
exit 1
fi
echo "OK: 无 api_trade_key含 HUB_BUILD"
echo "OK: 无 api_trade_key,含 HUB_BUILD"
echo "=== python-multipart ==="
# shellcheck source=/dev/null
@@ -29,7 +29,7 @@ python -c "import multipart; print('OK:', multipart.__version__)"
echo "=== 端口 ${HUB_PORT} ==="
if command -v ss >/dev/null 2>&1; then
ss -ltn | grep -E ":${HUB_PORT}\\b" || echo "WARN: 未监听 ${HUB_PORT}请 pm2 restart manual-trading-hub"
ss -ltn | grep -E ":${HUB_PORT}\\b" || echo "WARN: 未监听 ${HUB_PORT},请 pm2 restart manual-trading-hub"
elif command -v netstat >/dev/null 2>&1; then
netstat -ltn | grep -E ":${HUB_PORT}\\b" || echo "WARN: 未监听 ${HUB_PORT}"
else
@@ -51,10 +51,10 @@ if [[ "${HTTP_CODE}" == "200" ]]; then
if grep -q '20260521-no-trade-ui' /tmp/hub_ping_body.txt; then
echo "OK: build 正确"
else
echo "WARN: build 字段不是 20260521-no-trade-ui请 pm2 restart manual-trading-hub"
echo "WARN: build 字段不是 20260521-no-trade-ui,请 pm2 restart manual-trading-hub"
fi
else
echo "FAIL: ping 未返回 200常见原因进程未启动或崩溃"
echo "FAIL: ping 未返回 200.常见原因:进程未启动或崩溃."
echo " 执行: pm2 restart manual-trading-hub && sleep 2 && bash scripts/verify_hub_deploy.sh"
exit 1
fi