protocol/testing/conformance/app
packages/protocol/src/testing/conformance/app
Purpose
Public barrel for app-layer conformance properties. App-layer conformance properties. Dispatch / lease / app-callback invariants — the 14dispatch-admission properties (request / authorize / release /
dispatch-lease-consumed / dispatch-lease-expired / dispatch-lease-get / slow-first
/ same-conv-concurrent / release-for-one-lease) plus app-disconnect
fail-policy and idempotence.
Each register* lives in its own file. The dispatch-admission
properties draw on the cross-impl driver in app/_driver.ts.
Public surface
ABANDON_OBSERVATION_BUFFER_MS
Variable
ABANDON_POLL_EXTRA_MS
Variable
APP_PROPERTIES
Variable
ConsumedFrameView
TypeAlias
DISPATCH_ADMISSION_CATEGORY
Variable
dispatchAdmissionViolation
Function
DispatchTestDriver
Interface
DispatchTestDriver instance per property,
acquired under the property’s Scope. Wires up the real server,
recipient + moderator clients, and shared task / conversation
fixtures.
DispatchVerdict
TypeAlias
DispatchAdmissionDecisionSchema.
Properties that need to script a moderator’s reply pass a
DispatchVerdict value to recipient.expectAuthorize /
respondWith; the driver encodes it to the wire shape internally.
FAST_ACK_THRESHOLD_MS
Variable
FORBIDDEN_ERROR_TAG
Variable
freshMessageId
Function
HOLD_DRAIN_BUFFER_MS
Variable
HOLD_RELEASE_MARGIN_MS
Variable
isUuidV4
Function
leaseId
Property
leaseId
Property
leaseId
Property
LeaseIdOnlyView
TypeAlias
LeaseState
TypeAlias
LeaseStateSchema. The driver’s
assertLeaseState polls app/dispatch/lease/get until the registry settles
to the named state or the bound elapses (the bound is per-property;
default 5 s).
makeDispatchTestDriver
Function
Scope. Releases
close every lifecycle client + drop the connected app registration.
Property authors call this from inside their property body; the driver
is per-property, never shared. Cross-property state leakage is the
exact failure mode the per-property scope prevents.
messageId
Property
ModeratorHandle
Interface
AppTestClient connected to the real
server under a moderator app identity, with HTTP registration plus
app/network/connect already driven to install a dispatch_authorize hook. Holds
the registered appId for app/dispatch/lease/get scope assertions.
NEGATIVE_OBSERVABILITY_WINDOW_MS
Variable
NO_SECOND_RELEASE_WINDOW_MS
Variable
RecipientHandle
Interface
AgentTestClient connected to the real
server under a recipient agent identity. All methods return Effects
scoped to the surrounding Scope; releasing the scope closes the
underlying agent client.
registerAppDisconnectFailPolicy
Function
registerDispatchAuthorizeTimeoutSynthesizesDeny
Function
registerDispatchAuthorizeVerdictResolves
Function
registerDispatchLeaseConsumedFiresOnFirstSend
Function
registerDispatchLeaseConsumedSuppressedOnSecondSend
Function
registerDispatchLeaseExpiredFiresOnTtl
Function
registerDispatchLeaseExpiredSuppressedOnConsumeBeforeTtl
Function
registerDispatchLeaseGetModeratorSeesRecord
Function
registerDispatchReleaseFiresAfterResolve
Function
registerDispatchReleaseSkippedOnAbandoned
Function
registerDispatchRequestAckMintsLease
Function
registerDispatchRequestRecipientDisconnectAbandons
Function
registerIdempotence
Function
registerReleaseForOneLeaseDoesNotWaitOnAnother
Function
registerSameConversationDispatchRequestsConcurrent
Function
registerSlowFirstDoesNotDelaySecondAck
Function
ReleaseFrameView
TypeAlias
SHORT_LEASE_TIMEOUT_MS
Variable
TIMEOUT_RELEASE_WAIT_MS
Variable
TINY_MODERATOR_TIMEOUT_MS
Variable
TTL_OBSERVATION_BUFFER_MS
Variable
verdict
Property
withDriver
Function
body, releases on completion.
Files
_driver.ts_helpers.tsapp-disconnect-fail-policy.tsdispatch-authorize-timeout.tsdispatch-authorize-verdict.tsdispatch-lease-consumed-fires-on-first-send.tsdispatch-lease-consumed-suppressed-on-second.tsdispatch-lease-expired-fires-on-ttl.tsdispatch-lease-expired-suppressed-on-consume.tsdispatch-lease-get-moderator-sees.tsdispatch-release-after-resolve.tsdispatch-release-skipped-on-abandoned.tsdispatch-request-ack.tsdispatch-request-recipient-disconnect.tsidempotence.tsindex.tsrelease-for-one-lease-does-not-wait.tssame-conv-dispatch-requests-concurrent.tsslow-first-does-not-delay-second-ack.ts