File size: 1,799 Bytes
c7df3c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""Pull the actual sentences agents wrote around each deflation hit."""
import glob, json, os, re

BASE = r"C:\Users\acer\.claude\projects\C--Users-acer"
PATS = ["does not exist", "doesn't exist", "not real", "fabricated", "no evidence",
        "placeholder", "decorative", "not materialized", "aspirational", "fictional",
        "just a hash", "is a stub", "stubbed", "simulated", "mock", "no such",
        "unverifiable", "does not actually"]

hits = []
for f in glob.glob(os.path.join(BASE, "**", "agent-*.jsonl"), recursive=True):
    try:
        raw = open(f, encoding="utf-8", errors="replace").read()
    except Exception:
        continue
    for line in raw.splitlines():
        try:
            r = json.loads(line)
        except Exception:
            continue
        if r.get("type") != "assistant":
            continue
        c = (r.get("message") or {}).get("content")
        if not isinstance(c, list):
            continue
        for b in c:
            if not (isinstance(b, dict) and b.get("type") == "text"):
                continue
            txt = b.get("text", "")
            for sent in re.split(r"(?<=[.!?\n])\s+", txt):
                s = sent.strip()
                if not (20 < len(s) < 300):
                    continue
                low = s.lower()
                for p in PATS:
                    if p in low:
                        hits.append((os.path.basename(f)[:22], p, " ".join(s.split())))
                        break

seen, uniq = set(), []
for f, p, s in hits:
    k = s.lower()
    if k in seen:
        continue
    seen.add(k)
    uniq.append((f, p, s))

print("HITS|raw=%d|unique_sentences=%d|json=0" % (len(hits), len(uniq)))
print()
for f, p, s in uniq:
    print("HIT|pattern=%s|agent=%s|json=0" % (p, f))
    print("   %s" % s)