{"abstract":"single insertion makes two fingerprints unrelated.","category":"Dataset deduplication grouping","checks":6,"contract":"Return Levenshtein edit distance between two strings using unit insertion, deletion, substitution.","contract_signature":"a, b","evaluation_group":"dedup-levenshtein","failed_approach":"A common-prefix count handles insertions at the end but fails for interior edits.","family":"w3-dataset-deduplication-grouping-edit-distance-insertion","id":"FA-100301","implementations":{"attempt":{"sha256":"08bbf28ec4ada7b393a5347174800b051146711658fe2ba9b2a19cfa006fd284","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b):\n    return abs(len(a)-len(b)) + sum(x!=y for x,y in zip(a,b))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('append token',solve('abc','abcx'),1)\ncheck('interior insert',solve('abc','axbc'),1)\ncheck('delete',solve('axbc','abc'),1)\ncheck('substitution',solve('abc','axc'),1)\ncheck('empty to text',solve('','x'*N),N)\ncheck('same',solve('abc','abc'),0)\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":"574dc725b8375c063af1c3a726b94adae83060d3f45533e25347be71e1dd76ae","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b):\n    return sum(x!=y for x,y in zip(a,b))+abs(len(a)-len(b))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('append token',solve('abc','abcx'),1)\ncheck('interior insert',solve('abc','axbc'),1)\ncheck('delete',solve('axbc','abc'),1)\ncheck('substitution',solve('abc','axc'),1)\ncheck('empty to text',solve('','x'*N),N)\ncheck('same',solve('abc','abc'),0)\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":"Inputs are small in-memory fixtures with the stated contract; results do not claim production deduplication quality. 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":"w3-dataset-deduplication-grouping-edit-distance-insertion","generated_at":"2026-09-30T16:48:34.014126+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic toy operation makes one dataset equivalence or representative rule explicit.","root_cause":"The near-duplicate score only compares aligned positions.","sha256":"6bde24d94ae2cfc6e8777bde2c4e33cb4915099cfb51515a68b1560b026f07ff","title":"Dataset deduplication: single insertion makes two fingerprints unrelated · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":29.5,"exit_code":1,"observations":[{"actual":1,"check":"append token","expected":1,"passed":true},{"actual":3,"check":"interior insert","expected":1,"passed":false},{"actual":3,"check":"delete","expected":1,"passed":false},{"actual":1,"check":"substitution","expected":1,"passed":true},{"actual":1,"check":"empty to text","expected":1,"passed":true},{"actual":0,"check":"same","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"append token\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"interior insert\", \"actual\": 3, \"expected\": 1, \"passed\": false}, {\"check\": \"delete\", \"actual\": 3, \"expected\": 1, \"passed\": false}, {\"check\": \"substitution\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"empty to text\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"same\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.599,"exit_code":1,"observations":[{"actual":1,"check":"append token","expected":1,"passed":true},{"actual":3,"check":"interior insert","expected":1,"passed":false},{"actual":3,"check":"delete","expected":1,"passed":false},{"actual":1,"check":"substitution","expected":1,"passed":true},{"actual":1,"check":"empty to text","expected":1,"passed":true},{"actual":0,"check":"same","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"append token\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"interior insert\", \"actual\": 3, \"expected\": 1, \"passed\": false}, {\"check\": \"delete\", \"actual\": 3, \"expected\": 1, \"passed\": false}, {\"check\": \"substitution\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"empty to text\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"same\", \"actual\": 0, \"expected\": 0, \"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."}}