Backtestshugorun-20261005-133023#12536
images: Opacity problem with Resize + Padding with PNG output
Better
Our patch was judged better than the merged fix.
In this judgment, Patch A = our agent, Patch B = the merged fix.
Both patches fix the root cause the same way. `hexStringToColorGo` built a translucent hex color as a `color.RGBA`, which is an invalid premultiplied color (component > alpha) and gets corrupted when drawn onto premultiplied destinations. Each patch now returns `color.NRGBA` for translucent colors, and each updates the `padding-transparent-chained` golden image. Patch A stays narrowly scoped. It keeps opaque colors as `color.RGBA`, so existing equality expectations and tests are unchanged. It adds a small helper so hex and luminance round-trip correctly for NRGBA. Its tests are strong: a new `TestPaddingTransparentColor` runs `gift` Padding with `#00f7` against RGBA, NRGBA, RGBA64 and NRGBA64 destinations and checks the exact padded pixel. That test would fail before the fix. It also adds hex parse and round-trip cases. Patch B goes much further, and that adds risk: - It always rewrites `Color.color` to NRGBA and changes opaque hex parsing to NRGBA, which required editing existing test expectations. - It changes `ColorGoToHexString` to un-premultiply every input. This alters output for existing RGBA inputs, and the old RGBA test case was removed rather than kept. - It rewrites `AddColorToPalette` equality. - It changes `doWithImageConfig` to skip palette clamping for all filter actions. That fixes a different issue, alters overlay/text golden images, and changes output for indexed PNGs across every filter. None of that is needed to fix this issue, and it broadens behavioral change. Patch B also adds no direct padding test; it relies on golden image updates. Patch A is the more focused, better-tested fix.
The judge saw only the two patches, labelled A and B in random order, with issue links and version numbers removed. The reasoning above is shown verbatim.
Solve
44m 30s
Wall-clock time in the container
Full test suite
No new failures
3,761 passed · 99 skipped · 3,862 total
Contamination audit
Clean
No sign the agent saw the real fix
Patch size
73vs 58 merged
Changed lines, ours vs merged