In this article
Check whether enum values are open or closed and how the actual runtime exposes unknown numbers before treating a schema addition as order-preserving compatibility.
Preserve the meaning of ordered status observations
A message carries an ordered sequence of processing statuses. A newer sender introduces a status value that an older reader does not recognize. The Protobuf enum guide distinguishes open and closed enum behavior. The compatibility question is not only whether the message parses: the receiver’s field access and later serialization can change how unknown values participate in that sequence.
Distinguish open field storage from unknown storage
For an open enum, an unrecognized number is stored in the field and exposed through the runtime’s representation. For a closed enum, it goes into the message’s unknown-field set, while ordinary field access reports the field as unset and returns its default. A caller should not interpret that default as evidence that the sender actually chose it. Preserve the distinction when status affects an agent’s next operation or report interpretation.
Examine the repeated-value round trip
The guide gives a repeated-field example where [0, 2, 1, 2] contains unrecognized values. With closed behavior, the ordinary field holds the recognized values and the unknown numbers are stored separately. Reserialization can produce [0, 1, 2, 2]. Unknown numbers survived, but their original positions did not. An application relying on sequence positions cannot treat numeric retention alone as preservation of the original status history.
Verify the language and runtime boundary
The proto3 guide notes language-dependent representations of unrecognized values. The enum guide also lists known conformance differences across runtimes. Read the behavior for the actual generated code and runtime version rather than generalize one language’s accessor behavior to every client. Software reproducibility helps retain those versioned dependencies when assessing an interoperability claim about messages sent between services.
Keep JSON evolution in the review
The ProtoJSON specification uses enum names by default and permits integer emission, creating another evolution boundary. Binary preservation does not establish that a JSON intermediary accepts a new symbolic name or preserves the same representation. Tool observations should compare numeric values, visible accessors and sequence order through the actual path. This makes a schema addition review precise without assuming that successful parsing means the older consumer sees the sender’s full ordered meaning.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.