fix(acr): AGT findings humanize to "Wasted tokens" not "Other" (M-BUG-17)
The agent-listing scanner (AGT) emits an always-loaded per-turn token cost
("Agent description is long, re-sent every turn in the always-loaded listing";
scanner category 'token-efficiency', "the dominant single always-loaded
source"). But SCANNER_TO_CATEGORY in humanizer.mjs had no AGT entry, so its
findings fell through to the 'Other' fallback (humanizer.mjs:140) — a bucket
that isn't even in the analyzer-agent's category list. Neither the scanner
prefix nor the per-finding category ('token-efficiency' is not in
CATEGORY_TO_IMPACT) resolved AGT to its true impact.
Same class as M-BUG-16/15: a finding type without its matching humanizer
mapping landing on a default that mismatches its own evidence. The analogous
SKL body finding correctly buckets "Wasted tokens"; AGT (the same always-loaded
token-waste mechanism) silently landed under the meaningless "Other".
Found during analyze-prep premise-verification of the linkedin-posts scan: the
3 AGT findings bucketed "Other" while the analogous SKL findings bucketed
"Wasted tokens".
Fix: add AGT: 'Wasted tokens' to SCANNER_TO_CATEGORY, alongside TOK/CPS/SKL.
RED-first (extended the Wasted-tokens category test to include AGT; the 'Other'
fallback test still uses a synthetic 'XXX' scanner, unaffected). Frozen v5.0.0
untouched (AGT post-dates it; humanizer bypassed for --raw/--json); no
default-output snapshot contains AGT -> 0 regen. Suite 1359/0.
Verified end-to-end on linkedin-posts: 3 AGT findings now "Wasted tokens", 0
"Other" remaining, 28 findings unchanged (category-only). All 16 orchestrator
scanner prefixes now covered by the category map (class closed).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01683eAqVecv9VZfQzL8CQ9h
This commit is contained in:
parent
239e88cecb
commit
97867dbf37
2 changed files with 7 additions and 3 deletions
|
|
@ -38,6 +38,7 @@ const SCANNER_TO_CATEGORY = {
|
|||
TOK: 'Wasted tokens',
|
||||
CPS: 'Wasted tokens',
|
||||
SKL: 'Wasted tokens',
|
||||
AGT: 'Wasted tokens',
|
||||
DIS: 'Dead config',
|
||||
GAP: 'Missed opportunity',
|
||||
PLH: 'Configuration mistake',
|
||||
|
|
|
|||
|
|
@ -205,10 +205,13 @@ test('humanizeFinding sets category Conflict for CNF/COL', () => {
|
|||
}
|
||||
});
|
||||
|
||||
test('humanizeFinding sets category Wasted tokens for TOK/CPS/SKL', () => {
|
||||
for (const s of ['TOK', 'CPS', 'SKL']) {
|
||||
test('humanizeFinding sets category Wasted tokens for TOK/CPS/SKL/AGT', () => {
|
||||
// AGT (agent-listing budget) is an always-loaded per-turn token cost — the
|
||||
// agent name+description is re-sent every turn in the listing — so it belongs
|
||||
// in "Wasted tokens" alongside TOK/CPS/SKL, not the 'Other' fallback (M-BUG-17).
|
||||
for (const s of ['TOK', 'CPS', 'SKL', 'AGT']) {
|
||||
const out = humanizeFinding(makeFinding({ scanner: s }));
|
||||
assert.equal(out.userImpactCategory, 'Wasted tokens');
|
||||
assert.equal(out.userImpactCategory, 'Wasted tokens', `${s} should map to Wasted tokens`);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue