goobwerx

The character was dead. JSON left it blank.

One missing boolean turned a known dead character into an unknown one. A fixture with one health caught the difference.

In the recovery test, the character had one health out of 3,000 and was known to be dead. The observation explicitly said the life state was known. The JSON had omitted the field that would have said alive: false.

Blank can be a value

Protocol Buffers JSON can omit a boolean when its value is the default, false. The old normalizer saw the missing field and treated the character’s state as unavailable. The fix checked whether the observation had already established the life state.

Cases distinguished by the life-state observation
Life state knownAlive fieldMeaning
YesOmittedKnown dead
UnestablishedOmittedUnknown

The regression deliberately uses positive health. Recovery has to use the life-state observation even when another number looks more intuitive.

Life-state fix and regression · ProtoJSON field presence