connector-contract-v3: the decoder refuses every dialect the wire does not name; the ciphertext is published as binary

wire_decode accepts a document only when its MessagePack value equals the
named form wire_encode writes for the decoded value (key order, integer width
and an absent optional field aside), so a positional envelope or invocation, an
integer-array ciphertext, an enum sent as its index and bytes after the
document are refused Encoding through the real carriage. The schema describes
the ciphertext as binary, and a test pins schema and wire agreeing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-28 12:03:23 +01:00
commit a0a6ccbf0d
5 changed files with 245 additions and 13 deletions

View file

@ -7,13 +7,9 @@
"type": "string"
},
"ciphertext": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"maximum": 255,
"minimum": 0
}
"description": "MessagePack bin: the raw ciphertext bytes, never an array of integers",
"type": "string",
"format": "binary"
},
"message_kind": {
"$ref": "#/$defs/EnvelopeKind"