Repository navigation
feat(store): authorize channel writes and reads by tree participation (RIG-4187) - #1764
Open
rigel-mintaka wants to merge 2 commits into
Conversation
|
Compass engineering docs preview: https://compass-comms-rig-4187-chann.compass-eng-docs.pages.dev Deployed from |
rigel-mintaka
marked this pull request as ready for review
October 6, 2026 04:31
… (RIG-4187) requireChannelMember / isChannelMember now wrap ChannelParticipant, and IsTopicChannelMember wraps the new TopicChannelParticipant, so an agent in a TREE channel anchor subtree (or the anchor owner) posts, lists topics and receives stream events without a member row. hasGenuineAdd keeps the stored-row probe. Co-authored-by: Matt Wilkinson <matt@rigel.build>
…rapper docs (RIG-4187) Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka
force-pushed
the
compass-comms/rig-4187-channel-participant-probe
branch
from
October 6, 2026 06:16
b1c85f4 to
d3c40ab
Compare
rigel-mintaka
force-pushed
the
compass-comms/rig-4186-channel-tree-store
branch
from
October 6, 2026 06:16
f0ba02f to
1a144e8
Compare
This was referenced Oct 6, 2026
This branch has not been deployed
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.
This PR is part of a stack containing 5 PRs:
mainSummary
Channels-in-the-agent-tree, task T3 (
docs/designs/ui/compass-channels-in-agent-tree/design.md§ Plan): the participant probe. Stacked on #1762.isChannelMember/requireChannelMembernow wrapChannelParticipant: a member row, or for a TREE channel an agent in the anchor's subtree or the anchor's owner. Their signatures and the not-found merge are unchanged, soAppendMessage,UpdateChannelMembers,SetChannelPolicy, pin mutations,IsChannelMemberandListTopicsall inherit participation without edits.TopicChannelParticipant(authz.sql): the same probe, with the channel resolved throughtopics.channel_id.IsTopicChannelMemberwraps it.ChannelMemberExistsstays for the callers that need stored rows (hasGenuineAdd, theSetChannelPolicyowner check).TopicChannelMemberExistsstays generated.ReparentChannel's private participant gate is folded intorequireChannelMember; the before-and-after-lock double check is unchanged.TREE add/remove refusals are T5; derived reads (
ListChannelsetc.) are T4.Tests
New
channel_participant_pgtest_test.go:ListTopicsreturns the topics; an outside agent gets NotFound.IsChannelMemberandIsTopicChannelMemberagree per caller; an unknown topic gives false. The TREE channel has 0 member rows.ReparentAgentmoves the agent out of the subtree, its post → NotFound and the member row count is unchanged.hasGenuineAddstill counts a derived participant with no row as a genuine add.Mutations, each failing a named test:
isChannelMemberback onChannelMemberExists;IsTopicChannelMemberback onTopicChannelMemberExists;hasGenuineAddon the participant probe.Full store pgtest suite:
ok(778s). vet,sqlc-driftand untagged lint are clean; tagged lint shows only pre-existing findings.Spec-impact: none
Ledger-impact: none
Refs RIG-4187, RIG-1622
Co-authored-by: Matt Wilkinson matt@rigel.build