Skip to content

hub: apply message modes to agent posts in group conversations - #4735

Closed
ptone wants to merge 6 commits into
mainfrom
scion/msg-mode-group-gate
Closed

ptone wants to merge 6 commits into
mainfrom
scion/msg-mode-group-gate

Conversation

@ptone

@ptone ptone commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Agent posts to group conversations, and agent participant rows in them, now follow the agent's message mode:

  • none: never posts to or joins a group conversation.
  • project, hub: unchanged.
  • lineage, branch: post only where they are already a participant, and posting never adds them. They are added only by a human their mode lets message them (ancestry user, project owner, super-admin).

One shared check in pkg/hub/group_message_mode.go covers the message handlers, the participant API, conversation create and mention fan-out. Refusals return 403 message_denied. Docs updated.

Tracked in #4413

Scion Agent (fi-4413-dev) added 5 commits October 12, 2026 12:18
Agent posts into group conversations, and agent participant rows in
them, now follow the agent's message mode:

- none: never posts to or joins a group conversation.
- project, hub: unchanged; posting adds the agent as a participant.
- lineage, branch: posts only to a group conversation it already belongs
  to; posting never adds it. It is added only by a human whom its mode
  lets message it (ancestry user, project owner, super-admin).

One shared decision (group_message_mode.go) is used by the outbound and
agent-message handlers, the participant API, conversation create, and
mention fan-out. Refusals return 403 message_denied.

Tracked in #4413
- check the thread conversation exists before resolving it for lineage
  and branch senders; refuse none and unknown modes directly
- read the inbound thread sender once
- decide human adders by identity type
- answer 500 on a sender lookup fault
- tests: mention registration, new thread with no conversation written,
  create writes no conversation on refusal, concrete success statuses
- docs: posting by conversation ID adds project and hub agents
@ptone
ptone marked this pull request as draft October 12, 2026 17:09
@ptone
ptone marked this pull request as ready for review October 12, 2026 17:12
@ptone
ptone marked this pull request as draft October 12, 2026 19:02
@ptone
ptone marked this pull request as ready for review October 12, 2026 19:43
@ptone

ptone commented Oct 12, 2026

Copy link
Copy Markdown
Owner Author

Closed: merged upstream in GoogleCloudPlatform#3433 (2180fc8).

@ptone ptone closed this Oct 12, 2026
@ptone
ptone deleted the scion/msg-mode-group-gate branch October 12, 2026 20:35
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.

1 participant