All problems

Cold-Chain Fahrenheit Conversion Reverses the Offset Sign

Level 2 · node · Correctness · Wrong offset sign in Celsius-to-Fahrenheit conversion

Scenario

A fictional cold-chain monitoring service stores Celsius readings from sensors at different sites. Operators may request the same reading in Celsius or Fahrenheit. The current Fahrenheit response displays the freezing point of water as -32 instead of 32, distorting temperature monitoring. Review the repository, conversion service, and controller.

Requirements

Apply the correct scale and offset when converting Celsius to Fahrenheit. Preserve original Celsius values, per-sensor readings, site isolation, and rejection of invalid measurements or unsupported units.

Acceptance criteria

  • Zero degrees Celsius is returned as 32 degrees Fahrenheit.
  • Twenty degrees Celsius is returned as 68 degrees Fahrenheit.
  • Celsius queries return the stored measurement unchanged.
  • Readings from different sites remain independent.
  • Invalid temperatures and unsupported units are rejected.