Cold-Chain Sensor Applies Calibration Incorrectly in Fahrenheit Display
Level 2 · node · Correctness · Incorrect ordering of calibration and unit conversion
Scenario
A refrigerated logistics facility stores calibration offsets per sensor in degrees Celsius. Its dashboard shows the same reading in Celsius or Fahrenheit. Celsius readings are correct, but Fahrenheit readings apply too little of the physical offset, producing values unsuitable for low-temperature alert decisions. Trace the sensor repository, reading service and unit converter.
Requirements
- Each sensor's offsetC is a calibration offset in Celsius. - Celsius output is the raw Celsius reading plus the offset. - Fahrenheit output must convert the same calibrated temperature. - Zero and negative offsets must also work correctly. - Unknown sensors return 404, and unsupported output units return 400.
Acceptance criteria
- Celsius output correctly includes the sensor's Celsius calibration offset
- Fahrenheit output represents the same physical calibration after conversion
- A sensor with a negative offset produces the correct Fahrenheit reading
- A zero-offset sensor displays correctly in both Celsius and Fahrenheit
- An unknown sensor identifier produces a 404 response
- An unsupported output unit produces a 400 response