fix(effort): re-raise judgment dispatches, planning re-asserts, pairing caveat, dedupe audit script (final review I1-I3)

This commit is contained in:
bastien
2026-09-28 20:48:27 +02:00
parent a3b479e984
commit 58c3a3e9b7
18 changed files with 57 additions and 23 deletions
+8 -1
View File
@@ -26,7 +26,10 @@ def usage_row(usage):
def scan(path, scope, agg):
"""Add every assistant record of one transcript to agg."""
"""Add every assistant record of one transcript to agg, once per
message id (the transcript writes one record per content block,
all sharing the same id and usage)."""
seen = set()
with open(path, errors="ignore") as handle:
for line in handle:
try:
@@ -36,6 +39,10 @@ def scan(path, scope, agg):
msg = rec.get("message") or {}
if rec.get("type") != "assistant" or not msg.get("usage"):
continue
mid = msg.get("id")
if mid in seen:
continue
seen.add(mid)
sub = scope == "sub" or bool(rec.get("isSidechain"))
key = ("sub" if sub else "main",
str(msg.get("model", "?")).replace("claude-", ""),