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 15dispatch-admission properties (request / authorize / release /
dispatches-consumed / dispatches-expired / dispatches-get / slow-first
/ same-conv-concurrent / release-for-one-lease) plus app-disconnect
fail-policy, hook-gated delivery (executable since #560), multi-app FIFO
(tombstoned), spurious app-callback frame handling (tombstoned), and
idempotence.
Each register* lives in its own file. The per-dispatch-admission
properties draw on the cross-impl driver in app/_driver.ts (carved
from legacy conformance/test-server-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.
DispatchTestDriverConfig
Interface
taskAppId controls whether the server-side path is
app-bound (moderated, default) or default-grant. Default: app-bound
via taskAppId: "conformance-test-app". The default-grant properties
(none today; reserved for future) pass taskAppId: null.
moderatorTimeoutMs is propagated to the manifest’s
hooks.dispatch_authorize.timeout_ms. Properties that exercise the
moderator-response TTL pass a small value (e.g., 200 ms); properties
that don’t care pass the default 5_000 ms.
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_CODE
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 dispatches/get until the registry settles
to the named state or the bound elapses (impl-staff picks the bound
per-property; default 5 s).
makeDispatchTestDriver
Function
Scope. Releases
close every TestClient + drop the apps/register 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
apps/register already
driven to install a dispatch_authorize hook for the test app. Holds
the registered appId for dispatches/get scope assertions.
NEGATIVE_OBSERVABILITY_WINDOW_MS
Variable
NO_SECOND_RELEASE_WINDOW_MS
Variable
RecipientHandle
Interface
Scope; releasing the scope closes the
underlying TestClient.
registerAppDisconnectFailPolicy
Function
registerDispatchAuthorizeTimeoutSynthesizesDeny
Function
registerDispatchAuthorizeVerdictResolves
Function
registerDispatchesConsumedFiresOnFirstSend
Function
registerDispatchesConsumedSuppressedOnSecondSend
Function
registerDispatchesExpiredFiresOnTtl
Function
registerDispatchesExpiredSuppressedOnConsumeBeforeTtl
Function
registerDispatchesGetModeratorSeesRecord
Function
registerDispatchesGetNonModeratorRejected
Function
registerDispatchReleaseFiresAfterResolve
Function
registerDispatchReleaseSkippedOnAbandoned
Function
registerDispatchRequestAckMintsLease
Function
registerDispatchRequestRecipientDisconnectAbandons
Function
registerHookGatedDelivery
Function
registerIdempotence
Function
registerMultiAppFifoShortCircuit
Function
registerReleaseForOneLeaseDoesNotWaitOnAnother
Function
registerSameConversationDispatchesConcurrent
Function
registerSlowFirstDoesNotDelaySecondAck
Function
registerSpuriousAppCallbackFrameHandling
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-release-after-resolve.tsdispatch-release-skipped-on-abandoned.tsdispatch-request-ack.tsdispatch-request-recipient-disconnect.tsdispatches-consumed-fires-on-first-send.tsdispatches-consumed-suppressed-on-second.tsdispatches-expired-fires-on-ttl.tsdispatches-expired-suppressed-on-consume.tsdispatches-get-moderator-sees.tsdispatches-get-non-moderator-rejected.tshook-gated-delivery.tsidempotence.tsindex.tsmulti-app-fifo-short-circuit.tsrelease-for-one-lease-does-not-wait.tssame-conv-dispatches-concurrent.tsslow-first-does-not-delay-second-ack.tsspurious-app-callback-frame.ts