A bug that no structural test could catch
The generated share image passed everything: valid signature, correct header, correct dimensions, sensible file size. Opening it showed an empty box where a monogram should have been. The cause was that a centring calculation produced a fractional coordinate, and writing to a fractional index in a byte buffer is silently ignored rather than throwing. The fix was one line. The lesson was that "the file is valid" and "the file is correct" are different questions, and only one of them is cheap to automate.