SDK Test Suite v2.2 Contract Changes
This document describes every contract change between v2.1 and v2.2. SDK implementations must update their test services to conform to this version.
Proxy
ProxyRequest: new optional scope and limitKey fields
ProxyRequest {
serviceName: string
virtualObjectKey?: string
handlerName: string
message: bytes
delayMillis?: number
idempotencyKey?: string
scope?: string // NEW — optional, default absent/null
limitKey?: string // NEW — optional, default absent/null
}
Two new optional fields on ProxyRequest. When set, the implementation must attach them as the scope / limit-key options on the outgoing service-to-service call it issues — for every code path that consumes a ProxyRequest: call, oneWayCall, and each entry of manyCalls.
Concretely, forward them to the generic call/send API, e.g.:
ctx.genericCall({ ..., scope: request.scope, limitKey: request.limitKey })
ctx.genericSend({ ..., scope: request.scope, limitKey: request.limitKey })When both are absent (null), the call must be issued exactly as before, so this change is backwards compatible with existing tests — only the new ServiceToServiceScopeConcurrency test sets them.
Notes:
scopeis only supported for@Servicetargets (a scoped call to a Virtual Object is rejected by the runtime).- These options require invocation protocol v7; the runtime exercising this test runs with
RESTATE_EXPERIMENTAL_ENABLE_PROTOCOL_V7=trueandRESTATE_EXPERIMENTAL_ENABLE_VQUEUES=true.