diff --git a/scanners/lib/humanizer.mjs b/scanners/lib/humanizer.mjs index be4f788..ddb0da7 100644 --- a/scanners/lib/humanizer.mjs +++ b/scanners/lib/humanizer.mjs @@ -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', diff --git a/tests/lib/humanizer.test.mjs b/tests/lib/humanizer.test.mjs index c426c93..6b8f64c 100644 --- a/tests/lib/humanizer.test.mjs +++ b/tests/lib/humanizer.test.mjs @@ -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`); } });