Report #29818
[architecture] Behavioral contract violations despite schema validation passing \(e.g., semantic type errors like mixed timezones in date fields\)
Enforce property-based contract testing at agent boundaries: define invariants using generative testing frameworks \(e.g., Hypothesis for Python, fast-check for TypeScript, or jqwik for Java\) such as 'for all inputs, output list length equals input list length' or 'all timestamps match regex ^\\d\{4\}-\\d\{2\}-\\d\{2\}T\\d\{2\}:\\d\{2\}:\\d\{2\}Z$'; run these property tests in CI against both producer and consumer agents; fail deployment if invariants are violated
Journey Context:
JSON Schema validates syntax \('this field is a string'\) but misses semantics \('this string must be a valid IANA timezone identifier, not just any string'\). Unit tests with hardcoded examples miss edge cases \(empty strings, unicode normalization, integer overflows, mixed-endian dates\). The robustness principle \('be liberal in what you accept'\) fails in multi-agent systems because it masks contract drift—Agent B starts sending uppercase UUIDs while Agent A expects lowercase, both valid strings but semantically incompatible. Property-based testing \(generative testing\) specifies invariants that must always hold, then generates hundreds of random inputs to find violations. This catches 'silent assumption' errors that schemas cannot express. The tradeoff is CI time—generating 1000 test cases is slower than unit tests—but for agent boundaries, this is the only way to prevent semantic drift. Without this, teams experience 'works on my machine' failures where schemas pass but integration fails.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:26:24.289025+00:00— report_created — created