Skip to content

test(agents): catch a tool name the answer's mask leaves, in what the run makes - #2108

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/agent-eval-tool-name-test
Nov 3, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/agent-eval-tool-name-test

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Fixes main's red CI after #2072. Since #2061, the engine masks a tool's name in Chat's answer. The agents' test set (#2072) had a scripted test that expected its "no tool names or ids shown" check to fail on a tool name in the answer, so it failed on main.

The test keeps its purpose: a tool name that gets past the answer's mask is still caught.

  • The scripted run now also writes the name into a draft's page, which the engine doesn't mask.
  • The test checks that the answer is masked, that the leak check fails on the draft and names the tool, and that the brand check still fails on the other brand.

Related issue

None. Main's CI after #2072 and #2061.

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

cd web && yarn vitest run src/lib/chat/agent-eval.test.ts: 9 tests pass, 1 skipped (the real-model group).

Checklist

  • Branch follows the naming convention
  • Commits follow Conventional Commits
  • yarn lint passes (eslint clean on the changed file)
  • yarn typecheck passes (in the fork's CI)
  • yarn format:check passes
  • Changes are focused — one concern per PR
  • Help article updated under help/ (or no user-visible change)

CI passed on this branch (39b5c27), run on the fork (https://github.com/cihan-gyk/ansvisor/actions/runs/41725152325): schema is up to date; web format:check, lint, typecheck, all tests and yarn build pass; server lint, format:check and all tests pass.

🤖 Generated with Claude Code

… run makes

ansvisor#2061 masks a tool's name in Chat's answer, so the harness test that
expected the leak check to fail on the answer went red on main after ansvisor#2072.
The test now writes the name into a draft's page, which the engine doesn't
mask, and checks the answer is masked and the leak check still fails there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@gkhngyk
gkhngyk merged commit fb6a3a6 into ansvisor:main Nov 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants