Skip to content

feat(comms): peer-DM T0 name-addressing cutover — agents address channels+topics by name (RIG-2956) - #730

Merged
mattwilkinsonn merged 1 commit into
mainfrom
compass/rig-2956-t0-name-addressing
Aug 30, 2026
Merged

feat(comms): peer-DM T0 name-addressing cutover — agents address channels+topics by name (RIG-2956)#730
mattwilkinsonn merged 1 commit into
mainfrom
compass/rig-2956-t0-name-addressing

Conversation

@rigel-mintaka

Copy link
Copy Markdown
Contributor

The T0 slice of the peer-DM name-addressing cutover (frozen record
docs/designs/product/compass-agent-peer-dm/design.md §T0). Agents and UIs
address channels and topics by NAME; the wire and store stay id-typed,
resolved at the service edge (mirrors the merged handle-addressing cutover
#698 / DL-270). Proto denorm fields + Go edge + delivery denorm + TS tools,
one atomic change.

Proto (regen committed):

  • DeliverControl.channel_name=5, SteerControl.topic_name=4/channel_name=5:
    the source channel/topic NAMES ride the deliver/steer control op so the
    agent renders them without a roster lookup.
  • PostMessageRequest.create_topic=6: the get-or-create gate (R5).

Go comms edge:

  • store.ChannelByNameForViewer: viewer-scoped name→id resolve, sharing
    channelVisiblePredicate with ListChannels (no read/resolve drift).
    Unknown OR invisible name → ErrNotFound (D9 merge); ambiguous name →
    ErrInvalidArgument naming the collision (no ErrAmbiguous sentinel).
  • TopicRef.Create gates get-or-create in resolveTopicForAppend: set → mint;
    unset → a name-miss is ErrNotFound, not a silent create (R5). Archived
    revival unchanged.
  • comms_post_message / comms_post_ask route through the new
    PostAsAccountByName / ListAsAccountByName tool-arm wrappers, which resolve
    the channel NAME → id then delegate to the UNCHANGED id-typed
    PostAsAccount / ListAsAccount. Post/ask drop the home default (R2 — the
    agent must name its channel, even its own home); list keeps omit-=home
    (a read has no misroute hazard).
  • defaultChannel: preserve CreateTopic on its home-channel request copy
    (latent bug the create_topic gate would have surfaced as a silent
    mint-failure on CommitAgentPost's frame-relay path).
  • Internal producers that legitimately mint set Create=true (serve_seed
    Setup seed, CommitAgentPost frame relay, test helpers).

Go delivery denorm:

  • store.TopicChannelNames(topicID) → (topicName, channelName): id-typed
    join, ErrNotFound on miss.
  • Consumer.sourceNames mirrors authorHandle (empty topic id → empty; store
    miss → log + empty, never blocks delivery); deliverOp/steerOp carry
    ChannelName+TopicName on both DeliverControl and SteerControl.

TS agent tools:

  • comms_post_message / comms_post_ask require an explicit channel NAME
    (home default dropped) + optional create_topic; comms_list_messages flips
    to a channel NAME param, keeps omit-=home. The name rides the existing
    container channelId arm (the Go edge resolves).
  • formatDeliversForPrompt renders "Channel › topic :" + a reply
    cue naming both required post params; source names plumbed per message via
    #deliverSourceNames, mirroring #deliverFromHandles. Resolve misses degrade
    (topic → id, channel → placeholder).

Spec-impact: none. The name-addressing invariant (agents/UIs address by name; wire + store stay id-typed) is already recorded in the frozen design record and DL-291..297; this is its T0 implementation.

Refs RIG-2956

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

@linear-code

linear-code Bot commented Aug 30, 2026

Copy link
Copy Markdown

RIG-2956

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-rig-2956-t0-name-add.compass-eng-docs.pages.dev

Deployed from compass/rig-2956-t0-name-addressing at 076b877.

@rigel-mintaka
rigel-mintaka force-pushed the compass/rig-2956-t0-name-addressing branch 2 times, most recently from 27e07bd to 497cfab Compare August 30, 2026 04:26
…nels+topics by name (RIG-2956)

The T0 slice of the peer-DM name-addressing cutover (frozen record
docs/designs/product/compass-agent-peer-dm/design.md §T0). Agents and UIs
address channels and topics by NAME; the wire and store stay id-typed,
resolved at the service edge (mirrors the merged handle-addressing cutover
#698 / DL-270). Proto denorm fields + Go edge + delivery denorm + TS tools,
one atomic change.

Proto (regen committed):
- DeliverControl.channel_name=5, SteerControl.topic_name=4/channel_name=5:
  the source channel/topic NAMES ride the deliver/steer control op so the
  agent renders them without a roster lookup.
- PostMessageRequest.create_topic=6: the get-or-create gate (R5).

Go comms edge:
- store.ChannelByNameForViewer: viewer-scoped name→id resolve, sharing
  channelVisiblePredicate with ListChannels (no read/resolve drift).
  Unknown OR invisible name → ErrNotFound (D9 merge); ambiguous name →
  ErrInvalidArgument naming the collision (no ErrAmbiguous sentinel).
- TopicRef.Create gates get-or-create in resolveTopicForAppend: set → mint;
  unset → a name-miss is ErrNotFound, not a silent create (R5). Archived
  revival unchanged.
- comms_post_message / comms_post_ask route through the new
  PostAsAccountByName / ListAsAccountByName tool-arm wrappers, which resolve
  the channel NAME → id then delegate to the UNCHANGED id-typed
  PostAsAccount / ListAsAccount. Post/ask drop the home default (R2 — the
  agent must name its channel, even its own home); list keeps omit-=home
  (a read has no misroute hazard).
- defaultChannel: preserve CreateTopic on its home-channel request copy
  (latent bug the create_topic gate would have surfaced as a silent
  mint-failure on CommitAgentPost's frame-relay path).
- Internal producers that legitimately mint set Create=true (serve_seed
  Setup seed, CommitAgentPost frame relay, test helpers).

Go delivery denorm:
- store.TopicChannelNames(topicID) → (topicName, channelName): id-typed
  join, ErrNotFound on miss.
- Consumer.sourceNames mirrors authorHandle (empty topic id → empty; store
  miss → log + empty, never blocks delivery); deliverOp/steerOp carry
  ChannelName+TopicName on both DeliverControl and SteerControl.

TS agent tools:
- comms_post_message / comms_post_ask require an explicit channel NAME
  (home default dropped) + optional create_topic; comms_list_messages flips
  to a channel NAME param, keeps omit-=home. The name rides the existing
  container channelId arm (the Go edge resolves).
- formatDeliversForPrompt renders "Channel <name> › topic <name>:" + a reply
  cue naming both required post params; source names plumbed per message via
  #deliverSourceNames, mirroring #deliverFromHandles. Resolve misses degrade
  (topic → id, channel → placeholder).

Spec-impact: none. The name-addressing invariant (agents/UIs address by name; wire + store stay id-typed) is already recorded in the frozen design record and DL-291..297; this is its T0 implementation.

Refs RIG-2956

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass/rig-2956-t0-name-addressing branch from 497cfab to 076b877 Compare August 30, 2026 05:19
@mattwilkinsonn
mattwilkinsonn merged commit c8ee830 into main Aug 30, 2026
23 of 25 checks passed
@mattwilkinsonn
mattwilkinsonn deleted the compass/rig-2956-t0-name-addressing branch August 30, 2026 14:51
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