Skip to content

feat(proto): OpenDM RPC + gateway arm; GROUP_DM retirement; DM/convert fields (RIG-2962) - #738

Merged
mattwilkinsonn merged 1 commit into
mainfrom
compass-server/rig-2962-peer-dm-proto
Aug 30, 2026
Merged

feat(proto): OpenDM RPC + gateway arm; GROUP_DM retirement; DM/convert fields (RIG-2962)#738
mattwilkinsonn merged 1 commit into
mainfrom
compass-server/rig-2962-peer-dm-proto

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 2 PRs:

  1. main
  2. "feat(proto): OpenDM RPC + gateway arm; GROUP_DM retirement; DM/convert fields (RIG-2962)" (this PR)
  3. feat(store): reserved DM group + upsert + create-guard + convert-on-add (RIG-2963) #746

RIG-2962 T1 — peer-DM proto contract. comms.proto: CommsService.OpenDM RPC

  • OpenDMRequest{peer_handle=1}/OpenDMResponse{channel=1,created=2}; deprecate
    CHANNEL_KIND_GROUP_DM=2 in place (retired, never produced, number not
    reusable); UpdateChannelMembersRequest.convert_channel_name=6. agent_gateway.proto:
    CommsCallRequest.open_dm=11 / CommsCallResult.open_dm=11 (next-free floor above
    org-mgmt 7-10 + trigger_traceparent=10, per design Global Constraints);
    SpawnPeerResponse.dm_channel_name=4. Regen all four lanes.

Co-authored-by: Matt Wilkinson matt@rigel.build

@linear-code

linear-code Bot commented Aug 30, 2026

Copy link
Copy Markdown

RIG-2962

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-server-rig-2962-peer.compass-eng-docs.pages.dev

Deployed from compass-server/rig-2962-peer-dm-proto at 229d891.

@rigel-mintaka
rigel-mintaka force-pushed the compass-server/rig-2962-peer-dm-proto branch from 194e92f to f636a01 Compare August 30, 2026 15:29
Base automatically changed from compass-server/rig-2724-org-mgmt-handlers to main August 30, 2026 17:24
…t fields (RIG-2962)

RIG-2962 T1 — peer-DM proto contract. comms.proto: CommsService.OpenDM RPC
+ OpenDMRequest{peer_handle=1}/OpenDMResponse{channel=1,created=2}; deprecate
CHANNEL_KIND_GROUP_DM=2 in place (retired, never produced, number not
reusable); UpdateChannelMembersRequest.convert_channel_name=6. agent_gateway.proto:
CommsCallRequest.open_dm=11 / CommsCallResult.open_dm=11 (next-free floor above
org-mgmt 7-10 + trigger_traceparent=10, per design Global Constraints);
SpawnPeerResponse.dm_channel_name=4. Regen all four lanes.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-server/rig-2962-peer-dm-proto branch from f636a01 to 229d891 Compare August 30, 2026 17:29
@mattwilkinsonn
mattwilkinsonn merged commit 7eddb90 into main Aug 30, 2026
15 checks passed
@mattwilkinsonn
mattwilkinsonn deleted the compass-server/rig-2962-peer-dm-proto branch August 30, 2026 19:01
rigel-mintaka added a commit that referenced this pull request Aug 30, 2026
…dd (RIG-2963)

Peer-DM T2 (design product/compass-agent-peer-dm §Plan T2, Decisions R3/R4). Store layer for agent peer-DMs, stacked on the T1 proto contract (#738).

- New go/internal/store/dm.go: EnsureOwnerDMGroupTx (per-owner reserved __dm__ group, visibility-discriminated, mirrors EnsureOwnerCoordinationGroupTx); UpsertDMChannelTx (deterministic sorted-handle name, no suffix search, ON CONFLICT DO NOTHING + re-SELECT resume loop, born kind=DM + OPEN ownerless + mandatory, expand owner membership + seed cursors); verifyReconcileDMTx (R3 belt: wrong-kind squat -> ErrNotFound, mandatory + missing-member drift reconciled in-tx); LockOwnerDMTx (distinct 'dm:' advisory-lock key domain); isReservedDMGroupTx (create-guard discriminator).
- channels.go: R3 create-guard in CreateChannel (reject a manual create into a reserved DM group with merged ErrNotFound); R4 convert-on-add in UpdateChannelMembers (a genuine member ADD on kind=DM requires ConvertChannelName, flips kind=CHANNEL + rename + group_id=NULL freeing the DM name, before the add) + two-party floor (a remove may not strand a DM below two agent parties). FOR UPDATE read now also returns kind.
- inputs.go: MemberUpdatesOptions{ConvertChannelName}; UpdateChannelMembers signature widened; comms.go threads req.Msg.GetConvertChannelName().
- dm_pgtest_test.go: 9 pgtest cases (create invariants, idempotent resume either direction, concurrent-open race -> one channel, delivery-target predicate, manual create into reserved group -> not_found, squat belt, convert with/without name, fresh pair after convert, remove-below-two rejected).

Co-authored-by: Matt Wilkinson <matt@rigel.build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants