{"id":"f3d03bcf-3aa8-489b-bcbe-d794ba575c7d","kind":"codai.resolve.attestation.v0","repo_url":"https://github.com/dragoscv/resolve-smoke-statslib","base_commit":"52fa52e194c085e816c48d79b9bbb9172624722f","patch":"diff --git a/statslib/__init__.py b/statslib/__init__.py\nindex 55f2fff..b67113e 100644\n--- a/statslib/__init__.py\n+++ b/statslib/__init__.py\n@@ -3,6 +3,6 @@ def median(values):\n     s = sorted(values)\n     n = len(s)\n     mid = n // 2\n-    # BUG: for even-length inputs this returns the upper-middle element\n-    # instead of the average of the two middle elements.\n+    if n % 2 == 0:\n+        return (s[mid - 1] + s[mid]) / 2\n     return s[mid]\n","repro_test":{"path":"codai_repro_test.py","content":"from statslib import median\n\n\ndef test_median_even_length_returns_average_of_middle_elements():\n    # For an even-length list, median must average the two middle values.\n    assert median([1, 2, 3, 4]) == 2.5\n\n\ndef test_median_even_length_unsorted_input():\n    assert median([4, 1, 3, 2]) == 2.5\n\n\ndef test_median_odd_length_still_correct():\n    assert median([1, 2, 3]) == 2"},"test_command":"python -m pytest -q codai_repro_test.py","regression_command":"python -m pytest -q --deselect codai_repro_test.py --ignore=codai_repro_test.py","test_output_before":"FF.                                                                      [100%]\n=================================== FAILURES ===================================\n__________ test_median_even_length_returns_average_of_middle_elements __________\n\n    def test_median_even_length_returns_average_of_middle_elements():\n        # For an even-length list, median must average the two middle values.\n>       assert median([1, 2, 3, 4]) == 2.5\nE       assert 3 == 2.5\nE        +  where 3 = median([1, 2, 3, 4])\n\ncodai_repro_test.py:6: AssertionError\n____________________ test_median_even_length_unsorted_input ____________________\n\n    def test_median_even_length_unsorted_input():\n>       assert median([4, 1, 3, 2]) == 2.5\nE       assert 3 == 2.5\nE        +  where 3 = median([4, 1, 3, 2])\n\ncodai_repro_test.py:10: AssertionError\n=========================== short test summary info ============================\nFAILED codai_repro_test.py::test_median_even_length_returns_average_of_middle_elements - assert 3 == 2.5\n +  where 3 = median([1, 2, 3, 4])\nFAILED codai_repro_test.py::test_median_even_length_unsorted_input - assert 3 == 2.5\n +  where 3 = median([4, 1, 3, 2])\n2 failed, 1 passed in 1.67s\n","test_output_after":"...                                                                      [100%]\n3 passed in 1.27s\n","regression_output":".                                                                        [100%]\n1 passed in 0.98s\n","runner_image_digest":"d6165338","started_at":"2026-08-05T17:52:46.226Z","verified_at":"2026-08-05T17:56:17.117Z"}