{
  "title": "Numeric price ordering: a reproducible fix",
  "symptom": "Prices such as 20, 3 and 100 are returned in string order.",
  "expectedBehavior": "Return numbers in ascending numeric order, retaining duplicates and negative values.",
  "rootCause": "The supplied helper converts each number to a string in its sort key, making digit text determine ordering.",
  "fix": "Remove the string key so numeric values use their natural ordering; preserve the original regression tests.",
  "failureMarker": "AssertionError",
  "workspaceLabel": "Isolated fictional price-sort project",
  "demo": true,
  "hypotheses": [
    {
      "idea": "Inputs were already incorrect",
      "observation": "The fixture uses explicit numeric input lists and the failure shows the same numbers in a different order.",
      "decision": "rejected"
    },
    {
      "idea": "String comparison changes numeric ordering",
      "observation": "The original source uses key=str; removing it changes the watched source hash and the unchanged numeric-order tests pass.",
      "decision": "supported"
    }
  ],
  "sourceFiles": [
    "sort_prices.py"
  ],
  "reproductionFiles": [
    "test_sort_prices.py"
  ],
  "checks": [
    {
      "name": "Concrete failing reproduction",
      "status": "pass",
      "basis": "Baseline completed with nonzero exit and the specified failure marker"
    },
    {
      "name": "Fresh passing check",
      "status": "pass",
      "basis": "Post-change command completed with zero exit and no specified marker"
    },
    {
      "name": "Same reproduction command",
      "status": "pass",
      "basis": "Exact argv and working directory match"
    },
    {
      "name": "Observation order",
      "status": "pass",
      "basis": "Post-change capture started after baseline finished"
    },
    {
      "name": "Stable inputs during each run",
      "status": "pass",
      "basis": "Watched sources stayed unchanged while each command ran"
    },
    {
      "name": "Bounded complete log capture",
      "status": "pass",
      "basis": "Neither captured stream was truncated"
    },
    {
      "name": "Same watched scope with a source change",
      "status": "pass",
      "basis": "The same paths were watched, with at least one declared source hash changed"
    },
    {
      "name": "Preserved reproduction inputs",
      "status": "pass",
      "basis": "Declared regression tests and reproduction inputs have identical before/after hashes"
    }
  ],
  "status": "reproduction-now-passing",
  "before": {
    "label": "Fictional example baseline",
    "commandDisplay": "python3 -B -m unittest test_sort_prices",
    "startedAt": "2026-10-09T02:58:48.645490+00:00",
    "finishedAt": "2026-10-09T02:58:48.686590+00:00",
    "status": "completed",
    "exitCode": 1,
    "watchedFiles": [
      {
        "path": "sort_prices.py",
        "bytes": 61,
        "sha256": "99965fcf15f9d3d43f1f322c9544e018836275d3870a8387b40db507f27b5aad"
      },
      {
        "path": "test_sort_prices.py",
        "bytes": 457,
        "sha256": "c7a4d3a6aaee721c099e38609e02eb1b227f8c9cd927170af0126af2cceee7d7"
      }
    ],
    "captureFileSha256": "cc11bc2b6acc3e629b993439679cbf923faa33f85214d332db1e5d5f8971b3f8",
    "logExcerpt": "\n.FF\n======================================================================\nFAIL: test_negative_and_duplicate_values (test_sort_prices.PriceOrdering.test_negative_and_duplicate_values)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"<workspace>/test_sort_prices.py\", line 10, in test_negative_and_duplicate_values\n    self.assertEqual(order_prices([2, -4, 10, 2, -12]), [-12, -4, 2, 2, 10])\nAssertionError: Lists differ: [-12, -4, 10, 2, 2] != [-12, -4, 2, 2, 10]\n\nFirst differing element 2:\n10\n2\n\n- [-12, -4, 10, 2, 2]\n+ [-12, -4, 2, 2, 10]\n\n======================================================================\nFAIL: test_numeric_order (test_sort_prices.PriceOrdering.test_numeric_order)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"<workspace>/test_sort_prices.py\", line 7, in test_numeric_order\n    self.assertEqual(order_prices([20, 3, 100]), [3, 20, 100])\nAssertionError: Lists differ: [100, 20, 3] != [3, 20, 100]\n\nFirst differing element 0:\n100\n3\n\n- [100, 20, 3]\n+ [3, 20, 100]\n\n----------------------------------------------------------------------\nRan 3 tests in 0.000s\n\nFAILED (failures=2)\n",
    "excerptTruncated": false
  },
  "after": {
    "label": "Fictional example after fix",
    "commandDisplay": "python3 -B -m unittest test_sort_prices",
    "startedAt": "2026-10-09T02:58:48.687664+00:00",
    "finishedAt": "2026-10-09T02:58:48.734363+00:00",
    "status": "completed",
    "exitCode": 0,
    "watchedFiles": [
      {
        "path": "sort_prices.py",
        "bytes": 52,
        "sha256": "5703786f29e10c18caaad6924dd93d7f2b1ffd647b5315051a2451f84489413b"
      },
      {
        "path": "test_sort_prices.py",
        "bytes": 457,
        "sha256": "c7a4d3a6aaee721c099e38609e02eb1b227f8c9cd927170af0126af2cceee7d7"
      }
    ],
    "captureFileSha256": "c1f034c47e0d296e683e4ed08a362ec0e06994eb9fb4c56824442b99c7aa79ae",
    "logExcerpt": "\n...\n----------------------------------------------------------------------\nRan 3 tests in 0.000s\n\nOK\n",
    "excerptTruncated": false
  },
  "limits": [
    "Passing evidence covers the selected reproduction, not all regressions or production behavior",
    "A captured command exit is not independent attestation, root-cause proof or a security certification",
    "Root cause, expected behavior and hypotheses are supplied interpretations to verify against code",
    "Only selected watched files are hashed; dependencies, environment and unlisted files can also affect results",
    "Input evidence is private local material; redaction and path removal are best effort, so review before sharing"
  ]
}
