model-writtenrun 8337 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Frank Gagnepain reported encryption/decryption round trips failing with “Wrong key or corrupt data” at compression level 6 in #1; Jeff Janes reproduced the problem with incompressible input near 16kB at any compression level in #2, and Frank supplied a real failing sample in #3.
- Kyotaro Horiguchi traced the failure to an unread empty terminating packet and posted an explicit end-of-stream read in #4, then replaced its assertion with runtime error handling in #6 after identifying the assertion problem in #5.
- Tom Lane requested regression coverage in #7, and Horiguchi added a seeded random-data round-trip test in #8, while noting that changes to compression behavior could silently stop it exercising the boundary case.
- Michael Paquier rewrote the test using a CTE and replaced the explicit terminating-packet read with an earlier input read in #10, reporting successful round-trip testing across input lengths up to 33kB.
- Paquier committed #10 with its assertion removed as 9e108984fb and backpatched through PostgreSQL 9.5, but reported an immediate SLES buildfarm round-trip mismatch in #12.
- During the failure investigation, Tom Lane questioned the test's diagnostic usefulness in #15 and found that Paquier's implementation could repeatedly read after EOF and silently discard unexpected trailing bytes in #16, recommending Horiguchi's implementation from #8.
- Paquier chose to restore the buildfarm while investigating the platform-specific failure in #17, reverting the first landing with 38f60f174e; Mark Wong offered access to an affected machine in #18.
- Using that access, Lane discovered an independent compression bug: compress_process() reset the input pointer when deflate() had consumed only part of the input, and he posted the inline correction in #20 that became b9b610577d.
- Lane also established in #20 that the affected zlib produced different compressed output, so the random-data test would check round-trip correctness there without exercising the original empty-packet boundary; no separate regression test was added with b9b610577d because stock zlib did not reproduce that compression failure.
- The final landing, a3ab7a707d, combined Horiguchi's decompression implementation from #8 with Paquier's revised test from #10; in the last message, #21, Paquier confirmed testing on SLES15 and that the compression fix resolved the mismatch, leaving both bugs fixed and the earlier input-read approach abandoned.