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

@@ -262,7 +262,10 @@ which carry Discord's own time.
newer action.
With no registered channels the tool is not offered. An action waits up to 15 s for its result
(then it fails), and a closed session fails every waiting action. Each reply counts as one turn
per person, so a delete is confirmed only in that person's later reply.
per person, so a delete is confirmed only in that person's next reply. A reply sent before the
person's previous answer was given cannot answer it, and an answer they never got (failed, or
stopped before it was spoken) asked them nothing: in both cases a turn number is skipped, so a
delete asked in that previous answer lapses.
- Memory settings, optional in `hello` as `"memory": {...}` and changeable with
`{"type": "memory_config", ...}`: `chat` (true), `others` (true), `off` (false), `since_days`
(null: whole history), `recent_minutes` (30), `recent_records` (20), `matches` (5),