{"abstract":"The operation returns a result or retained state that violates this contract: Return true for equal occurrence counts regardless of positional order.","category":"Collection algebra","checks":6,"contract":"Return true for equal occurrence counts regardless of positional 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-3d0d1dd8752f90ae","failed_approach":"Set equality ignores occurrence counts.","family":"xr-bag-equality-retains-counts","id":"FA-4321","implementations":{"attempt":{"sha256":"0a8382a1777ac2c33f66c91a3defaa3a8de69ee031e068df550356d1d9ea3380","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return set(x)==set(y)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('both empty', solve([], []), True)\ncheck('empty right operand', solve(['a'], []), False)\ncheck('empty left operand', solve([], ['b']), False)\ncheck('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), False)\ncheck('permutation is equal bag', solve(['a','b'], ['b','a']), True)\ncheck('count mismatch differs', solve(['a','a'], ['a']), False)\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":"9e59ec278d03db698794fc2cfb2823c3cea0fa5f504d5f323265e5dbe4eee1dd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return x==y\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('both empty', solve([], []), True)\ncheck('empty right operand', solve(['a'], []), False)\ncheck('empty left operand', solve([], ['b']), False)\ncheck('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), False)\ncheck('permutation is equal bag', solve(['a','b'], ['b','a']), True)\ncheck('count mismatch differs', solve(['a','a'], ['a']), False)\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-bag-equality-retains-counts","generated_at":"2026-09-29T14:37:37.866521+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":"Positional equality rejects valid permutations of the same bag.","sha256":"cd1237fd7a3fe92d0fcf753062de8c0125c612c91dcb18711bb1ec7d05d2bf38","title":"Bag equality retains counts · 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":114.259,"exit_code":1,"observations":[{"actual":true,"check":"both empty","expected":true,"passed":true},{"actual":false,"check":"empty right operand","expected":false,"passed":true},{"actual":false,"check":"empty left operand","expected":false,"passed":true},{"actual":false,"check":"overlap and multiplicity","expected":false,"passed":true},{"actual":true,"check":"permutation is equal bag","expected":true,"passed":true},{"actual":true,"check":"count mismatch differs","expected":false,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"both empty\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"empty right operand\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"empty left operand\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"overlap and multiplicity\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"permutation is equal bag\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"count mismatch differs\", \"actual\": true, \"expected\": false, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.77,"exit_code":1,"observations":[{"actual":true,"check":"both empty","expected":true,"passed":true},{"actual":false,"check":"empty right operand","expected":false,"passed":true},{"actual":false,"check":"empty left operand","expected":false,"passed":true},{"actual":false,"check":"overlap and multiplicity","expected":false,"passed":true},{"actual":false,"check":"permutation is equal bag","expected":true,"passed":false},{"actual":false,"check":"count mismatch differs","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"both empty\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"empty right operand\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"empty left operand\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"overlap and multiplicity\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"permutation is equal bag\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"count mismatch differs\", \"actual\": false, \"expected\": 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."}}