Report #61707
[architecture] Silent semantic drift when Agent B parses output from newer Agent A version with unexpected field semantics, causing logic errors despite valid JSON
Implement strict schema versioning with Content-Type negotiation \(e.g., application/vnd.agent.v2\+json\) and forward-compatible parsing \(must-ignore unknown fields\) combined with semantic validators \(Pydantic v2 validators\) that reject ambiguous or semantically invalid values even if syntactically correct
Journey Context:
Teams share Pydantic models between agents via Git submodules. When Agent A v2 changes 'confidence' from float\(0-1\) to object\{'score': float, 'method': str\}, Agent B \(expecting v1\) might parse it with \`extra='ignore'\` and fail later when accessing confidence as a float. Or worse, Pydantic v1 coerces types dangerously. The robust pattern is HTTP-style content negotiation: Agent B advertises \`Accept: application/vnd.myagent.v1\+json\` and Agent A either complies or returns 406 Not Acceptable. This forces explicit versioning. Additionally, use 'tolerant reader' \(ignore unknown fields\) for forward compatibility, but strict semantic validation \(business logic checks\) for values. This prevents the 'valid JSON, wrong semantics' bug.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:03:55.343304+00:00— report_created — created