Repository navigation
feat(comms): wire ReparentChannel and attached CreateChannel (RIG-4190) - #1779
Open
rigel-mintaka wants to merge 6 commits into
Open
rigel-mintaka wants to merge 6 commits into
rigel-mintaka wants to merge 6 commits into
Conversation
This was referenced Oct 6, 2026
|
Compass engineering docs preview: https://compass-comms-rig-4190-chann.compass-eng-docs.pages.dev Deployed from |
CreateChannel resolves parent_agent_handle and membership_mode at the edge; ReparentChannel replaces the Unimplemented stub and emits one ChannelChanged post-commit. A foreign or unknown agent handle merges to the same NOT_FOUND naming the submitted handle, through one helper that ReparentAgent now shares. Co-authored-by: Matt Wilkinson <matt@rigel.build>
…hannel oracles (RIG-4190) An EXPLICIT detach drops the old anchor owner set from visibility, so those accounts are named in removed_account_ids and still get the final ChannelChanged. Tests now pin one create event, the destination NOT_FOUND merge, and the detach notice. Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka
force-pushed
the
compass-comms/rig-4190-channel-tree-rpc
branch
from
October 6, 2026 09:55
b0dff94 to
9ed8783
Compare
…r recipient (RIG-4190) A move to another owner's agent loses the old owner set the same way a detach does. The store returns the replaced parent from under its row lock, and one query lists the old owner set that lost visibility. SubscribeComms now sends each recipient only its own id in removed_account_ids. Co-authored-by: Matt Wilkinson <matt@rigel.build>
…nt per-recipient trim (RIG-4190) OwnerSetLostChannelVisibility now negates ChannelVisibleTo's body with the viewer spelled per candidate, so it diffs against the other copies. ChannelChanged.removed_account_ids documents the per-subscriber trim. Co-authored-by: Matt Wilkinson <matt@rigel.build>
…m (RIG-4190) Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka
marked this pull request as ready for review
October 6, 2026 10:50
mattwilkinsonn
added this pull request to stack #1828
October 7, 2026 00:34
mattwilkinsonn
approved these changes
Oct 7, 2026
Contributor
|
/trunk merge |
|
❌ This stack could not start testing because there was a merge conflict. See more details here.
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
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 T6 (
docs/designs/ui/compass-channels-in-agent-tree/design.md§ Plan): the RPC edge and events. Stacked on #1778.parent_agent_handleandmembership_modeto the store. An unknown mode isINVALID_ARGUMENT, so the call does not quietly create an EXPLICIT channel.Unimplementedstub. It callsstore.ReparentChanneland emits oneChannelChangedafter commit. The stream's existingChannelVisibleTofilter decides who receives it. When a channel leaves its anchor owner's tree (a detach, or a move to another owner's agent), the old owner set loses visibility.store.OwnerSetLostChannelVisibilityfinds those accounts in one query, and they are named inremoved_account_idsso they still receive the final event.store.ReparentChannelnow also returns the parent it replaced, read under its row lock.SubscribeCommstrimsremoved_account_idsto the recipient's own id, so the list never shows one account another's id. This also covers the existingUpdateChannelMembersremovals.ChannelChangedcomments list every emit cause and the per-recipient trim. Comment-only change; gen is regenerated.resolveSameOwnerAgent(inresolve.go) resolves an optional agent handle. A foreign handle gets the same NOT_FOUND as an unknown one, naming the submitted handle.ReparentAgent's parent check now uses the same helper.This also lands the RPC half deferred from #1772: the
CreateChannelresponse and itsChannelChangedcarryparent_agent_idand TREE mode.Tests
TestCreateChannelUnderAgentEmitsAttachedChannel: the response and exactly oneChannelChangedcarry the anchor and TREE mode; a subtree agent's post succeeds end to end; a non-participant's post isNOT_FOUND.TestCreateChannelRejectsUnknownMembershipModeAndForeignAnchor: an unknown mode isINVALID_ARGUMENT; a foreign anchor is NOT_FOUND naming the submitted handle.TestReparentChannelEmitsOneChannelChangedToAdmittedAccounts: exactly one bus event; the owner's stream receives it; an outsider's stream receives its own later marker event first.TestReparentChannelDetachNotifiesViewersWhoLoseVisibility: a same-owner agent with no member row receives the detach event naming it as removed; the remaining member is not named.TestReparentChannelCrossOwnerMoveNotifiesOnlyLostViewers: a shared channel moved from X's agent to Y's agent; X's non-member agent receives the event naming only itself; the Y member receives it with no removed ids.TestOwnerSetLostChannelVisibilityExcludesRemainingPaths(store): nothing is lost while anchored in the owner set; after a detach only the non-member bystander is lost.TestReparentChannelNonParticipantIsNotFound: a non-participant gets NOT_FOUND; a foreign and an unknown destination give the same NOT_FOUND naming the submitted handle.ReparentAgentforeign-parent test); mode dropped; double publish on reparent and on create; removed ids dropped on detach; plain handle resolve on the destination; no stream trim; detach-only notice; owner-set arm removed from the lost-visibility query.ok. Lint: clean.Spec-impact: none
Ledger-impact: none
Refs RIG-4190, RIG-1622
Co-authored-by: Matt Wilkinson matt@rigel.build