{"abstract":"Placeholder numbers such as 111.111.111-11 pass both check digits.","category":"Check-digit algorithms","checks":8,"contract":"Brazilian CPF taxpayer number: dots and hyphens removed, then 11 ASCII digits that are not all the same digit (else \"malformed\"). k1 = (sum of digits 1-9 weighted 10..2) * 10 mod 11 mod 10; k2 = (digits 1-9 and the computed k1 weighted 11..2) * 10 mod 11 mod 10. Return [k1, k2, whether digits 10-11 equal them].","contract_signature":"s","evaluation_group":"w2-check_digit_algorithms-br-cpf","failed_approach":"Rejecting only 00000000000 still admits the other nine repdigits.","family":"w2-check_digit_algorithms-br-cpf-repdigit-rejection","id":"FA-72741","implementations":{"attempt":{"sha256":"6e8689b2044111317a5f40182df4e46ed99e2eec247c2189c20a5ca0f0904052","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    t = s.replace('.', '').replace('-', '')\n    if len(t) != 11 or not t.isascii() or not t.isdigit():\n        return 'malformed'\n    if t == '0' * 11:\n        return 'malformed'\n    d = [int(ch) for ch in t]\n    k1 = sum(w * x for w, x in zip(range(10, 1, -1), d[:9])) * 10 % 11 % 10\n    k2 = sum(w * x for w, x in zip(range(11, 1, -1), d[:9] + [k1])) * 10 % 11 % 10\n    return [k1, k2, d[9] == k1 and d[10] == k2]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"111.111.111-11\"]', ['111.111.111-11'], 'malformed'], ['regression [\"00000000000\"]', ['00000000000'], 'malformed'], ['partial-repair [\"22222222222\"]', ['22222222222'], 'malformed'], ['control [\"42765277574\"]', ['42765277574'], [9, 1, False]], ['control [\"04160821863\"]', ['04160821863'], [1, 2, False]], ['control [\"11181886176\"]', ['11181886176'], [6, 3, False]], ['control [\"54166960081\"]', ['54166960081'], [1, 6, False]], ['control [\"80112861152\"]', ['80112861152'], [0, 5, False]]], [['regression [\"111.111.111-11\"]', ['111.111.111-11'], 'malformed'], ['regression [\"00000000000\"]', ['00000000000'], 'malformed'], ['partial-repair [\"22222222222\"]', ['22222222222'], 'malformed'], ['control [\"61682621036\"]', ['61682621036'], [5, 7, False]], ['control [\"91615291602\"]', ['91615291602'], [8, 7, False]], ['control [\"38203173222\"]', ['38203173222'], [5, 0, False]], ['control [\"71865383378\"]', ['71865383378'], [9, 2, False]], ['control [\"11888021888\"]', ['11888021888'], [6, 1, False]]], [['regression [\"111.111.111-11\"]', ['111.111.111-11'], 'malformed'], ['regression [\"00000000000\"]', ['00000000000'], 'malformed'], ['partial-repair [\"22222222222\"]', ['22222222222'], 'malformed'], ['control [\"02970275879\"]', ['02970275879'], [1, 3, False]], ['control [\"33143111705\"]', ['33143111705'], [6, 3, False]], ['control [\"29622049718\"]', ['29622049718'], [0, 2, False]], ['control [\"22747397622\"]', ['22747397622'], [5, 3, False]], ['control [\"25998738965\"]', ['25998738965'], [4, 2, False]]], [['regression [\"111.111.111-11\"]', ['111.111.111-11'], 'malformed'], ['regression [\"00000000000\"]', ['00000000000'], 'malformed'], ['partial-repair [\"22222222222\"]', ['22222222222'], 'malformed'], ['control [\"52682522850\"]', ['52682522850'], [3, 1, False]], ['control [\"47444770261\"]', ['47444770261'], [0, 4, False]], ['control [\"78829380673\"]', ['78829380673'], [8, 7, False]], ['control [\"72986172530\"]', ['72986172530'], [7, 1, False]], ['control [\"37134793981\"]', ['37134793981'], [9, 0, False]]], [['regression [\"111.111.111-11\"]', ['111.111.111-11'], 'malformed'], ['regression [\"00000000000\"]', ['00000000000'], 'malformed'], ['partial-repair [\"22222222222\"]', ['22222222222'], 'malformed'], ['control [\"529.982.247-25\"]', ['529.982.247-25'], [2, 5, True]], ['control [\"52998224725\"]', ['52998224725'], [2, 5, True]], ['control [\"529.982.247-26\"]', ['529.982.247-26'], [2, 5, False]], ['control [\"1234567890\"]', ['1234567890'], 'malformed'], ['control [\"123.456.789-09\"]', ['123.456.789-09'], [0, 9, True]]]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, 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":"c5d49129d9deb4e2997224a6d9c4bc1b5edebfe4c0b3911a68bca7b5169b391c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    t = s.replace('.', '').replace('-', '')\n    if len(t) != 11 or not t.isascii() or not t.isdigit():\n        return 'malformed'\n    d = [int(ch) for ch in t]\n    k1 = sum(w * x for w, x in zip(range(10, 1, -1), d[:9])) * 10 % 11 % 10\n    k2 = sum(w * x for w, x in zip(range(11, 1, -1), d[:9] + [k1])) * 10 % 11 % 10\n    return [k1, k2, d[9] == k1 and d[10] == k2]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"111.111.111-11\"]', ['111.111.111-11'], 'malformed'], ['regression [\"00000000000\"]', ['00000000000'], 'malformed'], ['partial-repair [\"22222222222\"]', ['22222222222'], 'malformed'], ['control [\"42765277574\"]', ['42765277574'], [9, 1, False]], ['control [\"04160821863\"]', ['04160821863'], [1, 2, False]], ['control [\"11181886176\"]', ['11181886176'], [6, 3, False]], ['control [\"54166960081\"]', ['54166960081'], [1, 6, False]], ['control [\"80112861152\"]', ['80112861152'], [0, 5, False]]], [['regression [\"111.111.111-11\"]', ['111.111.111-11'], 'malformed'], ['regression [\"00000000000\"]', ['00000000000'], 'malformed'], ['partial-repair [\"22222222222\"]', ['22222222222'], 'malformed'], ['control [\"61682621036\"]', ['61682621036'], [5, 7, False]], ['control [\"91615291602\"]', ['91615291602'], [8, 7, False]], ['control [\"38203173222\"]', ['38203173222'], [5, 0, False]], ['control [\"71865383378\"]', ['71865383378'], [9, 2, False]], ['control [\"11888021888\"]', ['11888021888'], [6, 1, False]]], [['regression [\"111.111.111-11\"]', ['111.111.111-11'], 'malformed'], ['regression [\"00000000000\"]', ['00000000000'], 'malformed'], ['partial-repair [\"22222222222\"]', ['22222222222'], 'malformed'], ['control [\"02970275879\"]', ['02970275879'], [1, 3, False]], ['control [\"33143111705\"]', ['33143111705'], [6, 3, False]], ['control [\"29622049718\"]', ['29622049718'], [0, 2, False]], ['control [\"22747397622\"]', ['22747397622'], [5, 3, False]], ['control [\"25998738965\"]', ['25998738965'], [4, 2, False]]], [['regression [\"111.111.111-11\"]', ['111.111.111-11'], 'malformed'], ['regression [\"00000000000\"]', ['00000000000'], 'malformed'], ['partial-repair [\"22222222222\"]', ['22222222222'], 'malformed'], ['control [\"52682522850\"]', ['52682522850'], [3, 1, False]], ['control [\"47444770261\"]', ['47444770261'], [0, 4, False]], ['control [\"78829380673\"]', ['78829380673'], [8, 7, False]], ['control [\"72986172530\"]', ['72986172530'], [7, 1, False]], ['control [\"37134793981\"]', ['37134793981'], [9, 0, False]]], [['regression [\"111.111.111-11\"]', ['111.111.111-11'], 'malformed'], ['regression [\"00000000000\"]', ['00000000000'], 'malformed'], ['partial-repair [\"22222222222\"]', ['22222222222'], 'malformed'], ['control [\"529.982.247-25\"]', ['529.982.247-25'], [2, 5, True]], ['control [\"52998224725\"]', ['52998224725'], [2, 5, True]], ['control [\"529.982.247-26\"]', ['529.982.247-26'], [2, 5, False]], ['control [\"1234567890\"]', ['1234567890'], 'malformed'], ['control [\"123.456.789-09\"]', ['123.456.789-09'], [0, 9, True]]]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, 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 of the named scheme under the stated contract; not a certified validator. 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":"w2-check_digit_algorithms-br-cpf-repdigit-rejection","generated_at":"2026-09-29T14:48:41.174992+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Onboarding and invoicing flows validate CPF numbers before tax reporting.","root_cause":"The rule rejecting numbers made of one repeated digit is missing.","sha256":"c4eaed933e8d6d2be45aa4fbe595c681f8ef53cdd99e90a34ae49373c0855379","title":"CPF accepts repeated-digit numbers · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.654,"exit_code":1,"observations":[{"actual":[1,1,true],"check":"regression [\"111.111.111-11\"]","expected":"malformed","passed":false},{"actual":"malformed","check":"regression [\"00000000000\"]","expected":"malformed","passed":true},{"actual":[2,2,true],"check":"partial-repair [\"22222222222\"]","expected":"malformed","passed":false},{"actual":[9,1,false],"check":"control [\"42765277574\"]","expected":[9,1,false],"passed":true},{"actual":[1,2,false],"check":"control [\"04160821863\"]","expected":[1,2,false],"passed":true},{"actual":[6,3,false],"check":"control [\"11181886176\"]","expected":[6,3,false],"passed":true},{"actual":[1,6,false],"check":"control [\"54166960081\"]","expected":[1,6,false],"passed":true},{"actual":[0,5,false],"check":"control [\"80112861152\"]","expected":[0,5,false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"111.111.111-11\\\"]\", \"actual\": [1, 1, true], \"expected\": \"malformed\", \"passed\": false}, {\"check\": \"regression [\\\"00000000000\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"partial-repair [\\\"22222222222\\\"]\", \"actual\": [2, 2, true], \"expected\": \"malformed\", \"passed\": false}, {\"check\": \"control [\\\"42765277574\\\"]\", \"actual\": [9, 1, false], \"expected\": [9, 1, false], \"passed\": true}, {\"check\": \"control [\\\"04160821863\\\"]\", \"actual\": [1, 2, false], \"expected\": [1, 2, false], \"passed\": true}, {\"check\": \"control [\\\"11181886176\\\"]\", \"actual\": [6, 3, false], \"expected\": [6, 3, false], \"passed\": true}, {\"check\": \"control [\\\"54166960081\\\"]\", \"actual\": [1, 6, false], \"expected\": [1, 6, false], \"passed\": true}, {\"check\": \"control [\\\"80112861152\\\"]\", \"actual\": [0, 5, false], \"expected\": [0, 5, false], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.812,"exit_code":1,"observations":[{"actual":[1,1,true],"check":"regression [\"111.111.111-11\"]","expected":"malformed","passed":false},{"actual":[0,0,true],"check":"regression [\"00000000000\"]","expected":"malformed","passed":false},{"actual":[2,2,true],"check":"partial-repair [\"22222222222\"]","expected":"malformed","passed":false},{"actual":[9,1,false],"check":"control [\"42765277574\"]","expected":[9,1,false],"passed":true},{"actual":[1,2,false],"check":"control [\"04160821863\"]","expected":[1,2,false],"passed":true},{"actual":[6,3,false],"check":"control [\"11181886176\"]","expected":[6,3,false],"passed":true},{"actual":[1,6,false],"check":"control [\"54166960081\"]","expected":[1,6,false],"passed":true},{"actual":[0,5,false],"check":"control [\"80112861152\"]","expected":[0,5,false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"111.111.111-11\\\"]\", \"actual\": [1, 1, true], \"expected\": \"malformed\", \"passed\": false}, {\"check\": \"regression [\\\"00000000000\\\"]\", \"actual\": [0, 0, true], \"expected\": \"malformed\", \"passed\": false}, {\"check\": \"partial-repair [\\\"22222222222\\\"]\", \"actual\": [2, 2, true], \"expected\": \"malformed\", \"passed\": false}, {\"check\": \"control [\\\"42765277574\\\"]\", \"actual\": [9, 1, false], \"expected\": [9, 1, false], \"passed\": true}, {\"check\": \"control [\\\"04160821863\\\"]\", \"actual\": [1, 2, false], \"expected\": [1, 2, false], \"passed\": true}, {\"check\": \"control [\\\"11181886176\\\"]\", \"actual\": [6, 3, false], \"expected\": [6, 3, false], \"passed\": true}, {\"check\": \"control [\\\"54166960081\\\"]\", \"actual\": [1, 6, false], \"expected\": [1, 6, false], \"passed\": true}, {\"check\": \"control [\\\"80112861152\\\"]\", \"actual\": [0, 5, false], \"expected\": [0, 5, false], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}