Trace Firmware Payloads Through the Temperature Parser
Trace Firmware Payloads Through the Temperature Parser
Try Press Step to trace the version 1 temp field into the normalized record’s value_num slot.
How does each payload normalize?
Schema rolloutMixed firmware fleet
Old firmware · version 1
Incoming payload
version 1 · temp readingNew firmware · version 2
Incoming payload
version 2 · temperature readingunit may also be supplied.
Both feed one parser
During a rollout, old and new devices can send temperature readings to the same parser.
The token reading stands for a symbolic temperature reading.
Map the old payload
Version 1
Incoming payload
version 1 · temp reading| Input → | Output | Value |
|---|---|---|
version |
schema_version |
1 |
temp |
value_num |
reading |
| Parser sets metric | metric |
temperature |
| Parser assigns C | unit |
C |
Compare versions and predict the default
Version 1
Incoming payload
version 1 · temp reading| Input → | Output | Value |
|---|---|---|
version |
schema_version |
1 |
temp |
value_num |
reading |
| Parser sets metric | metric |
temperature |
| Parser assigns C | unit |
C |
Version 2
Incoming payload
version 2 · temperature reading · unit Fahrenheit| Input → | Output | Value |
|---|---|---|
version |
schema_version |
2 |
temperature |
value_num |
reading |
| Parser sets metric | metric |
temperature |
unit |
unit |
Fahrenheit |
Version 2 · unit omitted
Incoming payload
version 2 · temperature reading| Input → | Output | Value |
|---|---|---|
version |
schema_version |
2 |
temperature |
value_num |
reading |
| Parser sets metric | metric |
temperature |
| Key absent | unit |
Predict |
Predict before you Step
Version 2 copies the supplied unit. What unit will the parser output if that key is missing?
What fills the highlighted output slot when the unit key is absent?
Reveal the missing-unit default
Version 1
Incoming payload
version 1 · temp reading| Input → | Output | Value |
|---|---|---|
version |
schema_version |
1 |
temp |
value_num |
reading |
| Parser sets metric | metric |
temperature |
| Parser assigns C | unit |
C |
Version 2
Incoming payload
version 2 · temperature reading · unit Fahrenheit| Input → | Output | Value |
|---|---|---|
version |
schema_version |
2 |
temperature |
value_num |
reading |
| Parser sets metric | metric |
temperature |
unit |
unit |
Fahrenheit |
Version 2 · unit omitted
Incoming payload
version 2 · temperature reading| Input → | Output | Value |
|---|---|---|
version |
schema_version |
2 |
temperature |
value_num |
reading |
| Parser sets metric | metric |
temperature |
| Key absent | unit |
C |
Compare the version 2 outputs
When the version 2 payload omits the unit field, the parser defaults to C.
The schema_version, metric and value_num slots match. The supplied Fahrenheit label passes through unchanged.
Reject an unknown version
Unknown input version
Incoming payload
version unknown versionParser stops
ValueError: unknown schema version
Normalized output
No record
Test and monitor by input version
Old firmware
Incoming payload
version 1 · temp readingNew firmware
Incoming payload
version 2 · temperature reading · unit FahrenheitRollout test checklist
Exercise old payload, new payload with supplied unit, new payload without unit, and unknown version.
Parser errors by input version
Version 1Version 2Unknown versionCohorts use the version from each parse attempt, including rejected payloads.
After parsing
Test old and new payloads together. Group failures by the version read from the incoming payload so operators can find the cohort to investigate.
Send normalized records through downstream quality checks.
During a rollout, old and new devices can send temperature readings to the same parser.
Observe In the version 2 table with the unit omitted, the highlighted output changes from Predict to C. The adjacent version 2 table still shows Fahrenheit.
Explain The version 2 parser copies the unit when the payload supplies it and assigns C when the unit field is missing.
Technical boundaries. The tables use a symbolic reading and focus on field mapping for the two known versions plus handling of an unknown version. The Fahrenheit label passes through unchanged, and its reading remains symbolic. Downstream quality checks appear as a separate stage after parsing.