fix: validate gateway group membership before mutations - #17
Open
davefmurray wants to merge 1 commit into
Open
Conversation
🦋 Changeset detectedLatest commit: d9fd656 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
davefmurray
marked this pull request as ready for review
September 5, 2026 09:43
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.
Gateway group commands currently skip the membership validation already enforced by the file backend. For example,
gbot --gateway groups add Launch Launchsends a nested-group mutation, and removing the last member sends an empty membership list. Repeated references to the same bot are also sent as duplicate IDs, while the CLI advertises a six-member limit that gateway mode does not enforce.This change resolves and deduplicates members before enforcing the existing one-to-six-bot rule, rejects nested groups, and rejects bot targets for group membership changes. Validation runs before
createGrouporsetGroupMembersmutations; add/remove inherit it through the existing set path. Includes a patch changeset.Validation:
npm test: 41 passed.npx --yes publint@0.3.24: passed.gbot --help: passed.git diff --check: passed.Gateway responses are mocked; no live account mutations were performed.