test(conformance): expand golden-frame coverage#6
Open
Ameb8 wants to merge 6 commits into
Open
Conversation
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>
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>
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>
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>
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Expand the DCP conformance golden-frame corpus with additional byte-level fixtures, and tighten the Python conformance runner so that optional UART wire bytes and CRC fields are asserted when present.
This also syncs the conformance README with the current fixture schema and adds the repository PR template to
CONTRIBUTING.md.Why
Downstream ports need more pinned protocol vectors for payload encoding, sequence-number bytes, explicit empty-map bodies, UART wrapping, and CRC behavior. These cases make the conformance corpus a stronger cross-language compatibility target without changing the protocol.
Spec impact
for what we expect from this kind of change
Checklist
ruff check src testspasses locallypytestpasses locally## [Unreleased](not updated: conformance test fixtures/docs only)docs/RATIONALE.mdareconsistent with the new behavior