Could generated tests distinguish a known pandas fix?
Cue April research notes · 1 December 2026

Pandas 3.1.2 shipped on 30 November 2026. We chose three documented fixes in its public Python API and compared that release with 3.1.1. Two separate sessions using hosted OpenAI gpt-6.2-sol at medium reasoning each wrote one test per area. We kept both first responses and ran every function on each version. A test counted when it failed for the documented reason on 3.1.1 and passed on 3.1.2.

The general brief simply named three areas. Its three tests passed on both releases. The second brief pointed to known edge conditions. All three of its tests distinguished the versions.

  Category membership  The first suite used a list of category labels. The second used an integer range and checked the first observed label. Version 3.1.1 incorrectly reported it absent.
  Weighted mean        Both suites included a missing observation. The first told pandas to ignore its position. The second used the setting that makes the gap count. For [2, missing, 8], the old version returned 6.5 and the patch returned 6.
  Failure message      The first suite checked two different integers. The second compared two nearby floats. Both versions rejected the unequal inputs, but 3.1.1 printed 1.23 on both sides. Version 3.1.2 showed the distinct values.

In a separate reference check, we queried four category IDs against every one of their 16 possible observed-ID subsets. On 3.1.1, 24 of 64 lookups reported absent IDs present and eight reported present IDs absent. Version 3.1.2 answered all 64 correctly. A second reference case showed why a normal input can miss an error: the complete series [10, 16, 22] gave a final weighted mean of 17.5 on both releases, while [10, missing, 22] changed from 19 to the expected 18.

These cases were chosen after their fixes were public. The prompts withheld release numbers, issue references, source changes and the exact numeric answer. The edge-informed prompt supplied specific failure conditions. One generation per brief across three known fixes supports a case comparison. The results cannot establish an overall success rate or a deployed product's ability to discover unknown bugs.

The companion ZIP includes exact prompts, first responses, all test outcomes, raw lookup rows, dependency pins and a replay command. Replaying uses the saved suites and requires no model access.

pandas release notes
https://pandas.pydata.org/docs/whatsnew/v3.1.2.html
Category membership issue
https://github.com/pandas-dev/pandas/issues/72247
Weighted mean fix
https://github.com/pandas-dev/pandas/pull/72224
Diagnostic formatting issue
https://github.com/pandas-dev/pandas/issues/71509
