fix(handoff): normalize identity in sendHandoffMail (#780)

The handoff mail bead was created with un-normalized assignee
(e.g., gastown/crew/holden) but mailbox queries use normalized identity
(gastown/holden), causing self-mail to be invisible to the inbox.

Export addressToIdentity as AddressToIdentity and call it in
sendHandoffMail() to normalize the agent identity before storing,
matching the normalization performed in Router.sendToSingle().

Fix handoff mail delivery (hq-snp8)
This commit is contained in:
aleiby
2026-01-20 14:09:54 -08:00
committed by GitHub
parent 2fe23b7be5
commit 08cee416a4
5 changed files with 15 additions and 11 deletions

View File

@@ -56,7 +56,7 @@ func NewMailboxBeads(identity, workDir string) *Mailbox {
func NewMailboxFromAddress(address, workDir string) *Mailbox {
beadsDir := beads.ResolveBeadsDir(workDir)
return &Mailbox{
identity: addressToIdentity(address),
identity: AddressToIdentity(address),
workDir: workDir,
beadsDir: beadsDir,
legacy: false,
@@ -66,7 +66,7 @@ func NewMailboxFromAddress(address, workDir string) *Mailbox {
// NewMailboxWithBeadsDir creates a mailbox with an explicit beads directory.
func NewMailboxWithBeadsDir(address, workDir, beadsDir string) *Mailbox {
return &Mailbox{
identity: addressToIdentity(address),
identity: AddressToIdentity(address),
workDir: workDir,
beadsDir: beadsDir,
legacy: false,