Repository navigation
Allow overlapping Bot audiences in shared-app approvals - #923
Merged
davidmckayv merged 6 commits intoNov 2, 2026
Merged
davidmckayv merged 6 commits into
davidmckayv merged 6 commits into
Conversation
Implemented and validated with OpenAI Codex assistance.
rudycelekli
requested review from
MikeRyanDev,
davidmckayv,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
October 31, 2026 05:31
…istinct-members-20261030
…to and assigned exposureOf concatenated the publication's members and the assigned groups, so a group reached both ways appeared twice in the proposal an administrator is asked to approve. It now keeps one of each exact (kind, value) pair; a person and a group with the same value stay separate. The insert still ignores repeats for approvals written by other paths. Also moves the changelog entry below the upgrade notes, which stay first under Unreleased.
…istinct-members-20261030 # Conflicts: # CHANGELOG.md # server/src/plugins/shared-use-store.ts # server/tests/shared-use-store.integration.test.ts
…istinct-members-20261030 # Conflicts: # CHANGELOG.md
…istinct-members-20261030
davidmckayv
approved these changes
Nov 2, 2026
davidmckayv
left a comment
Contributor
There was a problem hiding this comment.
Thanks. Checked together with the other fixes on one tree with the full test suite, and merging.
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.
What this changes
A group can appear in both a Bot's published audience and assigned groups. Approving the resulting shared-app request currently inserts the same exact membership twice and fails its primary-key constraint. The same happens with repeated members in an explicit approval.
Ignore conflicts only on the complete approval-member primary key. Repeated exact (kind, value) pairs store once; a user and group with the same value remain separate. Other insert errors still fail the existing transaction.
Where it runs
Boundary and audit
Changelog
Proof
Base
743649efc3f21d7bf0badbe6af2bcd5daedd97ce, headd0c5bc1fceac2084660d8e465a178d84ea07ff4c.Two new real-database regressions fail before with SQL 23505. After: the entire 18-test shared-use integration file passes (91 assertions), including organic publication/assignment overlap, repeated users/groups, distinct user/group names, retained access and outsider refusal.
Format, lint, workspace typecheck, the test-typecheck baseline guard, and build pass on this exact head. A separate routing candidate (
d428f669f10e21700b6d5eb1fb14e90c9cc59cfe) on this same upstream base ran fulltest:ci: 11,017 passed, 210 skipped, two failed (routine-sweep concurrency expectation and recorder held-steps service-worker timing). Both isolated cases passed on unchanged base and that routing candidate; suite-order/timing causality remains unresolved. The full suite was not rerun on this head and no full green result is claimed.Real integration tests use a dedicated disposable Postgres 15 database (hosted CI uses 17), with no live vendor calls or application data.
AI assistance: implemented and locally validated with OpenAI Codex. Hosted CI and maintainer review remain required.