fix(chat): the delete consent check knows the pending message and reads the whole reply

The consent classifier is now told which message and channel are pending, so a yes for another
message ("yes, delete message 22" while 21 is pending) is a no and cancels the request. A reply
longer than 600 characters is no longer cut and judged by its start (which could drop a later
"don't"); it counts as no without a model call.

Eval evals/test_chat_delete_consent.py gains the different-message and long-reply cases:
17/17 on qwen2.5:7b, three runs. The previous prompt said YES 3/3 to
"응, 일정 채널에 있는 거 지워" while a message in 잡담 was pending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-11 15:26:58 +09:00
parent 0182823592
commit 4621e6c1fd
5 changed files with 70 additions and 21 deletions

View File

@@ -17,9 +17,11 @@ written, send, edit its own messages, react, delete and pin. Product rules: `doc
`confirm=true` in the person's very next turn **and** their own message of that turn
(`ToolContext.redacted_text`, never the reply model's arguments) agrees. The agreement check is one
small classification call on the router model chain (`tool_router_model`, `intent_judge_model`,
`ollama_chat_model`; temperature 0; the message fenced as data; one word YES or NO). Any other
answer, an error, a refusal, a question or another topic means no and cancels the request; a
request not confirmed in the very next turn lapses. Eval: `evals/test_chat_delete_consent.py`.
`ollama_chat_model`; temperature 0; told the pending message ID and channel; the message fenced as
data; one word YES or NO). Any other answer, an error, a refusal, a question, another topic or a
different message means no and cancels the request. A message longer than 600 characters is not
judged and means no (cutting it could drop a later "don't"). A request not confirmed in the very
next turn lapses. Eval: `evals/test_chat_delete_consent.py`.
- **Raw data.** The tool returns plain text for the reply model; the only LLM call inside is the
delete consent check.