fix(voice_worker): a yes sent before the delete question was answered does not delete

A delete is confirmed only in the person's very next turn, but turn numbers
were given when a reply started. A "응, 지워" sent while the delete question
was still being written waited for the person's lock and then counted as the
next turn, so the delete went through.

- The worker counts each person's unanswered replies. A reply that arrived
  before their previous answer was given skips a turn number, so a delete
  asked in that answer lapses.
- After an answer the person never got (failed, or stopped before it was
  spoken) a turn number is skipped as well: it asked them nothing.
- Tests with the real chatChannels tool and an agreeing consent check: a yes
  sent before the answer does not delete, a yes after a failed answer does
  not delete, a yes after the answer deletes.
- Specs: voice_worker.spec.md (turn numbering), chat_channels.spec.md (the
  next turn is a message sent after the question was received).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-12 01:32:25 +09:00
parent 19f984ae73
commit c328bda699
4 changed files with 138 additions and 9 deletions

View File

@@ -21,7 +21,9 @@ written, send, edit its own messages, react, delete and pin. Product rules: `doc
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`.
next turn lapses. The backend numbers the turns so that only a message sent after the person got
the question is their next turn (voice worker: `voice_worker.spec.md`, "History and brain"). 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.