Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0bafdf141f |
@@ -118,10 +118,24 @@ if not ok_hits and not ng_hits:
|
||||
print("SKIP:no-claims"); raise SystemExit
|
||||
|
||||
sid = (d.get("session_id") or "nosid")[:8]
|
||||
aid = (d.get("agent_id") or d.get("subagent_id") or "")[:10]
|
||||
stamp = hashlib.sha1((tp + sid + aid).encode()).hexdigest()[:8]
|
||||
|
||||
# 2026-08-20 修:檔名原本 hash (transcript_path + session_id + agent_id)
|
||||
# => 每個新 agent 拿到新檔名,但抽出的宣稱是同一批(取 transcript 最後一個
|
||||
# <result>,那個可能是舊的——檔頭 08-18 註解已記過同源問題)。
|
||||
# 實害:同兩條宣稱一天內產了 6 張不同 hash 的單,總管每回合重做一次已驗完的事。
|
||||
# => InkStoneCo#48:「永遠在誤響的警報,等於訓練人忽略這個警報」。
|
||||
# 改成 hash 宣稱內容本身,且已驗歸檔的直接跳過。
|
||||
claims_sig = "\n".join(sorted(ok_hits + ng_hits))
|
||||
stamp = hashlib.sha1(claims_sig.encode()).hexdigest()[:8]
|
||||
path = os.path.join(os.environ["DIR"], "claims-%s-%s.md" % (sid, stamp))
|
||||
|
||||
_vdir = os.path.join(os.path.dirname(os.environ["DIR"]), "verified-claims")
|
||||
if os.path.isdir(_vdir):
|
||||
for _f in os.listdir(_vdir):
|
||||
if stamp in _f:
|
||||
print("SKIP:already-verified:%s" % stamp)
|
||||
raise SystemExit
|
||||
|
||||
def block(title, items, howto, cap):
|
||||
if not items:
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user