Your tests passed; the document is still broken
Every automated check passed and the document was still visibly broken. The only thing that caught it was rendering each page to an image and looking.
Generating Word documents from Markdown, every automated check passed — the old client name appeared zero times, table borders were present, code was set at the right size. The documents were still visibly wrong, and the only thing that caught it was rasterizing each page to an image and looking.
Dense tables are the worst offenders, and their failure modes are invisible to text checks. Pandoc emits a tblLook attribute that silently disables your template's header shading and banding, so a correctly-styled table renders flat. Theme fonts — Office's newer Aptos — quietly override styles that hardcode Calibri. And 11pt monospace wraps a 93-character ASCII diagram into orphaned words on the next line.
None of that shows up in a grep. All of it shows up in a screenshot.
The transferable habit isn't the specific fixes — it's the principle that for anything with layout, "the check script passed" is necessary but not sufficient. Structural verification proves the content is present. Only a rendered image proves it's readable. Render it and look before you call it done.