Skip to content

test(comms): pin roster presence states, nil-source default, visibility clip (RIG-3537) - #1137

Merged
trunk-io[bot] merged 1 commit into
compass-comms/rig3535-dm-lifecyclefrom
compass-comms/rig3537-roster-presence
Sep 12, 2026
Merged

test(comms): pin roster presence states, nil-source default, visibility clip (RIG-3537)#1137
trunk-io[bot] merged 1 commit into
compass-comms/rig3535-dm-lifecyclefrom
compass-comms/rig3537-roster-presence

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 4 PRs:

  1. main
  2. test(comms): deepen supervisor orchestration coverage (RIG-3533) #1114
  3. test(comms): pin the ring-lag resync arms and replay-boundary exactness (RIG-3538) #1123
  4. test(comms): pin dmChannelName properties and DM two-party read scope (RIG-3535) #1136
  5. "test(comms): pin roster presence states, nil-source default, visibility clip (RIG-3537)" (this PR)

The roster presence join was asserted by one test covering a single non-default
enum plus the OFFLINE default. Three cases close that.

The presence-state case asserts per-agent (handle -> enum) across WORKING, IDLE,
WAITING and the absent-from-map OFFLINE default in one read. Per-agent is the
point: a set or count assertion still passes when the join maps one agent's enum
onto another's entry, which is the bug this catches. WAITING is the ask-pending
state and the one most likely to regress silently.

The nil-source case pins the hub-less contract documented in presence_source.go —
GetRoster guards on a nil presence source and re-applies the OFFLINE default, so
a caller with no hub wired reads OFFLINE for every agent rather than panicking.

The clipping case covers a member structurally present in the vantage's tree but
invisible to the caller: it must be dropped entirely, not returned blanked. It is
canary-ordered, so an unrelated empty roster cannot pass it.

Mutation-verified, each against production code:

  • rotating the presence map by one agent fails the per-agent case
  • removing the c.presence != nil guard fails the nil-source case
  • disabling the visibility skip fails the clipping case

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

…ty clip (RIG-3537)

The roster presence join was asserted by one test covering a single non-default
enum plus the OFFLINE default. Three cases close that.

The presence-state case asserts per-agent (handle -> enum) across WORKING, IDLE,
WAITING and the absent-from-map OFFLINE default in one read. Per-agent is the
point: a set or count assertion still passes when the join maps one agent's enum
onto another's entry, which is the bug this catches. WAITING is the ask-pending
state and the one most likely to regress silently.

The nil-source case pins the hub-less contract documented in presence_source.go —
GetRoster guards on a nil presence source and re-applies the OFFLINE default, so
a caller with no hub wired reads OFFLINE for every agent rather than panicking.

The clipping case covers a member structurally present in the vantage's tree but
invisible to the caller: it must be dropped entirely, not returned blanked. It is
canary-ordered, so an unrelated empty roster cannot pass it.

Mutation-verified, each against production code:
- rotating the presence map by one agent fails the per-agent case
- removing the `c.presence != nil` guard fails the nil-source case
- disabling the visibility skip fails the clipping case

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

RIG-3537

@rigel-mintaka
rigel-mintaka added this pull request to stack #1124 September 12, 2026 02:19
@rigel-mintaka
rigel-mintaka marked this pull request as ready for review September 12, 2026 02:20
@github-actions

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-comms-rig3537-roster.compass-eng-docs.pages.dev

Deployed from compass-comms/rig3537-roster-presence at ba59e2f.

@trunk-io

trunk-io Bot commented Sep 12, 2026

Copy link
Copy Markdown

😎 Stack merged successfully - details.

@trunk-io
trunk-io Bot merged commit 74e2a8c into main Sep 12, 2026
16 checks passed
@trunk-io
trunk-io Bot deleted the compass-comms/rig3537-roster-presence branch September 12, 2026 13:39
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