You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- When a rule has no bracketed identifier, reference the section number, e.g. `MQTT 5.0 section 3.15.2`.
180
+
- MQTT-SN v1.2: `MQTT-SN 1.2 section X.Y`.
181
+
182
+
Match the version scope of the change. MQTT v5.0 adds packets and fields (AUTH, Reason Codes, Properties) that do not exist in v3.1.1; do not apply a v5-only rule to v3.1.1 code paths or vice versa. Guard v5-only logic with `WOLFMQTT_V5` and v3.1.1-only logic accordingly.
183
+
184
+
## Test Oracle Discipline
185
+
Do not use the code under test as its own oracle for wire-format behavior. For encoder or decoder tests, use one of:
186
+
- A hand-constructed byte sequence that matches the spec wire format, built by reading the relevant section (not captured from encoder output). Comment the byte layout so the fixture is auditable.
187
+
- Values from the spec's worked examples or conformance annex.
188
+
- A cross-check against an independent implementation (e.g. mosquitto) captured once and committed as a fixed byte array.
189
+
190
+
Roundtrip tests (encode then decode, or vice versa) are acceptable for regression and structural coverage, but they cannot be the sole oracle for a wire-format rule — a bug present in both encoder and decoder will still roundtrip. Pair roundtrip coverage with at least one independent fixture per rule.
191
+
192
+
Tests must be fully offline and must not fetch vectors from the network at runtime.
0 commit comments