feat(protocol): freeze M4 native session RC6 contract

This commit is contained in:
sechmachine
2026-08-13 07:18:03 +07:00
parent 4693102b3c
commit 8eacc4fda9
35 changed files with 5334 additions and 473 deletions
@@ -9,9 +9,12 @@ valid-controller 1 gateway_input hex=5647493105110200030004ffff00010002000300040
valid-controller-release 1 gateway_input hex=5647493105110200000000000000000000000000000000 valid
valid-absolute-mouse 1 gateway_input hex=56474931060804d202370a0005a0 valid
valid-scroll 1 gateway_input hex=564749310704ff880078 valid
valid-controller-arrival 1 gateway_input hex=564749310808020003010000001f valid
valid-idr 1 gateway_feedback hex=5647463100010000 valid
valid-fec 1 gateway_feedback hex=56474631000200150000002a000500030002000a000200080002140001 valid
valid-terminal-receipt 1 gateway_feedback hex=5647463100030000 valid
valid-quality-prompt 1 gateway_feedback hex=564746310004001812345678123456781234567812345678000000000000002a valid
valid-stop-prompt 1 gateway_feedback hex=564746310005001012345678123456781234567812345678 valid
valid-termination 1 gateway_feedback hex=564746310110000400000001 valid
valid-rumble 1 gateway_feedback hex=56474631011100050112345678 valid
valid-hdr 1 gateway_feedback hex=564746310112000101 valid
@@ -30,5 +33,9 @@ invalid-terminal-receipt-direction 1 gateway_feedback hex=5647463101030000 inval
invalid-terminal-receipt-body 1 gateway_feedback hex=5647463100030001ff invalid:length
invalid-terminal-receipt-truncated 1 gateway_feedback hex=56474631000300 invalid:truncated
invalid-terminal-receipt-length 1 gateway_feedback hex=5647463100030001 invalid:length
invalid-feedback-type 1 gateway_feedback hex=5647463100040000 invalid:type
invalid-feedback-type 1 gateway_feedback hex=5647463100060000 invalid:type
invalid-quality-prompt-trailing 1 gateway_feedback hex=564746310004001912345678123456781234567812345678000000000000002a00 invalid:length
invalid-quality-prompt-zero-uuid 1 gateway_feedback hex=564746310004001800000000000000000000000000000000000000000000002a invalid:field
invalid-stop-prompt-zero-uuid 1 gateway_feedback hex=564746310005001000000000000000000000000000000000 invalid:field
invalid-controller-arrival-family 1 gateway_input hex=564749310808020003040000001f invalid:field
invalid-feedback-length 1 gateway_feedback hex=5647463101100003000000 invalid:length
1 id version kind input expected
9 valid-controller-release 1 gateway_input hex=5647493105110200000000000000000000000000000000 valid
10 valid-absolute-mouse 1 gateway_input hex=56474931060804d202370a0005a0 valid
11 valid-scroll 1 gateway_input hex=564749310704ff880078 valid
12 valid-controller-arrival 1 gateway_input hex=564749310808020003010000001f valid
13 valid-idr 1 gateway_feedback hex=5647463100010000 valid
14 valid-fec 1 gateway_feedback hex=56474631000200150000002a000500030002000a000200080002140001 valid
15 valid-terminal-receipt 1 gateway_feedback hex=5647463100030000 valid
16 valid-quality-prompt 1 gateway_feedback hex=564746310004001812345678123456781234567812345678000000000000002a valid
17 valid-stop-prompt 1 gateway_feedback hex=564746310005001012345678123456781234567812345678 valid
18 valid-termination 1 gateway_feedback hex=564746310110000400000001 valid
19 valid-rumble 1 gateway_feedback hex=56474631011100050112345678 valid
20 valid-hdr 1 gateway_feedback hex=564746310112000101 valid
33 invalid-terminal-receipt-body 1 gateway_feedback hex=5647463100030001ff invalid:length
34 invalid-terminal-receipt-truncated 1 gateway_feedback hex=56474631000300 invalid:truncated
35 invalid-terminal-receipt-length 1 gateway_feedback hex=5647463100030001 invalid:length
36 invalid-feedback-type 1 gateway_feedback hex=5647463100040000 hex=5647463100060000 invalid:type
37 invalid-quality-prompt-trailing 1 gateway_feedback hex=564746310004001912345678123456781234567812345678000000000000002a00 invalid:length
38 invalid-quality-prompt-zero-uuid 1 gateway_feedback hex=564746310004001800000000000000000000000000000000000000000000002a invalid:field
39 invalid-stop-prompt-zero-uuid 1 gateway_feedback hex=564746310005001000000000000000000000000000000000 invalid:field
40 invalid-controller-arrival-family 1 gateway_input hex=564749310808020003040000001f invalid:field
41 invalid-feedback-length 1 gateway_feedback hex=5647463101100003000000 invalid:length
@@ -0,0 +1 @@
{"mode":"auto","target_kbps":1000}
@@ -0,0 +1 @@
{"transport":"quic-tls13","framing":"datagram-v2","media":"encoded","audio":"encoded","source_rate_control":"server","client_decode":["h264-opus"]}
+10 -1
View File
@@ -26,5 +26,14 @@
"audience": "versevdi-gateway"
},
"correlation_id": "correlation-1",
"provider_url": "https://provider.invalid"
"provider_url": "https://provider.invalid",
"selected_descriptor": {
"video_profile": {"codec": "h264", "bit_depth": 8, "chroma_subsampling": "4:2:0", "color_space": "bt709-limited", "transfer_function": "sdr"},
"audio_profile": {"codec": "opus", "sample_rate_hz": 48000, "channels": 2, "channel_layout": "stereo", "packet_duration_ms": 5},
"display_mode": {"resolution_width": 1920, "resolution_height": 1080, "fps": 60},
"bitrate_target_kbps": 20000,
"bitrate_maximum_kbps": 40000,
"adjustment": {"display_reason": "none", "bitrate_reason": "none"},
"media_timestamp_basis": "gateway-send-wall-clock-ms"
}
}
@@ -0,0 +1 @@
{"resolution_width":1920,"resolution_height":1080,"fps":60,"codec":"H264","bitrate_kbps":20000,"audio_enabled":true}
@@ -0,0 +1 @@
{"video_profile":{"codec":"h264","bit_depth":8,"chroma_subsampling":"4:2:0","color_space":"bt709-limited","transfer_function":"sdr"},"audio_profile":{"codec":"opus","sample_rate_hz":48000,"channels":2,"channel_layout":"stereo","packet_duration_ms":5},"display_mode":{"resolution_width":1920,"resolution_height":1080,"fps":60},"bitrate_target_kbps":20000,"bitrate_maximum_kbps":40000,"adjustment":{"display_reason":"none","bitrate_reason":"none"},"media_timestamp_basis":"gateway-send-wall-clock-ms","provider_identity":"forbidden"}
@@ -0,0 +1 @@
{"client_device_id":"device-1","device_key_id":"key-1","pool_id":"pool-1","idempotency_key":"request-1"}
@@ -0,0 +1 @@
{"codec":"vp9","bit_depth":8,"chroma_subsampling":"4:2:0","color_space":"bt709-limited","transfer_function":"sdr"}
+22 -1
View File
@@ -11,5 +11,26 @@
"fixtures/conformance/gateway-input-feedback-v1.tsv",
"fixtures/conformance/tunnel-v1.tsv"
],
"corpus_sha256": "6d2ce3a855b2fa45733a5f7b5b4c2e68448cceed5dfbca535ec81fe8cf230b30"
"corpus_sha256": "10751a9192961aeb8ddcf3bbf720b026b07f92c871c813c301660dd3de930186",
"json_files": [
"fixtures/invalid/authenticated-session-partial-native-identity.json",
"fixtures/invalid/bitrate-preference-auto-target.json",
"fixtures/invalid/browser-session-native-identity.json",
"fixtures/invalid/capability-rc5-opaque.json",
"fixtures/invalid/manifest-provider-field.json",
"fixtures/invalid/native-session-missing-identity.json",
"fixtures/invalid/provider-stream-policy-rc5.json",
"fixtures/invalid/selected-session-descriptor-provider-field.json",
"fixtures/invalid/session-request-policy-snapshot.json",
"fixtures/invalid/session-request-rc5.json",
"fixtures/invalid/video-profile-unknown.json",
"fixtures/valid/authenticated-browser-session.json",
"fixtures/valid/authenticated-native-session.json",
"fixtures/valid/manifest.json",
"fixtures/valid/native-tunnel-credential.json",
"fixtures/valid/selected-session-descriptor.json",
"fixtures/valid/session-quality-limits.json",
"fixtures/valid/session-request.json"
],
"json_corpus_sha256": "2b111ca1c1723d6063aeafbf08c4e77972b16422ac3a84a054170039b2eff4d3"
}
+10 -1
View File
@@ -25,5 +25,14 @@
"expires_at": "2099-01-01T00:00:00Z",
"audience": "versevdi-gateway"
},
"correlation_id": "correlation-1"
"correlation_id": "correlation-1",
"selected_descriptor": {
"video_profile": {"codec": "h264", "bit_depth": 8, "chroma_subsampling": "4:2:0", "color_space": "bt709-limited", "transfer_function": "sdr"},
"audio_profile": {"codec": "opus", "sample_rate_hz": 48000, "channels": 2, "channel_layout": "stereo", "packet_duration_ms": 5},
"display_mode": {"resolution_width": 1920, "resolution_height": 1080, "fps": 60},
"bitrate_target_kbps": 20000,
"bitrate_maximum_kbps": 40000,
"adjustment": {"display_reason": "none", "bitrate_reason": "none"},
"media_timestamp_basis": "gateway-send-wall-clock-ms"
}
}
@@ -0,0 +1,9 @@
{
"video_profile": {"codec": "hevc", "bit_depth": 8, "chroma_subsampling": "4:2:0", "color_space": "bt709-limited", "transfer_function": "sdr"},
"audio_profile": {"codec": "opus", "sample_rate_hz": 48000, "channels": 2, "channel_layout": "stereo", "packet_duration_ms": 5},
"display_mode": {"resolution_width": 2560, "resolution_height": 1440, "fps": 120},
"bitrate_target_kbps": 40000,
"bitrate_maximum_kbps": 50000,
"adjustment": {"display_reason": "none", "bitrate_reason": "policy_default"},
"media_timestamp_basis": "gateway-send-wall-clock-ms"
}
@@ -0,0 +1,9 @@
{
"policy_version_id": "policy-1",
"policy_display_limit": {"resolution_width": 3840, "resolution_height": 2160, "fps": 120},
"selectable_display_maximum": {"resolution_width": 3840, "resolution_height": 2160, "fps": 120},
"display_limit_override": false,
"bitrate_minimum_kbps": 1000,
"bitrate_target_kbps": 20000,
"bitrate_maximum_kbps": 50000
}
+5 -1
View File
@@ -2,5 +2,9 @@
"client_device_id": "device-1",
"device_key_id": "key-1",
"pool_id": "pool-1",
"idempotency_key": "request-1"
"idempotency_key": "request-1",
"video_profiles": [
{"codec": "h264", "bit_depth": 8, "chroma_subsampling": "4:2:0", "color_space": "bt709-limited", "transfer_function": "sdr"}
],
"bitrate_preference": {"mode": "auto"}
}