Commit 0bf9348
test(conformance): expand golden-frame coverage (#6)
* test(conformance): add golden CALL frame for bool and string payload
Add a golden-frame conformance case for a CALL frame whose CBOR body contains an explicit boolean and a short string.
This pins non-numeric scalar encoding byte-for-byte using the `set_enabled` intent with `{enabled: true, label: "ok"}` so ports can verify canonical CBOR output against the corpus.
Co-Authored-By: OpenAI GPT-5.4 <noreply@openai.com>
* test(conformance): add golden REPLY frame for explicit empty map
Add a golden-frame conformance case for a REPLY frame whose payload is encoded as an explicit CBOR empty map.
This complements the existing empty CALL coverage using a reply with `payload: {}` and `cbor_hex: "a0"` so ports verify that explicit empty reply bodies decode the same way.
Co-Authored-By: OpenAI GPT-5.4 <noreply@openai.com>
* test(conformance): add multi-field ERROR golden frame
Add a golden-frame conformance case for an ERROR frame whose CBOR body carries multiple fields.
This extends the current single-field error coverage using the `unknown` intent with `{status: 4, message: "unknown", code: 404}` so ports must preserve the full error map.
Co-Authored-By: OpenAI GPT-5.4 <noreply@openai.com>
* test(conformance): add EVENT golden frame for integer boundaries
Add a golden-frame conformance case for an EVENT frame whose CBOR body contains unsigned integer boundary values.
This pins canonical integer encoding byte-for-byte using the `motion_detected` intent with `{min: 0, max: 255}` so ports verify both single-byte and one-byte-argument unsigned forms.
Co-Authored-By: OpenAI GPT-5.4 <noreply@openai.com>
* test(conformance): add golden CALL frame for mixed-width sequence
Add a golden-frame conformance case for a CALL frame whose sequence number uses mixed high and low bytes.
This exercises big-endian sequence encoding using `seq: 0xff01` with the `set_color` intent and `{r: 255, g: 100, b: 0}` so ports cannot accidentally treat sequence bytes as little-endian.
Co-Authored-By: OpenAI GPT-5.4 <noreply@openai.com>
* test(conformance): assert UART wire bytes and frame CRC
Extend the golden-frame conformance corpus so the optional `uart_wire_hex` and `crc16` fields are exercised by a real fixture instead of documented-only contract text.
Populate both fields on `call with three small ints`, then update the reference conformance runner to assert them when present. This pins the full frame CRC as well as the COBS-wrapped UART bytes emitted by `wrap(...)`, giving ports a concrete byte-for-byte target for framing behavior in addition to the existing header and CBOR-body checks.
Also sync the conformance README to the current `cbor_hex` schema and clarify that `uart_wire_hex` represents wrapped frame+CRC bytes without the trailing delimiter byte.
Co-Authored-By: OpenAI GPT-5.4 <noreply@openai.com>
---------
Co-authored-by: OpenAI GPT-5.4 <noreply@openai.com>1 parent f68c451 commit 0bf9348
3 files changed
Lines changed: 67 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
36 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
| |||
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
51 | 68 | | |
52 | 69 | | |
53 | 70 | | |
| |||
56 | 73 | | |
57 | 74 | | |
58 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
59 | 85 | | |
60 | 86 | | |
61 | 87 | | |
| |||
65 | 91 | | |
66 | 92 | | |
67 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
68 | 115 | | |
69 | 116 | | |
70 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | 103 | | |
| |||
0 commit comments