Styxis
Company
Knowledge

The DynamicMessage map correction: separate repeated KV from the business map

Distinguish repeated wire key-value entries from the last-value selection observed as a map.

It is not a failure before the representation is chosen

Distinguish repeated wire key-value entries from the last-value selection observed as a map. A representation difference alone is not a parser defect. Choose the business boundary before using Truthound; forcing every repeated representation down to one entry could destroy information the consumer legitimately requires. [1, 2, 3]

Read the withdrawn defect claim

Protobuf #29512 initially called the Java DynamicMessage behavior a defect. A maintainer explained deferred map deduplication, and the author corrected the report after actually running C++ and finding the same repeated representation. The author also withdrew the claim that generated-message conformance requirements governed the reflective path. Do not preserve the retracted defect or security framing. [1]

The boundary of map observation

Parse identical wire through generated and reflective paths, comparing an explicit last-key-wins result at the boundary where the business requires a map. Retain the observation API and KV order. Two reflective entries and an incorrect final business value are different observations. [1, 3]

The final value of (k,1),(k,2)

The illustrative ordered entries are (k,1),(k,2), with last-key-wins required at map handoff. Expected final value is 2. That passes; final value 1 fails. The reflective list retaining both entries is not itself a failure. Separate representation cardinality from the business value. [1, 3]

Reconcile against corrected evidence

Truthound Core Python SDK 3.3.2 can compare prepared declared_last_value and business_map_value using ColumnPairValidator with relationship="==". The operator applies the declared canonicalization and retains original KV entries. The SDK does not change reflection deduplication timing; the correction that C++ preserves the same repeated representation remains part of the evidence. [1, 2, 3]

Different consumers of lists and maps

Preserve KV lists for consumers requiring repeated entries, and use explicit canonicalization for map consumers. Different entry counts do not justify calling the source invalid. The useful decision comes from matching the API’s exposed representation to the business obligation using the corrected evidence. [1, 3]

Application conditions

Retain original KV order and observation API, defining the boundary that requires map semantics.

Alternatives

Keep KV lists where required and canonicalize explicitly only at a map-consuming boundary.

Limitations

  • The SDK does not change reflection timing; the correction establishes the same repeated behavior in C++.

Evidence

Event checked
Subject checked
Modified