Repository navigation
fix(chat): show no raw tool name or tool call in an answer, and say when the data's instructions weren't followed - #2061
Merged
Conversation
…hen the data's instructions weren't followed Co-Authored-By: Claude Opus 5.5 <[email protected]>
…p adds no second one Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
previously approved these changes
Nov 3, 2026
# Conflicts: # web/messages/en.json
8 of 13 tasks
8 of 13 tasks
gkhngyk
pushed a commit
that referenced
this pull request
Nov 3, 2026
… run makes (#2108) #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 #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: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three things the engine now fixes in a Chat answer, whatever the model wrote. Chat's model test set (W4-35) found each in real runs of GPT and Gemini models:
explain_change)" in a Turkish answer.to=functions.marker, the rest of that reply's text is dropped.INJECTION_NOTE). In the test set all six GPT and Gemini models skipped the line.chatEngine.answer.injectionNotice). If the model wrote the notice itself, in English or Turkish, no second one is added.The rules are in a new pure module,
web/src/lib/chat/answer-guards.ts.TextOutandfinishinengine.tsuse them. They apply to every model, Claude included.Related issue
None. Found by the Chat Wave 4 model test set (W4-35).
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
cd web && yarn vitest run src/lib/chat/answer-guards.test.ts src/lib/chat/engine.test.ts -t "puts right". Covered:No migration. No new environment variables. One new string in
web/messages/en.json. No Help change.Checklist
yarn lintpassesyarn typecheckpassesyarn format:checkpasseshelp/(or no user-visible change)CI passed on this branch (9f6283a), run on the fork (https://github.com/cihan-gyk/ansvisor/actions/runs/41599155172): schema is up to date; web
format:check, lint, typecheck, all tests andyarn buildpass; server lint,format:checkand all tests pass.🤖 Generated with Claude Code