Skip to content

test(e2e): marker-routed multi-turn scripts + observer-scoped fixture clients (RIG-3528) - #1029

Open
rigel-mintaka wants to merge 1 commit into
mainfrom
compass-comms/rig3528-e2e-fixture-plumbing
Open

test(e2e): marker-routed multi-turn scripts + observer-scoped fixture clients (RIG-3528)#1029
rigel-mintaka wants to merge 1 commit into
mainfrom
compass-comms/rig3528-e2e-fixture-plumbing

Conversation

@rigel-mintaka

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

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 3 PRs:

  1. main
  2. "test(e2e): marker-routed multi-turn scripts + observer-scoped fixture clients (RIG-3528)" (this PR)
  3. test(comms): direct coverage for resolve.go's handle-resolution contracts (RIG-3536) #1030
  4. test(e2e): multi-tenant comms visibility transport proof (RIG-3531) #1042

T1 of the RIG-3473 multi-actor comms coverage record: the fixture plumbing the
multi-actor legs (T2-T5, T14-T16) need, plus its own teeth. No leg lands here.

Marker scripts. A marker route settled exactly one TEXT turn, so a marker
could not serve a tool call at all. The naive fix (one CannedTurn per marker)
does not terminate: the route matches a substring of the whole request body and
returns unconditionally, while a tool-call turn needs two POSTs to settle, so
every POST re-serves the tool call and the agent loop spins forever.

So a marker now owns an ordered script with its OWN counter, and its terminal
element repeats once exhausted: [CannedToolCall, CannedText] serves the call,
then the settle, then the settle again. The per-marker counter is deliberately
separate from the positional served (its own mutex) because the invariant that
makes markers useful is that they never consume a positional slot -- that is what
keeps the root-supervisor Setup turn off every leg's script. Extracted
writeCannedTurn so the positional path and the marker routes settle identically;
the tool-call branch was previously inline and reachable only from the positional
path. newCannedMarker keeps its signature and behaviour as the one-element case.

Observer-scoped clients. Every fixture RPC rode the bootstrap-admin bearer,
and an admin sees everything, so no leg could prove a NEGATIVE -- what an account
CANNOT see. AsObserver mints a non-admin bearer over IssueToken and rebuilds both
clients through the existing newAuthedClients dial path. Its teeth are the admin
gate, not a passing read: an adminOnly RPC over the observer client must be
PermissionDenied, since a positive read would also pass if AsObserver silently
handed back the admin token -- which would make every future negative-visibility
assertion vacuous.

Setup wrappers. CreateUser/CreateChannel in CreateAgent's style; T4's first
setup line was unimplementable without them.

private is realized as PLACEMENT, not kind: ChannelKind has no private/public
member (CHANNEL/DM/GROUP_DM), and privacy in this schema is a property of a
channel's group. private=true is ungrouped (owner-scoped, membership-only);
private=false is a fresh top-level SHARED group, so every account can see it.

Verified: the marker teeth fail on the naive implementation ("marker POST#2
carried 1 tool calls, want the text SETTLE"); removing the terminal clamp or
letting the marker branch touch the positional counter each fail too. The two
podman bodies PASS against a real stack (71.9s / 35.3s), not just vet -tags podman. gofmt/vet/vet -tags podman/-race all clean.

Ledger-impact: none

Refs RIG-3528

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

@linear-code

linear-code Bot commented Sep 8, 2026

Copy link
Copy Markdown

RIG-3528

Base automatically changed from compass-comms/rig3527-relay-arm-coverage to main September 8, 2026 20:55
@trunk-io

trunk-io Bot commented Sep 8, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

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

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-comms-rig3528-e2e-fi.compass-eng-docs.pages.dev

Deployed from compass-comms/rig3528-e2e-fixture-plumbing at fd0058d.

Changed pages:

@rigel-mintaka
rigel-mintaka force-pushed the compass-comms/rig3528-e2e-fixture-plumbing branch from 009ab6c to 4d0392d Compare September 8, 2026 21:52
@rigel-mintaka
rigel-mintaka marked this pull request as ready for review September 8, 2026 22:22
… clients (RIG-3528)

T1 of the RIG-3473 multi-actor comms coverage record: the fixture plumbing the
multi-actor legs (T2-T5, T14-T16) need, plus its own teeth. No leg lands here.

**Marker scripts.** A marker route settled exactly one TEXT turn, so a marker
could not serve a tool call at all. The naive fix (one CannedTurn per marker)
does not terminate: the route matches a substring of the whole request body and
returns unconditionally, while a tool-call turn needs two POSTs to settle, so
every POST re-serves the tool call and the agent loop spins forever.

So a marker now owns an ordered script with its OWN counter, and its terminal
element repeats once exhausted: [CannedToolCall, CannedText] serves the call,
then the settle, then the settle again. The per-marker counter is deliberately
separate from the positional `served` (its own mutex) because the invariant that
makes markers useful is that they never consume a positional slot -- that is what
keeps the root-supervisor Setup turn off every leg's script. Extracted
writeCannedTurn so the positional path and the marker routes settle identically;
the tool-call branch was previously inline and reachable only from the positional
path. newCannedMarker keeps its signature and behaviour as the one-element case.

**Observer-scoped clients.** Every fixture RPC rode the bootstrap-admin bearer,
and an admin sees everything, so no leg could prove a NEGATIVE -- what an account
CANNOT see. AsObserver mints a non-admin bearer over IssueToken and rebuilds both
clients through the existing newAuthedClients dial path. Its teeth are the admin
gate, not a passing read: an adminOnly RPC over the observer client must be
PermissionDenied, since a positive read would also pass if AsObserver silently
handed back the admin token -- which would make every future negative-visibility
assertion vacuous.

**Setup wrappers.** CreateUser/CreateChannel in CreateAgent's style; T4's first
setup line was unimplementable without them.

`private` is realized as PLACEMENT, not kind: ChannelKind has no private/public
member (CHANNEL/DM/GROUP_DM), and privacy in this schema is a property of a
channel's group. private=true is ungrouped (owner-scoped, membership-only);
private=false is a fresh top-level SHARED group, so every account can see it.

Verified: the marker teeth fail on the naive implementation ("marker POST#2
carried 1 tool calls, want the text SETTLE"); removing the terminal clamp or
letting the marker branch touch the positional counter each fail too. The two
podman bodies PASS against a real stack (71.9s / 35.3s), not just `vet -tags
podman`. gofmt/vet/vet -tags podman/-race all clean.

Ledger-impact: none

Refs RIG-3528

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.

1 participant