Repository navigation
feat(mailbox): persistent per-agent message inbox — closes #2 - #6
Merged
Merged
Conversation
- Message struct with UUID ID, Kind, FromAgent, ToAgent, Subject, Body, ReplyTo, TeamID - MessageKind enum: task, reply, broadcast, event - Mailbox interface: Send, Receive, MarkRead, MarkAllRead, History, Thread, Delete - SQLiteMailbox implementation backed by db.DB - Broadcast fan-out: expands "*" to individual per-recipient records via agentLister callback - DB model GMailboxMessage + migration 20260604_005_mailbox_messages - 15 unit tests: send/receive, ordering, mark-read, history, thread, delete, broadcast, inbox isolation Closes #2 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
EngineerProjects
force-pushed
the
feat/mailbox
branch
from
June 4, 2026 11:50
a0dc9a9 to
a2af274
Compare
EngineerProjects
added a commit
that referenced
this pull request
Jun 4, 2026
feat(mailbox): persistent per-agent message inbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Messagestruct — UUID ID, Kind, FromAgent, ToAgent, Subject, Body, ReplyTo, TeamIDMessageKindenum —task,reply,broadcast,eventMailboxinterface — Send, Receive, MarkRead, MarkAllRead, History, Thread, DeleteSQLiteMailbox— implementation backed bydb.DBKindBroadcastwithToAgent: "*"expands to one record per team member (sender excluded), via an injectableagentListercallbackGMailboxMessageGORM model + migration20260604_005_mailbox_messagesfeat/agent-definition; agents are identified by UUID stringsDesign notes
agentListeris injected at construction so the mailbox has no hard dependency on the agent registry; the caller wires them togetherReplyToforms conversation threads without nested tables —Thread()fetches root + direct repliesReceivereturns oldest-first (process in order);Historyreturns newest-first (display in UI)Test plan
TestNewMessage_HasUUID— unique UUID per messageTestSend_And_Receive— full round-trip, all fields preservedTestReceive_OnlyUnread— read messages excludedTestReceive_OldestFirst— correct orderingTestMarkRead— single message marked readTestMarkAllRead— all unread cleared at onceTestHistory_NewestFirst— correct ordering, limit respectedTestHistory_IncludesReadMessages— history shows all messagesTestThread— root + reply returned, unrelated message excludedTestDelete— message removed from inboxTestDelete_NotFound— returnsdb.ErrMessageNotFoundTestBroadcast— fan-out to all team members, sender excludedTestBroadcast_NoLister— error when lister not configuredTestBroadcast_RequiresTeamID— error when TeamID missingTestInbox_Isolation— messages only visible to their recipientAll 15 tests pass. Full
go build ./...clean.Closes #2