{"abstract":"The operation returns a result or retained state that violates this contract: Return distinct left values absent from right, preserving first appearance order.","category":"Collection algebra","checks":5,"contract":"Return distinct left values absent from right, preserving first appearance order. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","contract_signature":"x, y=None","evaluation_group":"model-75020ca376219e71","failed_approach":"Swapping operands computes the opposite difference.","family":"xr-stable-set-difference","id":"FA-4251","implementations":{"attempt":{"sha256":"4cbc1b72e64342ac45a7a3b688e689e113d76bedd8c342472382a2a913a434f4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [v for v in dict.fromkeys(y) if v not in x]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('both empty', solve([], []), [])\ncheck('empty right operand', solve(['a'], []), ['a'])\ncheck('empty left operand', solve([], ['b']), [])\ncheck('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), ['a'])\ncheck('unmatched duplicate collapses', solve(['a','a'], []), ['a'])\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":"eed690f1721520c5848728a43fdf61f8bacf0d6117915997816892f4fe166f56","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [v for v in x if v not in y]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('both empty', solve([], []), [])\ncheck('empty right operand', solve(['a'], []), ['a'])\ncheck('empty left operand', solve([], ['b']), [])\ncheck('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), ['a'])\ncheck('unmatched duplicate collapses', solve(['a','a'], []), ['a'])\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":"xr-stable-set-difference","generated_at":"2026-09-29T14:37:37.178854+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A controlled local-runtime regression for collection APIs, language semantics, or ownership wrappers. Fixtures include boundary and interaction cases.","root_cause":"Left duplicates are emitted repeatedly despite set semantics.","sha256":"49061b1bb76de282fb4977d61390a50d1586f7e273e75f23c68e5ad014e7da29","title":"Stable set difference · case 01","variant":1,"variant_policy":"Five execution reruns of a fixed adversarial fixture suite; variant number does not alter semantic inputs.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":35.332,"exit_code":1,"observations":[{"actual":[],"check":"both empty","expected":[],"passed":true},{"actual":[],"check":"empty right operand","expected":["a"],"passed":false},{"actual":["b"],"check":"empty left operand","expected":[],"passed":false},{"actual":["c"],"check":"overlap and multiplicity","expected":["a"],"passed":false},{"actual":[],"check":"unmatched duplicate collapses","expected":["a"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"both empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty right operand\", \"actual\": [], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"empty left operand\", \"actual\": [\"b\"], \"expected\": [], \"passed\": false}, {\"check\": \"overlap and multiplicity\", \"actual\": [\"c\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"unmatched duplicate collapses\", \"actual\": [], \"expected\": [\"a\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.33,"exit_code":1,"observations":[{"actual":[],"check":"both empty","expected":[],"passed":true},{"actual":["a"],"check":"empty right operand","expected":["a"],"passed":true},{"actual":[],"check":"empty left operand","expected":[],"passed":true},{"actual":["a"],"check":"overlap and multiplicity","expected":["a"],"passed":true},{"actual":["a","a"],"check":"unmatched duplicate collapses","expected":["a"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"both empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty right operand\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"empty left operand\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"overlap and multiplicity\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"unmatched duplicate collapses\", \"actual\": [\"a\", \"a\"], \"expected\": [\"a\"], \"passed\": false}], \"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."}}