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:
@@ -488,7 +488,7 @@ func ParseMessageType(s string) MessageType {
|
||||
}
|
||||
}
|
||||
|
||||
// addressToIdentity converts a GGT address to a beads identity.
|
||||
// AddressToIdentity converts a GGT address to a beads identity.
|
||||
//
|
||||
// Liberal normalization: accepts multiple address formats and normalizes
|
||||
// to canonical form (Postel's Law - be liberal in what you accept).
|
||||
@@ -504,7 +504,7 @@ func ParseMessageType(s string) MessageType {
|
||||
// - "gastown/Toast" → "gastown/Toast" (already canonical)
|
||||
// - "gastown/refinery" → "gastown/refinery"
|
||||
// - "gastown/" → "gastown" (rig broadcast)
|
||||
func addressToIdentity(address string) string {
|
||||
func AddressToIdentity(address string) string {
|
||||
// Overseer (human operator) - no trailing slash, distinct from agents
|
||||
if address == "overseer" {
|
||||
return "overseer"
|
||||
|
||||
Reference in New Issue
Block a user