From 16c0704c47d405f9f1a4483b5ce91898a98def55 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 31 Oct 2026 11:24:59 +0800 Subject: [PATCH] =?UTF-8?q?chore(scripts):=20baseline-smoke=20=E4=BC=98?= =?UTF-8?q?=E5=85=88=20debug=E3=80=81=E5=9B=9E=E8=90=BD=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 只 build 过 release 时尺子也能跑(之前硬编码 debug 路径会误报"找不到探针") - CLAUDE.md 补上探针的构建命令 --- CLAUDE.md | 1 + scripts/baseline-smoke.sh | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index c9de2ea..5955aa8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -285,6 +285,7 @@ bash scripts/check-naming.sh # 内部标识剥离(NM1–NM3 阻断 / bash scripts/check-naming.sh --strict # 注释里的原厂名也算红(技术债清零时用) bash scripts/mcp-smoke.sh # MCP 工具层契约 32 条(4 元工具 + 分层加载 + 授权闭环 + prompts) bash scripts/baseline-smoke.sh # 双后端契约 10 条(HTTP 适配器 + 形状归一化) +cargo build -p sspf-adapter-baseline --example probe # baseline-smoke 依赖的探针 bash scripts/mem-budget.sh # 空载内存实测(P0 出口判据,预算 40 MB) cargo test -p sspf-pack-asset # 业务包独立可编(业务包剥离的硬证据) ./target/release/ssw-platform --mcp # 起 MCP stdio 服务(供 AI 直接驱动,见 docs/mcp.md) diff --git a/scripts/baseline-smoke.sh b/scripts/baseline-smoke.sh index c30a073..56d6257 100755 --- a/scripts/baseline-smoke.sh +++ b/scripts/baseline-smoke.sh @@ -26,8 +26,11 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)" cd "$ROOT" || exit 1 PORT="${1:-30993}" +# 优先 debug(开发期常用),回落到 release BIN="$ROOT/target/debug/ssw-platform" +[ -x "$BIN" ] || BIN="$ROOT/target/release/ssw-platform" PROBE="$ROOT/target/debug/examples/probe" +[ -x "$PROBE" ] || PROBE="$ROOT/target/release/examples/probe" PASS=0 FAIL=0 @@ -36,11 +39,11 @@ ok() { PASS=$((PASS + 1)); printf '✅ %s\n' "$1"; } bad() { FAIL=$((FAIL + 1)); printf '❌ %s\n' "$1"; } if [ ! -x "$BIN" ]; then - echo "❌ 找不到 $BIN(先 cargo build)" + echo "❌ 找不到 ssw-platform 二进制(先 cargo build)" exit 1 fi if [ ! -x "$PROBE" ]; then - echo "❌ 找不到 $PROBE(先 cargo build -p sspf-adapter-baseline --example probe)" + echo "❌ 找不到 probe 探针(先 cargo build -p sspf-adapter-baseline --example probe)" exit 1 fi