Merge branch 'main' into worktree-agent-a7c8c1a6937e97e84

Resolve chat_room.go: keep main's bounded chatSub queue (ready channel, no ch) in attachSub; the subscribe live-turn marker is still queued at attach under h.mu through enqueueChatLocked, and an existing subscriber whose queue is full is overflowed (resync) after the hub lock is released.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 01:11:11 +00:00
150 changed files with 7656 additions and 901 deletions
+4 -1
View File
@@ -51,6 +51,9 @@ type chatHub struct {
attentionSeen map[string]struct{}
attentionOrder []string
attentionWG sync.WaitGroup
// outbox makes chat phone pushes durable and retried (chat_ntfy_outbox.go);
// nil publishes each push once, directly.
outbox chatNotificationOutbox
// notifiedTurns holds the chats whose current turn already sent an agent
// notify, so that turn's end is not announced again (one turn, one ping).
notifiedTurns map[string]struct{}
@@ -409,7 +412,7 @@ func (h *chatHub) replayUsage(sub *chatSub) {
}
h.mu.Unlock()
if slow {
sub.close()
sub.overflow()
}
}