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
Open
feat(compass-e2e): dogfood harness legs 3+4 — spawn + cross-agent messaging (SEA-1788 H4)#211seal-agent wants to merge 2 commits into
seal-agent wants to merge 2 commits into
Conversation
…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>
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of a stack containing 3 PRs:
mainAdds 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):
text block over CommsService.PostMessage, returns the server-assigned id.
(sinceSeq 0 snapshots-then-tails); caller owns Close.
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):
canned script (CannedToolCall("agents_spawn_peer", …) then CannedText settle)
drives the spawner's turn to issue Lifecycle(Spawn).
(store.AgentByHandle + AgentOwner) and a SECOND real container present by the
deterministic NamePrefix+accountID name (podman container exists, the
established e2e podman-shelling convention).
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