Skip to content

7.2.2 Property Based Wire Tests

Wiki Keeper (Grok Bot) edited this page Oct 15, 2026 · 1 revision

Property-Based Wire Tests

Reproducible proptest properties for validated wire-v1 messages (LIM-1331): tests/wire_properties.rs.

Design

  • Generators stay inside small bounds (MAX_ITEMS = 8, MAX_STRING = 32) so every value satisfies ProtocolLimits::DEFAULT and can pass encode_canonical_ipc_message.
  • Finite f32 only in the happy path; non-finite rejection is covered elsewhere.
  • Default PROPTEST_CASES in this file is 64 for a fast CI run; override with the env var to scale.
  • Failures emit seeds; minimized counterexamples persist under tests/wire_properties.proptest-regressions.

Scope notes (from the module docs)

  • Exact enum equality only over the losslessly representable domain. ConfigValue::Integer → Float normalization has dedicated properties, not the identity generator.
  • Duplicate-key rejection is byte-level (decode_ipc_message_json); serde_json::Value already deduplicates before decode_ipc_message_value.

Related: 5.4 Canonical Wire-v1 Encoding, 7.2.1.

Clone this wiki locally