{"abstract":"The largest tied mode is selected instead of the smallest.","category":"Statistics","checks":4,"contract":"Integer finite observations and equal lengths for paired samples. Counts and weights are nonnegative. Rational results use reduced Fraction strings. Empty or undefined statistics return None where shown. Return the smallest observation among tied highest-frequency values, or None for empty input. Exact operational definition: min(set(values),key=lambda x:(-values.count(x),x)) if values else None","evaluation_group":"model-e4a2e3e488a05ca1","failed_approach":"Input order replaces frequency comparison.","family":"xn-mode-smallest-tie","id":"FA-6196","implementations":{"attempt":{"sha256":"fe0cf2de2078a2f4d25e4fec41d448c2780b4e4bf05808207b8abe500759e403","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(values):\n    return values[0] if values else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([3, 3, 1, 1],)', solve(*([3, 3, 1, 1],)), 1)\ncheck('fixture 2: ([2, 1, 2],)', solve(*([2, 1, 2],)), 2)\ncheck('fixture 3: ([7],)', solve(*([7],)), 7)\ncheck('fixture 4: ([],)', solve(*([],)), None)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"a6c87e6271b0da942f8ceeb5a2a24efab702cd9f98da607c56a758473626959c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(values):\n    return max(set(values),key=lambda x:(values.count(x),x)) if values else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([3, 3, 1, 1],)', solve(*([3, 3, 1, 1],)), 1)\ncheck('fixture 2: ([2, 1, 2],)', solve(*([2, 1, 2],)), 2)\ncheck('fixture 3: ([7],)', solve(*([7],)), 7)\ncheck('fixture 4: ([],)', solve(*([],)), None)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"243df2a8948b6f8379a29c6d31a98c5c2dd05c7a5520e517896a1971f63b9689","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(values):\n    return min(set(values),key=lambda x:(-values.count(x),x)) if values else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([3, 3, 1, 1],)', solve(*([3, 3, 1, 1],)), 1)\ncheck('fixture 2: ([2, 1, 2],)', solve(*([2, 1, 2],)), 2)\ncheck('fixture 3: ([7],)', solve(*([7],)), 7)\ncheck('fixture 4: ([],)', solve(*([],)), None)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xn-mode-smallest-tie","generated_at":"2026-09-29T14:37:58.692544+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Statistical estimators results depend on the stated convention.","repair":"Apply the specified mathematical contract directly, preserving all terms and boundary cases: return min(set(values),key=lambda x:(-values.count(x),x)) if values else None","root_cause":"The largest tied mode is selected instead of the smallest.","sha256":"d7333ab499675fc54727378099fa9bb84d88ef5e7748c1de1013939842e77789","title":"Mode smallest tie · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.876,"exit_code":1,"observations":[{"actual":3,"check":"fixture 1: ([3, 3, 1, 1],)","expected":1,"passed":false},{"actual":2,"check":"fixture 2: ([2, 1, 2],)","expected":2,"passed":true},{"actual":7,"check":"fixture 3: ([7],)","expected":7,"passed":true},{"actual":null,"check":"fixture 4: ([],)","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([3, 3, 1, 1],)\", \"actual\": 3, \"expected\": 1, \"passed\": false}, {\"check\": \"fixture 2: ([2, 1, 2],)\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"fixture 3: ([7],)\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"fixture 4: ([],)\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.041,"exit_code":1,"observations":[{"actual":3,"check":"fixture 1: ([3, 3, 1, 1],)","expected":1,"passed":false},{"actual":2,"check":"fixture 2: ([2, 1, 2],)","expected":2,"passed":true},{"actual":7,"check":"fixture 3: ([7],)","expected":7,"passed":true},{"actual":null,"check":"fixture 4: ([],)","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([3, 3, 1, 1],)\", \"actual\": 3, \"expected\": 1, \"passed\": false}, {\"check\": \"fixture 2: ([2, 1, 2],)\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"fixture 3: ([7],)\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"fixture 4: ([],)\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.413,"exit_code":0,"observations":[{"actual":1,"check":"fixture 1: ([3, 3, 1, 1],)","expected":1,"passed":true},{"actual":2,"check":"fixture 2: ([2, 1, 2],)","expected":2,"passed":true},{"actual":7,"check":"fixture 3: ([7],)","expected":7,"passed":true},{"actual":null,"check":"fixture 4: ([],)","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([3, 3, 1, 1],)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 2: ([2, 1, 2],)\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"fixture 3: ([7],)\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"fixture 4: ([],)\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}