{"abstract":"The exact factoradic permutation unrank result violates the stated contract at permutation block size.","category":"Numerics","checks":8,"contract":"Input [n,r], n<=7 and 0<=r<n!; return lexicographic permutation of 0..n-1 at rank r.","evaluation_group":"s3-numerics-factoradic-permutation-unrank","failed_approach":"The partial repair max(1,i) still violates the permutation block size invariant.","family":"s3-numerics-factoradic-permutation-unrank-permutation-block-size","id":"FA-15121","implementations":{"attempt":{"sha256":"8420e10055d993423ff24134dda9c677c908ba4468bfec409310ff04e85ab7e0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    n,r=x;pool=list(range(n));out=[]\n    for i in range(n-1,-1,-1):\n     block=max(1,i)\n     digit=r//block\n     if digit<0 or digit>=len(pool):return None\n     out.append(pool.pop(digit))\n     r=r%block\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 1], [1, 0]), ([4, 3], [0, 2, 3, 1]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([2, 0], [0, 1]), ([3, 0], [0, 1, 2]), ([3, 1], [0, 2, 1]), ([3, 2], [1, 0, 2])], [([3, 1], [0, 2, 1]), ([4, 6], [1, 0, 2, 3]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([4, 8], [1, 2, 0, 3]), ([4, 9], [1, 2, 3, 0]), ([4, 10], [1, 3, 0, 2]), ([4, 11], [1, 3, 2, 0])], [([3, 2], [1, 0, 2]), ([4, 9], [1, 2, 3, 0]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 1], [0, 1, 2, 4, 3]), ([5, 2], [0, 1, 3, 2, 4]), ([5, 3], [0, 1, 3, 4, 2]), ([5, 4], [0, 1, 4, 2, 3])], [([3, 3], [1, 2, 0]), ([4, 12], [2, 0, 1, 3]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 18], [0, 4, 1, 2, 3]), ([5, 19], [0, 4, 1, 3, 2]), ([5, 20], [0, 4, 2, 1, 3]), ([5, 21], [0, 4, 2, 3, 1])], [([3, 4], [2, 0, 1]), ([4, 15], [2, 1, 3, 0]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 35], [1, 2, 4, 3, 0]), ([5, 36], [1, 3, 0, 2, 4]), ([5, 37], [1, 3, 0, 4, 2]), ([5, 38], [1, 3, 2, 0, 4])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, solve(args), expected)\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":"7dc9a329fb9aa09191c18eeb833c8087bbe87aae3a255ff1b82b6dde7c40600e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    n,r=x;pool=list(range(n));out=[]\n    for i in range(n-1,-1,-1):\n     block=math.factorial(i+1)\n     digit=r//block\n     if digit<0 or digit>=len(pool):return None\n     out.append(pool.pop(digit))\n     r=r%block\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 1], [1, 0]), ([4, 3], [0, 2, 3, 1]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([2, 0], [0, 1]), ([3, 0], [0, 1, 2]), ([3, 1], [0, 2, 1]), ([3, 2], [1, 0, 2])], [([3, 1], [0, 2, 1]), ([4, 6], [1, 0, 2, 3]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([4, 8], [1, 2, 0, 3]), ([4, 9], [1, 2, 3, 0]), ([4, 10], [1, 3, 0, 2]), ([4, 11], [1, 3, 2, 0])], [([3, 2], [1, 0, 2]), ([4, 9], [1, 2, 3, 0]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 1], [0, 1, 2, 4, 3]), ([5, 2], [0, 1, 3, 2, 4]), ([5, 3], [0, 1, 3, 4, 2]), ([5, 4], [0, 1, 4, 2, 3])], [([3, 3], [1, 2, 0]), ([4, 12], [2, 0, 1, 3]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 18], [0, 4, 1, 2, 3]), ([5, 19], [0, 4, 1, 3, 2]), ([5, 20], [0, 4, 2, 1, 3]), ([5, 21], [0, 4, 2, 3, 1])], [([3, 4], [2, 0, 1]), ([4, 15], [2, 1, 3, 0]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 35], [1, 2, 4, 3, 0]), ([5, 36], [1, 3, 0, 2, 4]), ([5, 37], [1, 3, 0, 4, 2]), ([5, 38], [1, 3, 2, 0, 4])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, solve(args), expected)\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":"d62c4d019ace38b470adc9c36870c69e79a9a6653e4c4cf07b1ba57290a2150d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    n,r=x;pool=list(range(n));out=[]\n    for i in range(n-1,-1,-1):\n     block=math.factorial(i)\n     digit=r//block\n     if digit<0 or digit>=len(pool):return None\n     out.append(pool.pop(digit))\n     r=r%block\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 1], [1, 0]), ([4, 3], [0, 2, 3, 1]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([2, 0], [0, 1]), ([3, 0], [0, 1, 2]), ([3, 1], [0, 2, 1]), ([3, 2], [1, 0, 2])], [([3, 1], [0, 2, 1]), ([4, 6], [1, 0, 2, 3]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([4, 8], [1, 2, 0, 3]), ([4, 9], [1, 2, 3, 0]), ([4, 10], [1, 3, 0, 2]), ([4, 11], [1, 3, 2, 0])], [([3, 2], [1, 0, 2]), ([4, 9], [1, 2, 3, 0]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 1], [0, 1, 2, 4, 3]), ([5, 2], [0, 1, 3, 2, 4]), ([5, 3], [0, 1, 3, 4, 2]), ([5, 4], [0, 1, 4, 2, 3])], [([3, 3], [1, 2, 0]), ([4, 12], [2, 0, 1, 3]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 18], [0, 4, 1, 2, 3]), ([5, 19], [0, 4, 1, 3, 2]), ([5, 20], [0, 4, 2, 1, 3]), ([5, 21], [0, 4, 2, 3, 1])], [([3, 4], [2, 0, 1]), ([4, 15], [2, 1, 3, 0]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 35], [1, 2, 4, 3, 0]), ([5, 36], [1, 3, 0, 2, 4]), ([5, 37], [1, 3, 0, 4, 2]), ([5, 38], [1, 3, 2, 0, 4])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, solve(args), expected)\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":"A deterministic bounded teaching model. Inputs are restricted to the explicit contract; this is not a production algebra library. 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":"s3-numerics-factoradic-permutation-unrank-permutation-block-size","generated_at":"2026-09-29T14:39:23.593414+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Exact discrete arithmetic with observable algorithmic state; no floating point approximation is used.","repair":"Use math.factorial(i) at the permutation block size step.","root_cause":"The permutation block size step uses math.factorial(i+1) instead of math.factorial(i).","sha256":"bb438727a3fd79fc1ec5c7cecbc74b6038373ae81b4be11e2c68f930ec602fb2","title":"Factoradic permutation unrank: permutation block size · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.613,"exit_code":1,"observations":[{"actual":[1,0],"check":"explicit oracle 0","expected":[1,0],"passed":true},{"actual":[1,0,2,3],"check":"explicit oracle 1","expected":[0,2,3,1],"passed":false},{"actual":[0],"check":"explicit oracle 2","expected":[0],"passed":true},{"actual":null,"check":"explicit oracle 3","expected":[5,4,3,2,1,0],"passed":false},{"actual":[0,1],"check":"explicit oracle 4","expected":[0,1],"passed":true},{"actual":[0,1,2],"check":"explicit oracle 5","expected":[0,1,2],"passed":true},{"actual":[0,2,1],"check":"explicit oracle 6","expected":[0,2,1],"passed":true},{"actual":[1,0,2],"check":"explicit oracle 7","expected":[1,0,2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [1, 0, 2, 3], \"expected\": [0, 2, 3, 1], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": null, \"expected\": [5, 4, 3, 2, 1, 0], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 2, 1], \"expected\": [0, 2, 1], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [1, 0, 2], \"expected\": [1, 0, 2], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.949,"exit_code":1,"observations":[{"actual":null,"check":"explicit oracle 0","expected":[1,0],"passed":false},{"actual":null,"check":"explicit oracle 1","expected":[0,2,3,1],"passed":false},{"actual":[0],"check":"explicit oracle 2","expected":[0],"passed":true},{"actual":null,"check":"explicit oracle 3","expected":[5,4,3,2,1,0],"passed":false},{"actual":[0,1],"check":"explicit oracle 4","expected":[0,1],"passed":true},{"actual":[0,1,2],"check":"explicit oracle 5","expected":[0,1,2],"passed":true},{"actual":null,"check":"explicit oracle 6","expected":[0,2,1],"passed":false},{"actual":[0,2,1],"check":"explicit oracle 7","expected":[1,0,2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": null, \"expected\": [1, 0], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": null, \"expected\": [0, 2, 3, 1], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": null, \"expected\": [5, 4, 3, 2, 1, 0], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": null, \"expected\": [0, 2, 1], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [0, 2, 1], \"expected\": [1, 0, 2], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.003,"exit_code":0,"observations":[{"actual":[1,0],"check":"explicit oracle 0","expected":[1,0],"passed":true},{"actual":[0,2,3,1],"check":"explicit oracle 1","expected":[0,2,3,1],"passed":true},{"actual":[0],"check":"explicit oracle 2","expected":[0],"passed":true},{"actual":[5,4,3,2,1,0],"check":"explicit oracle 3","expected":[5,4,3,2,1,0],"passed":true},{"actual":[0,1],"check":"explicit oracle 4","expected":[0,1],"passed":true},{"actual":[0,1,2],"check":"explicit oracle 5","expected":[0,1,2],"passed":true},{"actual":[0,2,1],"check":"explicit oracle 6","expected":[0,2,1],"passed":true},{"actual":[1,0,2],"check":"explicit oracle 7","expected":[1,0,2],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [0, 2, 3, 1], \"expected\": [0, 2, 3, 1], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [5, 4, 3, 2, 1, 0], \"expected\": [5, 4, 3, 2, 1, 0], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 2, 1], \"expected\": [0, 2, 1], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [1, 0, 2], \"expected\": [1, 0, 2], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}