feat(protocol): negotiate registered gateway profiles
Verify Protocol / verify (push) Canceled after 0s
Verify Protocol / module (push) Successful in 2m29s

This commit is contained in:
sechmachine
2026-07-30 04:47:52 +07:00
parent d26f8b60f8
commit e58f1c7c48
17 changed files with 227 additions and 67 deletions
@@ -13,3 +13,21 @@ Generated Go, Rust, and Swift bindings MUST reject missing, unknown, out-of-rang
#### Scenario: Invalid policy is rejected consistently
- **WHEN** provider work contains an unknown codec or a value outside the canonical bounds
- **THEN** every generated binding rejects the work before it can reach provider setup
### Requirement: Decode capabilities use registered ordered profiles
`CapabilityProfile.client_decode` SHALL be a non-empty ordered unique set containing only registered `h264-opus` and `hevc-opus` profile identifiers. It MUST NOT encode multiple capabilities in an opaque private token.
#### Scenario: Independent peer advertises one registered profile
- **WHEN** an independent peer advertises one registered decode profile
- **THEN** canonical validation accepts that profile without requiring a combined private token
### Requirement: Consumers share one ordered registered-profile intersection
Generated Protocol behavior SHALL select common registered profiles in the first peer's preference order. Provider consumers SHALL separately reject the resulting intersection when it cannot honor the immutable stream policy.
#### Scenario: Policy-compatible profile overlaps
- **WHEN** the gateway advertises HEVC then H.264 and the client advertises only H.264
- **THEN** the shared intersection selects `h264-opus`
#### Scenario: No policy-compatible profile overlaps
- **WHEN** peers have no registered common profile
- **THEN** the shared intersection rejects admission without inventing a private combined token