test(agent-eval): count blocked CLI attempts apart from real contamination (CG-7)

The hook denies the invocation, so a denied attempt puts no codegraph output in
the window and must not disqualify the run -- only a call that actually returned
content does. Attempts are still reported, since an agent hunting for the CLI is
worth seeing.
This commit is contained in:
Colby McHenry
2026-08-04 16:46:30 -05:00
parent e35d4861e0
commit 1d333017a8
2 changed files with 14 additions and 6 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ function parse(dir, label) {
const o = s.occupancy;
return {
dur: s.dur, tools: s.tools, reads: s.reads, grep: s.grep, cg: s.cg,
bash: s.counts.Bash || 0, cliCalls: s.cliCalls,
bash: s.counts.Bash || 0, cliCalls: s.cliCalls, cliContaminated: s.cliContaminated,
tokens: s.processed, cost: s.cost, raced: s.raced, turns: s.turns,
segments: files.length,
ctx: o.ctxFinal,
@@ -81,7 +81,7 @@ for (const repo of REPOS) {
if (w) { if (w.raced && !includeRaced) racedExcluded++; else W.push(w); }
const wo = parse(join(dir, rd), 'headless-without');
if (wo) {
if (wo.cliCalls && !includeContaminated) { contaminated++; console.error(`[excluded] ${repo}/${rd} without-arm ran the codegraph CLI ${wo.cliCalls}x`); }
if (wo.cliContaminated && !includeContaminated) { contaminated++; console.error(`[excluded] ${repo}/${rd} without-arm got codegraph CLI output ${wo.cliContaminated}x`); }
else WO.push(wo);
}
}