{"abstract":"Ligand reordering silently flips stored orientation.","category":"Molecular graph representation","checks":6,"contract":"Four distinct ligand IDs define a local orientation sign +/-1. Return sign multiplied by permutation parity when old ligand order is changed to new order containing the same IDs.","evaluation_group":"model-226da78566f4e967","failed_approach":"Flipping for every nonidentity permutation mishandles even permutations.","family":"z-chemical_graphs-stereo-parity","id":"FA-12456","implementations":{"attempt":{"sha256":"8159b568b66edee6fedf9234cd9dc78738f3f21e50867f36f1f1fe76d32e4705","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(old, new, sign):\n    return -sign if old != new else sign\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('one swap', solve([N,N+1,N+2,N+3],[N+1,N,N+2,N+3],1), -1)\ncheck('three cycle', solve([N,N+1,N+2,N+3],[N+1,N+2,N,N+3],1), 1)\ncheck('identity', solve([N,N+1,N+2,N+3],[N,N+1,N+2,N+3],-1), -1)\ncheck('double swap', solve([N,N+1,N+2,N+3],[N+1,N,N+3,N+2],-1), -1)\ncheck('four cycle', solve([N,N+1,N+2,N+3],[N+1,N+2,N+3,N],1), -1)\ncheck('reverse order', solve([N,N+1,N+2,N+3],[N+3,N+2,N+1,N],1), 1)\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":"03866289bcddcec18d07db12d13e90291a45cb65da980a4f255bfb97b0584f09","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(old, new, sign):\n    return sign\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('one swap', solve([N,N+1,N+2,N+3],[N+1,N,N+2,N+3],1), -1)\ncheck('three cycle', solve([N,N+1,N+2,N+3],[N+1,N+2,N,N+3],1), 1)\ncheck('identity', solve([N,N+1,N+2,N+3],[N,N+1,N+2,N+3],-1), -1)\ncheck('double swap', solve([N,N+1,N+2,N+3],[N+1,N,N+3,N+2],-1), -1)\ncheck('four cycle', solve([N,N+1,N+2,N+3],[N+1,N+2,N+3,N],1), -1)\ncheck('reverse order', solve([N,N+1,N+2,N+3],[N+3,N+2,N+1,N],1), 1)\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":"41eee7731814cd88ad3d7fa5b4345c7438349c69efd127fae2b73189d0d4696b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(old, new, sign):\n    p = [old.index(x) for x in new]\n    inv = sum(p[i] > p[j] for i in range(4) for j in range(i+1,4))\n    return sign * (-1 if inv % 2 else 1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('one swap', solve([N,N+1,N+2,N+3],[N+1,N,N+2,N+3],1), -1)\ncheck('three cycle', solve([N,N+1,N+2,N+3],[N+1,N+2,N,N+3],1), 1)\ncheck('identity', solve([N,N+1,N+2,N+3],[N,N+1,N+2,N+3],-1), -1)\ncheck('double swap', solve([N,N+1,N+2,N+3],[N+1,N,N+3,N+2],-1), -1)\ncheck('four cycle', solve([N,N+1,N+2,N+3],[N+1,N+2,N+3,N],1), -1)\ncheck('reverse order', solve([N,N+1,N+2,N+3],[N+3,N+2,N+1,N],1), 1)\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":"Toy representation only; no valence inference, chemical sanitization, synthesis, or real molecular identity determination. 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":"z-chemical_graphs-stereo-parity","generated_at":"2026-09-29T14:38:57.019485+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Controlled molecular graph interchange model; tests isolate atom or bond representation errors without claiming chemical validity or production toolkit equivalence.","repair":"Implement the explicit toy representation contract: Four distinct ligand IDs define a local orientation sign +/-1. Return sign multiplied by permutation parity when old ligand order is changed to new order containing the same IDs.","root_cause":"Orientation sign is copied when ligand order changes.","sha256":"000024c3fe2014ab4f9311516f08c5459c5ea1fe3d701e19e3ec446e2aa272a0","title":"Ligand reordering silently flips stored orientation · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.674,"exit_code":1,"observations":[{"actual":-1,"check":"one swap","expected":-1,"passed":true},{"actual":-1,"check":"three cycle","expected":1,"passed":false},{"actual":-1,"check":"identity","expected":-1,"passed":true},{"actual":1,"check":"double swap","expected":-1,"passed":false},{"actual":-1,"check":"four cycle","expected":-1,"passed":true},{"actual":-1,"check":"reverse order","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"one swap\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"three cycle\", \"actual\": -1, \"expected\": 1, \"passed\": false}, {\"check\": \"identity\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"double swap\", \"actual\": 1, \"expected\": -1, \"passed\": false}, {\"check\": \"four cycle\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"reverse order\", \"actual\": -1, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.901,"exit_code":1,"observations":[{"actual":1,"check":"one swap","expected":-1,"passed":false},{"actual":1,"check":"three cycle","expected":1,"passed":true},{"actual":-1,"check":"identity","expected":-1,"passed":true},{"actual":-1,"check":"double swap","expected":-1,"passed":true},{"actual":1,"check":"four cycle","expected":-1,"passed":false},{"actual":1,"check":"reverse order","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"one swap\", \"actual\": 1, \"expected\": -1, \"passed\": false}, {\"check\": \"three cycle\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"identity\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"double swap\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"four cycle\", \"actual\": 1, \"expected\": -1, \"passed\": false}, {\"check\": \"reverse order\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.324,"exit_code":0,"observations":[{"actual":-1,"check":"one swap","expected":-1,"passed":true},{"actual":1,"check":"three cycle","expected":1,"passed":true},{"actual":-1,"check":"identity","expected":-1,"passed":true},{"actual":-1,"check":"double swap","expected":-1,"passed":true},{"actual":-1,"check":"four cycle","expected":-1,"passed":true},{"actual":1,"check":"reverse order","expected":1,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"one swap\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"three cycle\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"identity\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"double swap\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"four cycle\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"reverse order\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}