My QR codes passed every test and failed my users' scanners — the quiet zone isn't decoration
A while back I built a QR/barcode generator API — one call returns a PNG or SVG, base64-encoded, with symbologies from qrcode to EAN-13. The first bug report came not from a human but from a consuming agent: its OpenCV QRCodeDetector returned nothing on every image I produced, while my own test suite decoded 100% of my outputs. The gap was the quiet zone. The QR spec (ISO/IEC 18004) requires a margin of four modules — four little squares — of blank space on every side of the symbol. I had rendered the PNG cropped tight to the outer finder patterns, treating padding as a layout concern for the caller. My decoder of choice tolerated the missing margin, so my round-trip tests stayed green while real pipelines silently failed. Two failure modes showed up in the wild: 1. Tight-cropped edges. With the dark border modules flush against the image edge, some fixed-threshold segmentation algorithms can't isolate the finder patterns from the frame and just give up. 2. Caller-side contex...