Compare commits

...

1 Commits

Author SHA1 Message Date
isep-hand ef75ac8034 reply-identity 測試不再真的在 inkstone/ISEP#30 留言(正門案例一律指到連不上的主機)
⑪「合規內文通過身份閘」之後 scripts/ticket 會真的往下打 API;舊版假設離線,
但在有 token 的機器上它打得出去:08-27~09-19 在 #30 留下 69 則
「【身份】subagent/inkstone/ISEP/feat/x 做完了」(最近一則 c9156 是 09-19 本機跑全套測試留下的)。
改法照 test-baton-handback-guard 等既有寫法:TICKET_HOST=http://127.0.0.1:9、假 token、不重試。
驗:真 token 在環境裡時跑一次,#30 留言數前後都是 116;11/11 通過。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 12:14:25 +08:00
+8 -2
View File
@@ -62,10 +62,16 @@ h 0 "⑦ 只是在講這件事(把端點寫進文件)而沒有 POST → 不
echo echo
echo "── 正門(scripts/ticket)───────────────────────────────────────" echo "── 正門(scripts/ticket)───────────────────────────────────────"
# 🔴 正門的案例一律指到連不上的主機(跟 test-baton-handback-guard 等同一個寫法)。
# ⑪ 是「合規內文通過身份閘」——通過之後 scripts/ticket 會真的往下打 API。
# 舊版假設「離線環境打不出去」,但在有 token 的機器上(本機 .env、雲端 env)它真的打得出去:
# 2026-08-27 到 09-19 在 inkstone/ISEP#30 留下 69 則「【身份】subagent/…/feat/x 做完了」。
OFF_ENV=(env TICKET_HOST=http://127.0.0.1:9 GITEA_TOKEN_CLAUDE_CODE=fake ISEP_API_RETRIES=0)
g() { # g <期望 exit> <說明> <內文> g() { # g <期望 exit> <說明> <內文>
want="$1"; desc="$2"; content="$3" want="$1"; desc="$2"; content="$3"
printf '%s' "$content" > "$TMP/body.md" printf '%s' "$content" > "$TMP/body.md"
err=$(python3 "$TICKET" say inkstone/ISEP#30 -F "$TMP/body.md" 2>&1 >/dev/null); rc=$? err=$("${OFF_ENV[@]}" python3 "$TICKET" say inkstone/ISEP#30 -F "$TMP/body.md" 2>&1 >/dev/null); rc=$?
if [ "$rc" -eq "$want" ]; then ok "$desc"; else if [ "$rc" -eq "$want" ]; then ok "$desc"; else
bad "$desc —— 期望 exit=$want,實得 exit=$rc" "$err"; fi bad "$desc —— 期望 exit=$want,實得 exit=$rc" "$err"; fi
} }
@@ -87,7 +93,7 @@ g 2 "⑩ 身份欄不在第一行 → 擋(要一眼看得到,不是藏在中
printf '%s' '【身份】subagentinkstone/ISEPfeat/x printf '%s' '【身份】subagentinkstone/ISEPfeat/x
做完了' > "$TMP/ok.md" 做完了' > "$TMP/ok.md"
err=$(python3 "$TICKET" say inkstone/ISEP#30 -F "$TMP/ok.md" 2>&1 >/dev/null || true) err=$("${OFF_ENV[@]}" python3 "$TICKET" say inkstone/ISEP#30 -F "$TMP/ok.md" 2>&1 >/dev/null || true)
if printf '%s' "$err" | grep -q '第一行要表明身份'; then if printf '%s' "$err" | grep -q '第一行要表明身份'; then
bad "⑪ 合規的內文被身份閘擋掉了(誤攔)" "$err" bad "⑪ 合規的內文被身份閘擋掉了(誤攔)" "$err"
else else