# Streaming API Contract Compatibility Report

Last updated: 2026-03-20

## Scope

This report covers the repository-implemented Streaming API subset under [tests/contract/streaming_api](/Users/liangzhiyuan/Projects/MetaDrivenPlatform4AI/tests/contract/streaming_api).

Current inventory is limited to the mounted CometD routes:

- `POST /cometd/{version}/handshake`
- `POST /cometd/{version}/connect`
- `POST /cometd/{version}/subscribe`
- `POST /cometd/{version}/disconnect`

## Current Status

- `catalog.yaml` is endpoint-level and limited to CometD routes.
- A live smoke test now covers `POST /cometd/{version}/handshake` in [post_handshake_test.go](/Users/liangzhiyuan/Projects/MetaDrivenPlatform4AI/tests/contract/streaming_api/cometd/post_handshake_test.go).
- Local-only smoke tests now cover `POST /cometd/{version}/connect`, `POST /cometd/{version}/subscribe`, and `POST /cometd/{version}/disconnect` using fast-failure request shapes so they stay short-running.
- `/ws` is intentionally excluded from the Salesforce contract inventory.
- Salesforce sandbox currently returns `404` for the backend-specific split handshake route, so sandbox runs mark this endpoint as an explicit compatibility gap instead of a passing parity case.

## Verification

Compile check:

```bash
cd /Users/liangzhiyuan/Projects/MetaDrivenPlatform4AI/tests/contract
go test ./streaming_api/... -run '^$'
```

Live run:

```bash
cd /Users/liangzhiyuan/Projects/MetaDrivenPlatform4AI/tests/contract
CONTRACT_TARGET=sandbox go test ./streaming_api/... -count=1
```
