From 30f47bf06eee333d197ed7bdab63958f892fe6a0 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 10 Jul 2026 17:34:33 +0200 Subject: [PATCH] fix(node): restore group endpoint mappings at startup GroupKeyManagement restored group key sets and the group key map from persisted state at startup, but not the runtime endpoint map derived from the group table. Group commands to persisted groups were silently not dispatched after a restart (and binding group-member lookups came up empty) until an AddGroup command repopulated the map. Co-Authored-By: Claude Fable 5 --- .../group-key-management/GroupKeyManagementServer.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/node/src/behaviors/group-key-management/GroupKeyManagementServer.ts b/packages/node/src/behaviors/group-key-management/GroupKeyManagementServer.ts index aaea916c34..46ad6aa144 100644 --- a/packages/node/src/behaviors/group-key-management/GroupKeyManagementServer.ts +++ b/packages/node/src/behaviors/group-key-management/GroupKeyManagementServer.ts @@ -138,6 +138,14 @@ export class GroupKeyManagementServer extends GroupKeyManagementBase { if (this.state.groupKeyMap.length) { this.#updateGroupKeyMap(this.state.groupKeyMap); } + if (this.state.groupTable.length) { + // Restore the runtime endpoint map, which group command dispatch expands over + for (const { fabricIndex, groupId, endpoints } of this.state.groupTable) { + if (fabrics.has(fabricIndex)) { + fabrics.for(fabricIndex).groups.endpoints.set(groupId, [...endpoints]); + } + } + } } /** Handle the recreation (update) of a fabric, so we need to reinitialize the group key sets */