This document defines the harness contract used by fitz-go, fitz-ts, and fitz-py to execute the shared scenario suite in cross-language-conformance-suite.yaml.
- Run the same behavioral scenarios in all client SDKs.
- Produce machine-comparable JSON results.
- Enforce strict reconnect parity and first-class timeout/cancellation/cleanup semantics.
Each runner must accept these inputs:
- suite_path: path to cross-language-conformance-suite.yaml
- client_name: one of fitz-go, fitz-ts, fitz-py
- transport: websocket or tcp
- auth_mode: anonymous, valid_jwt, invalid_jwt
- broker_addr: endpoint for selected transport/auth mode
- output_path: file path for JSON result
Recommended optional inputs:
- seed: deterministic random seed for generated routes/payloads
- timeout_scale: multiplier for slower CI environments
- reconnect_enabled_override: force reconnect on/off to test contract boundaries
- Parse the suite file and execute every listed scenario in order.
- For each scenario, isolate state using unique route prefixes.
Scenario setups may include optional load-shaping knobs such as
concurrency_limitandburst_size; runners should honor them when present and ignore unknown fields. - Capture verdict using the result schema from the suite.
- Attach evidence in a language-native but normalized format:
- operation traces
- error type/code
- state transitions
- timing fields
- Continue execution after failures and record all results.
- Exit non-zero if any P0 scenario is not pass.
Each emitted scenario record must include:
- scenario_id
- client
- transport
- auth_mode
- verdict
- latency_ms
- evidence
- notes
Example:
{
"scenario_id": "CS-008",
"client": "fitz-ts",
"transport": "websocket",
"auth_mode": "valid_jwt",
"verdict": "pass",
"latency_ms": 47,
"evidence": {
"error_type": "AbortError",
"post_cancel_request_succeeds": true
},
"notes": "rpc call canceled via AbortSignal"
}Top-level output JSON should contain:
- client
- suite_version
- run_started_at
- run_finished_at
- scenarios: array of scenario records
- summary: aggregate pass/fail counts and p0/p1 rates
These are recommended command shapes (exact implementation may vary):
- fitz-go: go test ./conformance -run TestConformance -args -suite -transport -auth -out
- fitz-ts: npm run test:conformance -- --suite --transport --auth --out
- fitz-py: pytest tests/conformance -q --suite --transport --auth --out
Run each client against:
- transport: websocket, tcp
- auth_mode: anonymous, valid_jwt
Run auth_mode=invalid_jwt for CS-002 and connection-focused scenarios.
Minimal matrix:
- fitz-go + websocket + anonymous
- fitz-go + websocket + valid_jwt
- fitz-go + tcp + anonymous
- fitz-go + tcp + valid_jwt
- fitz-ts + websocket + anonymous
- fitz-ts + websocket + valid_jwt
- fitz-ts + tcp + anonymous
- fitz-ts + tcp + valid_jwt
- fitz-py + websocket + anonymous
- fitz-py + websocket + valid_jwt
- fitz-py + tcp + anonymous
- fitz-py + tcp + valid_jwt
- CS-001..CS-003 map directly to connection and basic operation criteria.
- CS-004..CS-006 map to error handling criteria.
- CS-007..CS-010 enforce timeout/cancel/reconnect behavior parity.
- CS-010 MUST drop the live TCP or WebSocket transport while leaving the broker available, then prove recovery through the same client instance. Closing one client and constructing another is not reconnect evidence.
- CS-011..CS-013 enforce stream semantics.
- CS-016 enforces filtered stream replay, optional stream metadata, and typed handling of unsupported or malformed filter payloads.
- CS-014..CS-017 enforce concurrency, bounded-load, and lifecycle cleanup semantics.
- Add a conformance test target in each client repo.
- Implement scenario adapters that invoke each language's public client API.
- Emit normalized JSON output.
- Add CI gate: fail build if any P0 scenario is not pass.
- Add trend reporting for P1 scenarios to prevent drift.