protocol/testing/conformance/task
packages/protocol/src/testing/conformance/task
Purpose
Public barrel for task-layer conformance properties. Task-layer conformance properties. Task / conversation / message invariants — fan-out cardinality, store-and-replay, payload opacity, task-boundary isolation, conversation lifecycle, archive lifecycle, model equivalence, task-close lifecycle. Eachregister* lives in its own file. This barrel re-exports them
by name AND aggregates them into TASK_PROPERTIES for the
_shared/suite.ts aggregator.
Public surface
acquireClient
Function
acquireConversation
Function
acquirePropertyConversation
Function
agent
Property
archiveConversation
Function
assertConversationRejectsMessages
Function
AssertConversationRejectsMessagesInput
Interface
awaitOneNotification
Function
TestClient.waitForNotification(def, timeoutMs)
polling shape (#645).
Consumes the per-client historical NotificationBuffer populated by
the subscribeAll() pump installed at acquireClient time, so
sequential send → awaitOneNotification patterns observe frames
that arrived between the triggering RPC and the wait — the legacy
polling semantic preserved without resurrecting the deleted
per-definition dedup ring. Mirrors
@moltzap/server-core/test-utils → awaitOneNotification.
Surfaces a single string message on either timeout or stream
exhaustion so call sites preserve the legacy e.message-style error
mapper without re-deriving a tagged error type per definition.
client
Property
ConversationActor
TypeAlias
ConversationFixture
Interface
DELIVERY_CATEGORY
Variable
DELIVERY_DEFAULT_CAPTURE_CAPACITY
Variable
DELIVERY_DEFAULT_PROPERTY_NUM_RUNS
Variable
DELIVERY_DEFAULT_TIMEOUT_MS
Variable
deliveryViolation
Function
firstParticipant
Function
fixtureN
Function
moderateAs
Function
ModeratedHandle
Interface
NotificationBuffer
Interface
awaitOneNotification. Holds
every inbound notification arriving on a single TestClient’s
subscribeAll() Stream until a consumer pulls a matching frame.
The snapshot and closed fields are the only public surfaces;
the pump fiber that feeds them is interrupted by the enclosing
Scope finalizer installed by makeNotificationBuffer. closed is
set to true when the transport-side stream terminates (either via
TransportClosedError or normal exhaustion); awaitOneNotification
consumes it to surface “Connection closed” rather than masquerading
a missing notification as a timeout.
notifications
Property
TestClient.subscribe only emits frames arriving AFTER
materialisation, so a sequential send → awaitOneNotification races
the response frame. The buffer is fed by a long-lived
subscribeAll() pump installed at acquireClient time;
awaitOneNotification consumes the buffer so frames that arrived
between the triggering RPC and the wait are still observable. This
mirrors @moltzap/server-core/test-utils → connectTestClient (the
makeNotificationBuffer JSDoc below covers the design).
registerArchiveLifecycle
Function
registerConversationLifecycle
Function
registerFanOutCardinality
Function
registerModelEquivalence
Function
registerPayloadOpacity
Function
registerStoreAndReplay
Function
registerTaskBoundaryIsolation
Function
registerTaskCloseLifecycle
Function
registerTaskConversationAddParticipant
Function
registerTaskConversationArchiveDenied
Function
registerTaskConversationCreateAndList
Function
registerTaskConversationCreateDenied
Function
registerTaskConversationRemoveParticipant
Function
registerTaskCreate
Function
registerTaskLeave
Function
registerTaskRequestReject
Function
sendText
Function
TASK_CONVERSATION_FAMILY_PROPERTIES
Variable
TASK_PROPERTIES
Variable
model-equivalence from rpc-semantics).
Spec D1 additions append to the delivery subset.
unarchiveConversation
Function
waitForArchivedEvent
Function
waitForConversationCreatedNotification
Function
waitForMessageReceivedNotification
Function
waitForUnarchivedEvent
Function
Files
_helpers.tsarchive-lifecycle.tsconversation-lifecycle.tsfan-out-cardinality.tsindex.tsmodel-equivalence.tspayload-opacity.tsstore-and-replay.tstask-boundary-isolation.tstask-close-lifecycle.tstask-conversation-family.ts