feat(bot): suppress bot retry-search churn from the moderator log
Pop intermediate wont_help/illegal_move/no_such_piece/no_legal_moves announcements produced during the bot's decision cycle before any broadcast reaches the human opponent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -165,6 +165,16 @@ export class BotDriver {
|
||||
const text = result.announcements[0]!.text;
|
||||
if (text === 'wont_help' || text === 'illegal_move'
|
||||
|| text === 'no_such_piece' || text === 'no_legal_moves') {
|
||||
// Attempted-move announcements are audience 'both'. The bot's
|
||||
// intermediate retry rejections are internal search churn, not
|
||||
// deliberate probing — suppress them so they don't broadcast to
|
||||
// the human. The bot tracks its own rejections via attemptHistory,
|
||||
// so removing the announcement is safe. The whole decision cycle
|
||||
// runs before ws.ts broadcasts, so this pop always happens before
|
||||
// any broadcast.
|
||||
const rejection = result.announcements[0]!;
|
||||
const anns = this.game.announcements;
|
||||
if (anns[anns.length - 1] === rejection) anns.pop();
|
||||
return {
|
||||
kind: 'retry',
|
||||
entry: {
|
||||
|
||||
Reference in New Issue
Block a user