Skip to content

feat(compass-e2e): dogfood harness legs 3+4 — spawn + cross-agent messaging (SEA-1788 H4) - #211

Open
seal-agent wants to merge 2 commits into
seal-1788-gap2-canned-toolcallsfrom
seal-1788-h4-legs34
Open

feat(compass-e2e): dogfood harness legs 3+4 — spawn + cross-agent messaging (SEA-1788 H4)#211
seal-agent wants to merge 2 commits into
seal-1788-gap2-canned-toolcallsfrom
seal-1788-h4-legs34

Conversation

@seal-agent

@seal-agent seal-agent commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 3 PRs:

  1. main
  2. feat(compass-e2e): script canned-model tool_calls turns for the dogfood harness (SEA-1787 gap-2) #208
  3. "feat(compass-e2e): dogfood harness legs 3+4 — spawn + cross-agent messaging (SEA-1788 H4)" (this PR)
  4. feat(compass-e2e): dogfood harness leg 5 — persist + resume across a container boundary (SEA-1789 H5) #212

Adds the harness messaging primitives and the legs-3/4 scenario test for the
Compass dogfood e2e harness, stacked on the canned-model tool_calls scripting
surface (gap-2).

go/e2e/comms_ops.go (//go:build podman, methods on *Fixture, styled after
agent_ops.go — bounded ctx, error-return not panic, no sleeps/polls):

  • PostMessage(ctx, channelID, topicName, text) (messageID, error) — posts one
    text block over CommsService.PostMessage, returns the server-assigned id.
  • SubscribeComms(ctx, sinceSeq) — opens the SubscribeComms server-stream
    (sinceSeq 0 snapshots-then-tails); caller owns Close.
  • AwaitDelivery(ctx, stream, match) — fully event-gated wait for a
    MessagePosted whose Message satisfies match; buffered pump chan, no leak past
    Close, ctx-bounded via deliverTimeout.
    go/e2e/timeouts.go: add deliverTimeout (bounds AwaitDelivery).

go/e2e/legthreefour_test.go (//go:build podman, podmanUsable() skip guard):

  • TestLegThreeFourSpawnAndMessaging, modeled on TestLegTwoRealTurn. A 2-turn
    canned script (CannedToolCall("agents_spawn_peer", …) then CannedText settle)
    drives the spawner's turn to issue Lifecycle(Spawn).
  • Leg 3: asserts a fresh peer account with F2 ownership inheritance
    (store.AgentByHandle + AgentOwner) and a SECOND real container present by the
    deterministic NamePrefix+accountID name (podman container exists, the
    established e2e podman-shelling convention).
  • Leg 4: posts an @mention, asserts the observable bus fan (post committed +
    delivered onto a live SubscribeComms subscription via AwaitDelivery). The
    recipient-side steer-vs-deliver split is flagged TODO(SEA-1788): the op-kind
    rides the internal per-session AgentControl Control stream, not a comms-bus
    event SubscribeComms observes, so it needs a harness seam that does not yet
    exist.

Present-but-SKIPPED (RED) on the bare stack, exactly as TestLegTwoRealTurn was on
H2: the scenario's green is gated on the full H3 agent-lane (native tool
registration + headless approval, PR #202 gaps 1+3) plus the assembled agent
image (design.md:655-659). It compiles under -tags podman and is correctly
skip-guarded; it is not a passing stub.

Refs SEA-1788
Co-authored-by: Matt Wilkinson matt@sealedsecurity.com

…saging (SEA-1788 H4)

Adds the harness messaging primitives and the legs-3/4 scenario test for the
Compass dogfood e2e harness, stacked on the canned-model tool_calls scripting
surface (gap-2).

go/e2e/comms_ops.go (//go:build podman, methods on *Fixture, styled after
agent_ops.go — bounded ctx, error-return not panic, no sleeps/polls):
  - PostMessage(ctx, channelID, topicName, text) (messageID, error) — posts one
    text block over CommsService.PostMessage, returns the server-assigned id.
  - SubscribeComms(ctx, sinceSeq) — opens the SubscribeComms server-stream
    (sinceSeq 0 snapshots-then-tails); caller owns Close.
  - AwaitDelivery(ctx, stream, match) — fully event-gated wait for a
    MessagePosted whose Message satisfies match; buffered pump chan, no leak past
    Close, ctx-bounded via deliverTimeout.
go/e2e/timeouts.go: add deliverTimeout (bounds AwaitDelivery).

go/e2e/legthreefour_test.go (//go:build podman, podmanUsable() skip guard):
  - TestLegThreeFourSpawnAndMessaging, modeled on TestLegTwoRealTurn. A 2-turn
    canned script (CannedToolCall("agents_spawn_peer", …) then CannedText settle)
    drives the spawner's turn to issue Lifecycle(Spawn).
  - Leg 3: asserts a fresh peer account with F2 ownership inheritance
    (store.AgentByHandle + AgentOwner) and a SECOND real container present by the
    deterministic NamePrefix+accountID name (podman container exists, the
    established e2e podman-shelling convention).
  - Leg 4: posts an @mention, asserts the observable bus fan (post committed +
    delivered onto a live SubscribeComms subscription via AwaitDelivery). The
    recipient-side steer-vs-deliver split is flagged TODO(SEA-1788): the op-kind
    rides the internal per-session AgentControl Control stream, not a comms-bus
    event SubscribeComms observes, so it needs a harness seam that does not yet
    exist.

Present-but-SKIPPED (RED) on the bare stack, exactly as TestLegTwoRealTurn was on
H2: the scenario's green is gated on the full H3 agent-lane (native tool
registration + headless approval, PR #202 gaps 1+3) plus the assembled agent
image (design.md:655-659). It compiles under -tags podman and is correctly
skip-guarded; it is not a passing stub.

Refs SEA-1788
Co-authored-by: Matt Wilkinson <matt@sealedsecurity.com>
@linear-code

linear-code Bot commented Aug 7, 2026

Copy link
Copy Markdown

SEA-1788

…rgs, one-sub comment, exact mention-body assert

Additive review-round-1 fixes on PR #211 (SEA-1788 H4), all in
go/e2e/legthreefour_test.go, all test-only:

- Build spawnArgsJSON via fmt.Sprintf from peerHandle/peerDisplayName so the
  minted handle + display name cannot drift from what the leg-3 assertions
  resolve; gives peerDisplayName a real referent (was dead).
- Rewrite the leg-4 subscription comment: it claimed "TWO subscriptions" but
  only one is opened (the recipient steer/deliver split is the deferred
  TODO(SEA-1788) below, not observed here).
- Tighten the delivered-message assertion from strings.Contains to exact
  equality against mentionText — the AwaitDelivery id-match already pins the
  message, so containment was near-tautological; equality makes it a real
  post->fan->deliver text-fidelity check. Drops the now-unused strings import,
  adds fmt.

Refs SEA-1788

Co-authored-by: Matt Wilkinson <matt@sealedsecurity.com>
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