{
  "schemaVersion": 1,
  "fixtureSet": "mxaccess-gateway-cross-language-smoke-matrix",
  "description": "Documented command matrix for opt-in cross-language client smoke runs against a live gateway.",
  "integrationGate": {
    "variable": "MXGATEWAY_INTEGRATION",
    "requiredValue": "1"
  },
  "defaultInputs": {
    "endpointVariable": "MXGATEWAY_ENDPOINT",
    "endpointFallback": "localhost:5000",
    "apiKeyVariable": "MXGATEWAY_API_KEY",
    "itemVariable": "MXGATEWAY_TEST_ITEM",
    "itemFallback": "TestChildObject.TestInt",
    "eventLimit": 1,
    "optionalWriteValueVariable": "MXGATEWAY_TEST_WRITE_VALUE",
    "optionalWriteType": "int32"
  },
  "requiredOperations": [
    "open-session",
    "register",
    "add-item",
    "advise",
    "stream-events",
    "close-session"
  ],
  "optionalOperations": [
    "write"
  ],
  "jsonComparison": {
    "requiredOutputMode": "json",
    "commonFields": [
      "language",
      "operation",
      "sessionId",
      "serverHandle",
      "itemHandle",
      "events",
      "closeStatus"
    ],
    "comparisonFields": [
      "sessionId",
      "serverHandle",
      "itemHandle",
      "eventCount",
      "eventFamily",
      "workerSequence",
      "protocolStatus",
      "hresult",
      "statuses"
    ]
  },
  "failureOutput": {
    "requiredContextFields": [
      "language",
      "endpoint",
      "authContext"
    ],
    "authContext": {
      "sourceVariable": "MXGATEWAY_API_KEY",
      "redactedValue": "<redacted>",
      "forbiddenLiterals": [
        "mxgw_visible_secret",
        "Bearer mxgw_visible_secret"
      ]
    }
  },
  "clients": [
    {
      "language": "dotnet",
      "displayName": ".NET",
      "workingDirectory": ".",
      "integrationSkip": {
        "variable": "MXGATEWAY_INTEGRATION",
        "requiredValue": "1"
      },
      "failureContextFields": [
        "language",
        "endpoint",
        "authContext"
      ],
      "commands": [
        {
          "operation": "open-session",
          "command": "dotnet run --project clients/dotnet/MxGateway.Client.Cli -- open-session --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --client-name mxgw-dotnet-smoke --json"
        },
        {
          "operation": "register",
          "command": "dotnet run --project clients/dotnet/MxGateway.Client.Cli -- register --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --client-name mxgw-dotnet-smoke --json"
        },
        {
          "operation": "add-item",
          "command": "dotnet run --project clients/dotnet/MxGateway.Client.Cli -- add-item --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --server-handle <server-handle> --item TestChildObject.TestInt --json"
        },
        {
          "operation": "advise",
          "command": "dotnet run --project clients/dotnet/MxGateway.Client.Cli -- advise --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --server-handle <server-handle> --item-handle <item-handle> --json"
        },
        {
          "operation": "stream-events",
          "command": "dotnet run --project clients/dotnet/MxGateway.Client.Cli -- stream-events --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --max-events 1 --json"
        },
        {
          "operation": "close-session",
          "command": "dotnet run --project clients/dotnet/MxGateway.Client.Cli -- close-session --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --json"
        }
      ],
      "optionalWriteCommand": "dotnet run --project clients/dotnet/MxGateway.Client.Cli -- write --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --server-handle <server-handle> --item-handle <item-handle> --type int32 --value <write-value> --json",
      "bundledSmokeCommand": "dotnet run --project clients/dotnet/MxGateway.Client.Cli -- smoke --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --item TestChildObject.TestInt --json"
    },
    {
      "language": "go",
      "displayName": "Go",
      "workingDirectory": "clients/go",
      "integrationSkip": {
        "variable": "MXGATEWAY_INTEGRATION",
        "requiredValue": "1"
      },
      "failureContextFields": [
        "language",
        "endpoint",
        "authContext"
      ],
      "commands": [
        {
          "operation": "open-session",
          "command": "go run ./cmd/mxgw-go open-session -endpoint localhost:5000 -api-key-env MXGATEWAY_API_KEY -client-session-name mxgw-go-smoke -plaintext -json"
        },
        {
          "operation": "register",
          "command": "go run ./cmd/mxgw-go register -endpoint localhost:5000 -api-key-env MXGATEWAY_API_KEY -session-id <session-id> -client-name mxgw-go-smoke -plaintext -json"
        },
        {
          "operation": "add-item",
          "command": "go run ./cmd/mxgw-go add-item -endpoint localhost:5000 -api-key-env MXGATEWAY_API_KEY -session-id <session-id> -server-handle <server-handle> -item TestChildObject.TestInt -plaintext -json"
        },
        {
          "operation": "advise",
          "command": "go run ./cmd/mxgw-go advise -endpoint localhost:5000 -api-key-env MXGATEWAY_API_KEY -session-id <session-id> -server-handle <server-handle> -item-handle <item-handle> -plaintext -json"
        },
        {
          "operation": "stream-events",
          "command": "go run ./cmd/mxgw-go stream-events -endpoint localhost:5000 -api-key-env MXGATEWAY_API_KEY -session-id <session-id> -limit 1 -plaintext -json"
        },
        {
          "operation": "close-session",
          "command": "go run ./cmd/mxgw-go close-session -endpoint localhost:5000 -api-key-env MXGATEWAY_API_KEY -session-id <session-id> -plaintext -json"
        }
      ],
      "optionalWriteCommand": "go run ./cmd/mxgw-go write -endpoint localhost:5000 -api-key-env MXGATEWAY_API_KEY -session-id <session-id> -server-handle <server-handle> -item-handle <item-handle> -type int32 -value <write-value> -plaintext -json",
      "bundledSmokeCommand": "go run ./cmd/mxgw-go smoke -endpoint localhost:5000 -api-key-env MXGATEWAY_API_KEY -item TestChildObject.TestInt -plaintext -json"
    },
    {
      "language": "rust",
      "displayName": "Rust",
      "workingDirectory": "clients/rust",
      "integrationSkip": {
        "variable": "MXGATEWAY_INTEGRATION",
        "requiredValue": "1"
      },
      "failureContextFields": [
        "language",
        "endpoint",
        "authContext"
      ],
      "commands": [
        {
          "operation": "open-session",
          "command": "cargo run -p mxgw-cli -- open-session --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --client-name mxgw-rust-smoke --json"
        },
        {
          "operation": "register",
          "command": "cargo run -p mxgw-cli -- register --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --client-name mxgw-rust-smoke --json"
        },
        {
          "operation": "add-item",
          "command": "cargo run -p mxgw-cli -- add-item --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --server-handle <server-handle> --item TestChildObject.TestInt --json"
        },
        {
          "operation": "advise",
          "command": "cargo run -p mxgw-cli -- advise --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --server-handle <server-handle> --item-handle <item-handle> --json"
        },
        {
          "operation": "stream-events",
          "command": "cargo run -p mxgw-cli -- stream-events --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --max-events 1 --json"
        },
        {
          "operation": "close-session",
          "command": "cargo run -p mxgw-cli -- close-session --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --json"
        }
      ],
      "optionalWriteCommand": "cargo run -p mxgw-cli -- write --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --session-id <session-id> --server-handle <server-handle> --item-handle <item-handle> --value-type int32 --value <write-value> --json",
      "bundledSmokeCommand": "cargo run -p mxgw-cli -- smoke --endpoint http://localhost:5000 --api-key-env MXGATEWAY_API_KEY --item TestChildObject.TestInt --json"
    },
    {
      "language": "python",
      "displayName": "Python",
      "workingDirectory": "clients/python",
      "integrationSkip": {
        "variable": "MXGATEWAY_INTEGRATION",
        "requiredValue": "1"
      },
      "failureContextFields": [
        "language",
        "endpoint",
        "authContext"
      ],
      "commands": [
        {
          "operation": "open-session",
          "command": "mxgw-py open-session --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --client-name mxgw-py-smoke --json"
        },
        {
          "operation": "register",
          "command": "mxgw-py register --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --client-name mxgw-py-smoke --json"
        },
        {
          "operation": "add-item",
          "command": "mxgw-py add-item --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --server-handle <server-handle> --item TestChildObject.TestInt --json"
        },
        {
          "operation": "advise",
          "command": "mxgw-py advise --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --server-handle <server-handle> --item-handle <item-handle> --json"
        },
        {
          "operation": "stream-events",
          "command": "mxgw-py stream-events --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --max-events 1 --json"
        },
        {
          "operation": "close-session",
          "command": "mxgw-py close-session --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --json"
        }
      ],
      "optionalWriteCommand": "mxgw-py write --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --server-handle <server-handle> --item-handle <item-handle> --type int32 --value <write-value> --json",
      "bundledSmokeCommand": "mxgw-py smoke --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --item TestChildObject.TestInt --max-events 1 --json"
    },
    {
      "language": "java",
      "displayName": "Java",
      "workingDirectory": "clients/java",
      "integrationSkip": {
        "variable": "MXGATEWAY_INTEGRATION",
        "requiredValue": "1"
      },
      "failureContextFields": [
        "language",
        "endpoint",
        "authContext"
      ],
      "commands": [
        {
          "operation": "open-session",
          "command": "gradle :mxgateway-cli:run --args=\"open-session --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --client-session-name mxgw-java-smoke --json\""
        },
        {
          "operation": "register",
          "command": "gradle :mxgateway-cli:run --args=\"register --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --client-name mxgw-java-smoke --json\""
        },
        {
          "operation": "add-item",
          "command": "gradle :mxgateway-cli:run --args=\"add-item --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --server-handle <server-handle> --item TestChildObject.TestInt --json\""
        },
        {
          "operation": "advise",
          "command": "gradle :mxgateway-cli:run --args=\"advise --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --server-handle <server-handle> --item-handle <item-handle> --json\""
        },
        {
          "operation": "stream-events",
          "command": "gradle :mxgateway-cli:run --args=\"stream-events --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --limit 1 --json\""
        },
        {
          "operation": "close-session",
          "command": "gradle :mxgateway-cli:run --args=\"close-session --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --json\""
        }
      ],
      "optionalWriteCommand": "gradle :mxgateway-cli:run --args=\"write --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --session-id <session-id> --server-handle <server-handle> --item-handle <item-handle> --type int32 --value <write-value> --json\"",
      "bundledSmokeCommand": "gradle :mxgateway-cli:run --args=\"smoke --endpoint localhost:5000 --api-key-env MXGATEWAY_API_KEY --plaintext --item TestChildObject.TestInt --json\""
    }
  ]
}
