{"abstract":"Dense ranks fail to leave gaps after tied observations.","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. Ascending ranks start at one; ties receive the first occupied rank and leave gaps after the group. Exact operational definition: [sorted(values).index(v)+1 for v in values]","evaluation_group":"model-4e1eb9000a08cf66","failed_approach":"Reversing rank direction changes the ascending convention.","family":"xn-competition-ranks-with-ties","id":"FA-6321","implementations":{"attempt":{"sha256":"43af8af5d125fca6d43e6a6266dcff46152797d87fbaba20d61ca22329da5c92","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 [len(values)-sorted(values).index(v) for v in values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([30, 10, 10, 20],)', solve(*([30, 10, 10, 20],)), [4, 1, 1, 3])\ncheck('fixture 2: ([1, 2],)', solve(*([1, 2],)), [1, 2])\ncheck('fixture 3: ([5, 5],)', solve(*([5, 5],)), [1, 1])\ncheck('fixture 4: ([],)', solve(*([],)), [])\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":"a62e1b122ac59a55adc4bc78a145b52063869b654c33c280292c65c975f988b3","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 [sorted(set(values)).index(v)+1 for v in values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([30, 10, 10, 20],)', solve(*([30, 10, 10, 20],)), [4, 1, 1, 3])\ncheck('fixture 2: ([1, 2],)', solve(*([1, 2],)), [1, 2])\ncheck('fixture 3: ([5, 5],)', solve(*([5, 5],)), [1, 1])\ncheck('fixture 4: ([],)', solve(*([],)), [])\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":"0f436b3b02163a54546b27aa7f5e88941ac97561b7aa162f90a5895bd6dea0e3","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 [sorted(values).index(v)+1 for v in values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([30, 10, 10, 20],)', solve(*([30, 10, 10, 20],)), [4, 1, 1, 3])\ncheck('fixture 2: ([1, 2],)', solve(*([1, 2],)), [1, 2])\ncheck('fixture 3: ([5, 5],)', solve(*([5, 5],)), [1, 1])\ncheck('fixture 4: ([],)', solve(*([],)), [])\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-competition-ranks-with-ties","generated_at":"2026-09-29T14:38:00.427367+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 [sorted(values).index(v)+1 for v in values]","root_cause":"Dense ranks fail to leave gaps after tied observations.","sha256":"75fc3e7413b966b11e88ed80ec71273d29d618ada00f2e1f7b2cad8996f685b7","title":"Competition ranks with ties · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":57.802,"exit_code":1,"observations":[{"actual":[1,4,4,2],"check":"fixture 1: ([30, 10, 10, 20],)","expected":[4,1,1,3],"passed":false},{"actual":[2,1],"check":"fixture 2: ([1, 2],)","expected":[1,2],"passed":false},{"actual":[2,2],"check":"fixture 3: ([5, 5],)","expected":[1,1],"passed":false},{"actual":[],"check":"fixture 4: ([],)","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([30, 10, 10, 20],)\", \"actual\": [1, 4, 4, 2], \"expected\": [4, 1, 1, 3], \"passed\": false}, {\"check\": \"fixture 2: ([1, 2],)\", \"actual\": [2, 1], \"expected\": [1, 2], \"passed\": false}, {\"check\": \"fixture 3: ([5, 5],)\", \"actual\": [2, 2], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"fixture 4: ([],)\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.764,"exit_code":1,"observations":[{"actual":[3,1,1,2],"check":"fixture 1: ([30, 10, 10, 20],)","expected":[4,1,1,3],"passed":false},{"actual":[1,2],"check":"fixture 2: ([1, 2],)","expected":[1,2],"passed":true},{"actual":[1,1],"check":"fixture 3: ([5, 5],)","expected":[1,1],"passed":true},{"actual":[],"check":"fixture 4: ([],)","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([30, 10, 10, 20],)\", \"actual\": [3, 1, 1, 2], \"expected\": [4, 1, 1, 3], \"passed\": false}, {\"check\": \"fixture 2: ([1, 2],)\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"fixture 3: ([5, 5],)\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"fixture 4: ([],)\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":55.166,"exit_code":0,"observations":[{"actual":[4,1,1,3],"check":"fixture 1: ([30, 10, 10, 20],)","expected":[4,1,1,3],"passed":true},{"actual":[1,2],"check":"fixture 2: ([1, 2],)","expected":[1,2],"passed":true},{"actual":[1,1],"check":"fixture 3: ([5, 5],)","expected":[1,1],"passed":true},{"actual":[],"check":"fixture 4: ([],)","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([30, 10, 10, 20],)\", \"actual\": [4, 1, 1, 3], \"expected\": [4, 1, 1, 3], \"passed\": true}, {\"check\": \"fixture 2: ([1, 2],)\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"fixture 3: ([5, 5],)\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"fixture 4: ([],)\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}