{"abstract":"A buy order matches its own owner.","category":"Auction allocation rules","checks":6,"contract":"For one buy [owner, limit] and asks [owner, price], return the cheapest differently owned ask price <= limit, or None. Input order breaks equal prices.","evaluation_group":"model-b09defba89a8798d","failed_approach":"Discarding the best ask after a self-cross misses a later eligible seller.","family":"z-auction_matching-self-cross","id":"FA-12701","implementations":{"attempt":{"sha256":"13bfac248c5c96b82b47b30cadee674c17bda7e7ce92d7c389af3740f920d987","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(buy, asks):\n    eligible=sorted([a for a in asks if a[1]<=buy[1]],key=lambda a:a[1])\n    return eligible[0][1] if eligible and eligible[0][0]!=buy[0] else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('skip own ask', solve(['a',20+N], [['a',1],['b',8]]), 8)\ncheck('all own', solve(['a',10], [['a',2]]), None)\ncheck('external cheapest', solve(['a',10], [['b',2],['a',3]]), 2)\ncheck('no crossing', solve(['a',1], [['b',2]]), None)\ncheck('empty asks', solve(['a',10], []), None)\ncheck('equal limit', solve(['a',7], [['b',7]]), 7)\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":"9ca0f92aedc1e55957a33f568df618c425008e6fd04b995260621e1fc56a073a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(buy, asks):\n    return min((a[1] for a in asks if a[1]<=buy[1]),default=None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('skip own ask', solve(['a',20+N], [['a',1],['b',8]]), 8)\ncheck('all own', solve(['a',10], [['a',2]]), None)\ncheck('external cheapest', solve(['a',10], [['b',2],['a',3]]), 2)\ncheck('no crossing', solve(['a',1], [['b',2]]), None)\ncheck('empty asks', solve(['a',10], []), None)\ncheck('equal limit', solve(['a',7], [['b',7]]), 7)\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":"898b1766f06cee8efb3eccde92d231108c09274ae90b34e9565c3ef0c82ae1f8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(buy, asks):\n    eligible=[a for a in asks if a[0]!=buy[0] and a[1]<=buy[1]]\n    return min((a[1] for a in eligible),default=None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('skip own ask', solve(['a',20+N], [['a',1],['b',8]]), 8)\ncheck('all own', solve(['a',10], [['a',2]]), None)\ncheck('external cheapest', solve(['a',10], [['b',2],['a',3]]), 2)\ncheck('no crossing', solve(['a',1], [['b',2]]), None)\ncheck('empty asks', solve(['a',10], []), None)\ncheck('equal limit', solve(['a',7], [['b',7]]), 7)\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":"Offline toy model with explicit integer inputs; no strategic behavior or real market execution. 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-auction_matching-self-cross","generated_at":"2026-09-29T14:38:59.387438+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Deterministic teaching model for reviewing auction allocation software; not a representation of any venue or financial advice.","repair":"Implement the stated toy allocation contract directly: For one buy [owner, limit] and asks [owner, price], return the cheapest differently owned ask price <= limit, or None. Input order breaks equal prices.","root_cause":"Matching checks price but omits owner incompatibility.","sha256":"56b21221a165bd7a3b332bbfdfc9dc0688a8e52209c7d27c8163c5f5e5b8fad9","title":"A buy order matches its own owner · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.525,"exit_code":1,"observations":[{"actual":null,"check":"skip own ask","expected":8,"passed":false},{"actual":null,"check":"all own","expected":null,"passed":true},{"actual":2,"check":"external cheapest","expected":2,"passed":true},{"actual":null,"check":"no crossing","expected":null,"passed":true},{"actual":null,"check":"empty asks","expected":null,"passed":true},{"actual":7,"check":"equal limit","expected":7,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"skip own ask\", \"actual\": null, \"expected\": 8, \"passed\": false}, {\"check\": \"all own\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"external cheapest\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"no crossing\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty asks\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"equal limit\", \"actual\": 7, \"expected\": 7, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.371,"exit_code":1,"observations":[{"actual":1,"check":"skip own ask","expected":8,"passed":false},{"actual":2,"check":"all own","expected":null,"passed":false},{"actual":2,"check":"external cheapest","expected":2,"passed":true},{"actual":null,"check":"no crossing","expected":null,"passed":true},{"actual":null,"check":"empty asks","expected":null,"passed":true},{"actual":7,"check":"equal limit","expected":7,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"skip own ask\", \"actual\": 1, \"expected\": 8, \"passed\": false}, {\"check\": \"all own\", \"actual\": 2, \"expected\": null, \"passed\": false}, {\"check\": \"external cheapest\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"no crossing\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty asks\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"equal limit\", \"actual\": 7, \"expected\": 7, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.64,"exit_code":0,"observations":[{"actual":8,"check":"skip own ask","expected":8,"passed":true},{"actual":null,"check":"all own","expected":null,"passed":true},{"actual":2,"check":"external cheapest","expected":2,"passed":true},{"actual":null,"check":"no crossing","expected":null,"passed":true},{"actual":null,"check":"empty asks","expected":null,"passed":true},{"actual":7,"check":"equal limit","expected":7,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"skip own ask\", \"actual\": 8, \"expected\": 8, \"passed\": true}, {\"check\": \"all own\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"external cheapest\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"no crossing\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty asks\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"equal limit\", \"actual\": 7, \"expected\": 7, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}