feat(node-manager): endpointGroupMembership ItemKind (Phase 2b-2b)#3965
Merged
Conversation
Implements GroupMembershipItemKind — the fifth reconciler kind — which provisions peer endpoint group membership via the Groups cluster AddGroup/RemoveGroup/GetGroupMembership commands. Non-success statuses in response payloads are re-thrown as StatusResponseError so the engine's retry/drop machinery works uniformly. Capacity is read from the subscription-cached GroupKeyManagement state (no live I/O). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Register GroupMembershipItemKind in ReconcilerBehavior.initialize() after GroupKeyMapItemKind (priority order: keyset < group < membership). Add three-scenario integration test (apply, behind-back re-apply, removeIntent). API-drift notes: - DesiredStateBehavior uses removeIntent(), not deleteIntent() (brief was wrong). - GroupsServer.removeGroup calls assertRemoteActor, so the behind-back removal test mutates groupTable directly (same idiom as GroupKeyIntegrationTest). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
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.
Phase 2b-2b of Node Manager. Adds the fifth reconciler
ItemKind,endpointGroupMembership, completing the group-provisioning chain (keyset → groupKeyMap → membership).What
GroupMembershipItemKind— per-endpoint Groups cluster (0x0004) membership. Resolves a per-endpoint command target (node.endpoints.for(ep).commandsOf(GroupsClient)) likeBindingItemKind, command-based likeGroupKeyItemKind:AddGroup({groupId, groupName ?? ""}), always-write (idempotent);groupNamesent but not verified.GetGroupMembership({groupList:[groupId]}), presence-only (member iffgroupId ∈ response.groupList).RemoveGroup({groupId});NotFoundtreated as success. NeverRemoveAllGroups.limit = maxGroupsPerFabric ?? 4,used = groupTable.length.PRIORITY_BANDS.membership(30);recoverable= Timeout/Busy.ReconcilerBehavior.initialize(). No engine changes — reuses the mutex-queue reconcile path +planActions/executeActions.New mechanic vs prior kinds
Groups commands return application status in the response payload (
AddGroupResponse.status), not as a thrownStatusResponseError(KeySetWrite had no payload). Soapply/removeinspectresponse.statusand re-throw non-SUCCESS asStatusResponseError(msg, status), routing through the executor'sextractStatusCode→recoverable→ retry/drop uniformly.ResourceExhausted→ drop;Timeout/Busy→ retry.Device dependency:
GroupsServer.addGroupreturnsUnsupportedAccessunless the group is already keyset-mapped — the priority bands keyset(10) < group(20) < membership(30) enforce that order in one reconcile pass.Tests
OnOffLightSwitchDevice.with(GroupsServer)(ep1): apply → member; behind-the-back removal → verify pass re-applies; deletePending → removed. All assert real devicegroupTablestate.Gates
build --clean ✓ · format ✓ · lint ✓ · node-manager 75/75 · node 1227/1227 (no regression). Whole-branch review: zero Critical/Important.
Base =
node-manager(sub-PR; CI runs on umbrella #3948 → main).🤖 Generated with Claude Code