{"abstract":"Bond reversal leaves endpoint-specific stereo ligands attached to wrong atoms.","category":"Molecular graph representation","checks":6,"contract":"A double bond record [a,b,left_ligand,right_ligand] uses endpoint-relative ligand anchors. Canonicalize a<=b, swapping ligand anchor slots if and only if endpoints reverse.","evaluation_group":"model-c396e662648f4cc3","failed_approach":"Swapping ligand slots on every bond damages already canonical bonds.","family":"z-chemical_graphs-bond-stereo-anchor","id":"FA-12476","implementations":{"attempt":{"sha256":"eec57690e9d0a2ba2fef524325004ac60928e5e026a29a0d4b766081343d5ea4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b, left, right):\n    return [min(a,b),max(a,b),right,left]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reverse anchors', solve(N+1,N,30+N,40+N), [N,N+1,40+N,30+N])\ncheck('forward anchors', solve(N,N+1,30+N,40+N), [N,N+1,30+N,40+N])\ncheck('implicit left', solve(N+1,N,None,40+N), [N,N+1,40+N,None])\ncheck('implicit right', solve(N,N+1,30+N,None), [N,N+1,30+N,None])\ncheck('both implicit', solve(N+1,N,None,None), [N,N+1,None,None])\ncheck('zero ligand ID', solve(N,N+1,0,40+N), [N,N+1,0,40+N])\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":"0445a701a2b72644680594bbe24e3ecf537e4980a231eb631f2ee1cebcbc2a25","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b, left, right):\n    return [min(a,b),max(a,b),left,right]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reverse anchors', solve(N+1,N,30+N,40+N), [N,N+1,40+N,30+N])\ncheck('forward anchors', solve(N,N+1,30+N,40+N), [N,N+1,30+N,40+N])\ncheck('implicit left', solve(N+1,N,None,40+N), [N,N+1,40+N,None])\ncheck('implicit right', solve(N,N+1,30+N,None), [N,N+1,30+N,None])\ncheck('both implicit', solve(N+1,N,None,None), [N,N+1,None,None])\ncheck('zero ligand ID', solve(N,N+1,0,40+N), [N,N+1,0,40+N])\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":"ab07c3b7867180f9ec6ab777e903606e657b6ce972995b10e2b8ddb24f6a93a5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b, left, right):\n    return [a,b,left,right] if a <= b else [b,a,right,left]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reverse anchors', solve(N+1,N,30+N,40+N), [N,N+1,40+N,30+N])\ncheck('forward anchors', solve(N,N+1,30+N,40+N), [N,N+1,30+N,40+N])\ncheck('implicit left', solve(N+1,N,None,40+N), [N,N+1,40+N,None])\ncheck('implicit right', solve(N,N+1,30+N,None), [N,N+1,30+N,None])\ncheck('both implicit', solve(N+1,N,None,None), [N,N+1,None,None])\ncheck('zero ligand ID', solve(N,N+1,0,40+N), [N,N+1,0,40+N])\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-bond-stereo-anchor","generated_at":"2026-09-29T14:38:57.279485+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: A double bond record [a,b,left_ligand,right_ligand] uses endpoint-relative ligand anchors. Canonicalize a<=b, swapping ligand anchor slots if and only if endpoints reverse.","root_cause":"Endpoint sorting leaves left/right ligand references in their original slots.","sha256":"01f1c75f678c56b3b1426e8ddb09388dfdf2afd718099171609decab92e8e977","title":"Bond reversal leaves endpoint-specific stereo ligands attached to wrong atoms · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.009,"exit_code":1,"observations":[{"actual":[1,2,41,31],"check":"reverse anchors","expected":[1,2,41,31],"passed":true},{"actual":[1,2,41,31],"check":"forward anchors","expected":[1,2,31,41],"passed":false},{"actual":[1,2,41,null],"check":"implicit left","expected":[1,2,41,null],"passed":true},{"actual":[1,2,null,31],"check":"implicit right","expected":[1,2,31,null],"passed":false},{"actual":[1,2,null,null],"check":"both implicit","expected":[1,2,null,null],"passed":true},{"actual":[1,2,41,0],"check":"zero ligand ID","expected":[1,2,0,41],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse anchors\", \"actual\": [1, 2, 41, 31], \"expected\": [1, 2, 41, 31], \"passed\": true}, {\"check\": \"forward anchors\", \"actual\": [1, 2, 41, 31], \"expected\": [1, 2, 31, 41], \"passed\": false}, {\"check\": \"implicit left\", \"actual\": [1, 2, 41, null], \"expected\": [1, 2, 41, null], \"passed\": true}, {\"check\": \"implicit right\", \"actual\": [1, 2, null, 31], \"expected\": [1, 2, 31, null], \"passed\": false}, {\"check\": \"both implicit\", \"actual\": [1, 2, null, null], \"expected\": [1, 2, null, null], \"passed\": true}, {\"check\": \"zero ligand ID\", \"actual\": [1, 2, 41, 0], \"expected\": [1, 2, 0, 41], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.164,"exit_code":1,"observations":[{"actual":[1,2,31,41],"check":"reverse anchors","expected":[1,2,41,31],"passed":false},{"actual":[1,2,31,41],"check":"forward anchors","expected":[1,2,31,41],"passed":true},{"actual":[1,2,null,41],"check":"implicit left","expected":[1,2,41,null],"passed":false},{"actual":[1,2,31,null],"check":"implicit right","expected":[1,2,31,null],"passed":true},{"actual":[1,2,null,null],"check":"both implicit","expected":[1,2,null,null],"passed":true},{"actual":[1,2,0,41],"check":"zero ligand ID","expected":[1,2,0,41],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse anchors\", \"actual\": [1, 2, 31, 41], \"expected\": [1, 2, 41, 31], \"passed\": false}, {\"check\": \"forward anchors\", \"actual\": [1, 2, 31, 41], \"expected\": [1, 2, 31, 41], \"passed\": true}, {\"check\": \"implicit left\", \"actual\": [1, 2, null, 41], \"expected\": [1, 2, 41, null], \"passed\": false}, {\"check\": \"implicit right\", \"actual\": [1, 2, 31, null], \"expected\": [1, 2, 31, null], \"passed\": true}, {\"check\": \"both implicit\", \"actual\": [1, 2, null, null], \"expected\": [1, 2, null, null], \"passed\": true}, {\"check\": \"zero ligand ID\", \"actual\": [1, 2, 0, 41], \"expected\": [1, 2, 0, 41], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.325,"exit_code":0,"observations":[{"actual":[1,2,41,31],"check":"reverse anchors","expected":[1,2,41,31],"passed":true},{"actual":[1,2,31,41],"check":"forward anchors","expected":[1,2,31,41],"passed":true},{"actual":[1,2,41,null],"check":"implicit left","expected":[1,2,41,null],"passed":true},{"actual":[1,2,31,null],"check":"implicit right","expected":[1,2,31,null],"passed":true},{"actual":[1,2,null,null],"check":"both implicit","expected":[1,2,null,null],"passed":true},{"actual":[1,2,0,41],"check":"zero ligand ID","expected":[1,2,0,41],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse anchors\", \"actual\": [1, 2, 41, 31], \"expected\": [1, 2, 41, 31], \"passed\": true}, {\"check\": \"forward anchors\", \"actual\": [1, 2, 31, 41], \"expected\": [1, 2, 31, 41], \"passed\": true}, {\"check\": \"implicit left\", \"actual\": [1, 2, 41, null], \"expected\": [1, 2, 41, null], \"passed\": true}, {\"check\": \"implicit right\", \"actual\": [1, 2, 31, null], \"expected\": [1, 2, 31, null], \"passed\": true}, {\"check\": \"both implicit\", \"actual\": [1, 2, null, null], \"expected\": [1, 2, null, null], \"passed\": true}, {\"check\": \"zero ligand ID\", \"actual\": [1, 2, 0, 41], \"expected\": [1, 2, 0, 41], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}