diff --git a/apps/desktop/src/plugins/hermes-bots/group-membership.ts b/apps/desktop/src/plugins/hermes-bots/group-membership.ts index b4c622c95f..1697c10aaf 100644 --- a/apps/desktop/src/plugins/hermes-bots/group-membership.ts +++ b/apps/desktop/src/plugins/hermes-bots/group-membership.ts @@ -333,13 +333,7 @@ export function groupChatMemberBots( return [...local, ...remote] } -/** A stored member descriptor, resolved against the live roster when its - * `name` is not a real slug (#92794). Exact key matches pass through - * untouched; only a descriptor whose key matches NO roster row is re-tried — - * by friendly name, then by recorded previous profile names (#110200) — - * against rows on the same connection. Unresolvable descriptors return as-is - * — they stay visible-but-degraded ghosts and must never be used as a - * `profile:` target. */ +/** Stored descriptor resolved against the live roster when its `name` is not a real slug (#92794). Exact matches pass through; unmatched keys re-try by friendly name, then previous profile names (#110200) — unresolvable ones return as-is, visible-but-degraded ghosts never used as a `profile:` target. */ function resolveLegacyMemberDescriptor(descriptor: RosterRow, roster: RosterRow[]): RosterRow { const rows = roster || [] @@ -383,12 +377,7 @@ function resolveLegacyMemberDescriptor(descriptor: RosterRow, roster: RosterRow[ .trim() .toLowerCase() === wanted ) || - // … or a profile renamed after the descriptor was persisted - // ('niezale-ny' for 'niezalezny'): the CLI records previous_names in - // profile.yaml and the gateway surfaces them on profiles.list. - // Returning the live row re-seats the member under its new identity; - // the next persistence pass rewrites the stored descriptor, so the - // repair is self-healing. + // … or a profile renamed after the descriptor was persisted: previous_names in profile.yaml re-seats the member under its new identity, self-healing on next persist. (Array.isArray(bot?.previous_names) && bot.previous_names.some( previous => diff --git a/apps/desktop/src/plugins/hermes-bots/group-rounds.ts b/apps/desktop/src/plugins/hermes-bots/group-rounds.ts index b118113fc5..3ca2d28162 100644 --- a/apps/desktop/src/plugins/hermes-bots/group-rounds.ts +++ b/apps/desktop/src/plugins/hermes-bots/group-rounds.ts @@ -94,13 +94,7 @@ export function parseGroupChatMentions(text: unknown, members: GroupMember[]) { } } - // Normalized slug/collapsed variants of the same live identity (the - // forms mentionNameForms derives: "bob.jones" -> "bob-jones", - // "bobjones" — including the dotted raw forms the hand-rolled collapse - // above never strips). Gap-filled only: an exact live name elsewhere in - // the roster always wins over another member's normalization variant, - // and every variant is claimed before previous-name aliases are - // considered, so an old handle can never squat on one (#110200). + // Normalized slug/collapsed variants of a live identity, gap-filled only — an exact live name elsewhere always wins, so an old handle can never squat (#110200). for (const raw of [member.name, handle, title, ...botFriendlyNames(member)]) { for (const form of mentionNameForms(raw)) { if (form && !handles.has(form)) { @@ -110,12 +104,7 @@ export function parseGroupChatMentions(text: unknown, members: GroupMember[]) { } } - // Renamed members keep answering to their previous handles: a profile - // renamed after the room was created (or @-typed from muscle memory) - // still routes to the right member. Previous-name forms only fill gaps — - // the live loop above now claims every normalization variant of every - // live identity first, so a live name always wins over another member's - // history in ALL typed forms (#110200). + // Renamed members answer to previous handles, gap-fill only — every live identity's variants are claimed first, so a live name always wins (#110200). for (const member of members) { const key = groupMemberKey(member) const previous = Array.isArray(member.previous_names) ? member.previous_names : []