d6b2f24c3f
One cross-client conformance pass; also closes first-cycle CLI-08. CLI-37: an MxStatusProxy entry is a failure iff `category != MX_STATUS_CATEGORY_OK`. The proto contract has always said so — `success` is the raw 16-bit COM member carried verbatim for diagnostics, not a boolean — but four clients branched on `success` alone and .NET required both, so the same gateway reply produced opposite verdicts per language. An absent entry stays success; a present entry with an UNSPECIFIED category is a failure, because the worker always maps a category and an unmapped one is not proven OK. CLI-38: a reply fails on HRESULT iff `hresult` is present and negative, so positive COM success codes such as S_FALSE (1) pass. .NET/Go/Java used `!= 0`, which errored on a parity-preserving S_FALSE that Python and Rust accepted. This makes the existing ClientLibrariesDesign.md claim true rather than rewriting the doc to describe the divergence. Four shared fixtures pin both rules cross-client, and each language suite also carries a table test for the two edges a fixture cannot express (absent entry, UNSPECIFIED category). A Java test fake that built a status with a bare `setSuccess(1)` and no category is fixed — under the category rule that reply was never a success.
88 lines
3.9 KiB
JSON
88 lines
3.9 KiB
JSON
{
|
|
"schemaVersion": 1,
|
|
"fixtureSet": "mxaccess-gateway-client-behavior",
|
|
"contractName": "mxaccess-gateway",
|
|
"gatewayProtocolVersion": 3,
|
|
"workerProtocolVersion": 1,
|
|
"protoInputManifest": "clients/proto/proto-inputs.json",
|
|
"fixtures": [
|
|
{
|
|
"id": "command-reply.register.ok",
|
|
"category": "command_replies",
|
|
"messageType": "mxaccess_gateway.v1.MxCommandReply",
|
|
"path": "command-replies/register.ok.reply.json",
|
|
"expectation": "Successful command replies preserve protocol status, HRESULT, return value, status arrays, and method-specific output."
|
|
},
|
|
{
|
|
"id": "command-reply.write.mxaccess-failure",
|
|
"category": "command_replies",
|
|
"messageType": "mxaccess_gateway.v1.MxCommandReply",
|
|
"path": "command-replies/write.mxaccess-failure.reply.json",
|
|
"expectation": "MXAccess failures are data-bearing replies with HRESULT and status details, not transport failures."
|
|
},
|
|
{
|
|
"id": "command-reply.write.status-category-error-success-set",
|
|
"category": "command_replies",
|
|
"messageType": "mxaccess_gateway.v1.MxCommandReply",
|
|
"path": "command-replies/write.status-category-error-success-set.reply.json",
|
|
"expectation": "A status entry fails when its category is not MX_STATUS_CATEGORY_OK, even though the raw success member is non-zero."
|
|
},
|
|
{
|
|
"id": "command-reply.write.status-category-ok-success-zero",
|
|
"category": "command_replies",
|
|
"messageType": "mxaccess_gateway.v1.MxCommandReply",
|
|
"path": "command-replies/write.status-category-ok-success-zero.reply.json",
|
|
"expectation": "A status entry succeeds when its category is MX_STATUS_CATEGORY_OK, even though the raw success member is zero."
|
|
},
|
|
{
|
|
"id": "command-reply.write.hresult-s-false",
|
|
"category": "command_replies",
|
|
"messageType": "mxaccess_gateway.v1.MxCommandReply",
|
|
"path": "command-replies/write.hresult-s-false.reply.json",
|
|
"expectation": "A positive HRESULT such as S_FALSE (1) is a COM success code and does not fail the reply."
|
|
},
|
|
{
|
|
"id": "command-reply.write.hresult-e-fail",
|
|
"category": "command_replies",
|
|
"messageType": "mxaccess_gateway.v1.MxCommandReply",
|
|
"path": "command-replies/write.hresult-e-fail.reply.json",
|
|
"expectation": "A negative HRESULT fails the reply even when every status entry reports MX_STATUS_CATEGORY_OK."
|
|
},
|
|
{
|
|
"id": "event-stream.session-ordered",
|
|
"category": "event_streams",
|
|
"messageType": "mxaccess_gateway.v1.MxEvent",
|
|
"path": "event-streams/session-event-stream.json",
|
|
"expectation": "Clients preserve per-session event order and event family bodies exactly as emitted."
|
|
},
|
|
{
|
|
"id": "values.conversion-cases",
|
|
"category": "value_conversion",
|
|
"messageType": "mxaccess_gateway.v1.MxValue",
|
|
"path": "values/value-conversion-cases.json",
|
|
"expectation": "Clients expose typed projections and keep raw fallback metadata when conversion is incomplete."
|
|
},
|
|
{
|
|
"id": "statuses.conversion-cases",
|
|
"category": "status_conversion",
|
|
"messageType": "mxaccess_gateway.v1.MxStatusProxy",
|
|
"path": "statuses/status-conversion-cases.json",
|
|
"expectation": "Clients preserve every MXSTATUS_PROXY field, including raw category/source values."
|
|
},
|
|
{
|
|
"id": "auth.error-cases",
|
|
"category": "auth_errors",
|
|
"messageType": "client_behavior.v1.AuthErrorCase",
|
|
"path": "auth/auth-error-cases.json",
|
|
"expectation": "Clients map authentication and authorization failures distinctly and redact credentials."
|
|
},
|
|
{
|
|
"id": "timeout-cancel.expected-behavior",
|
|
"category": "timeout_cancel",
|
|
"messageType": "client_behavior.v1.TimeoutCancelCase",
|
|
"path": "timeout-cancel/timeout-cancel-cases.json",
|
|
"expectation": "Client cancellation stops waiting locally but does not imply an in-flight MXAccess COM call was aborted."
|
|
}
|
|
]
|
|
}
|