{"abstract":"equal beam scores depend on incidental input order.","category":"Beam search bookkeeping","checks":6,"contract":"Rows [score,id] sort by descending score then ascending identifier.","contract_signature":"rows","evaluation_group":"beam-tie_order","failed_approach":"Sorting only by token leaves ties dependent on parent insertion order.","family":"w3-beam-search-bookkeeping-stable-score-ties","id":"FA-98506","implementations":{"attempt":{"sha256":"526845696bd3b99d7accc4e661488f73479f1bc8345971c360cbd7b7a2b5c40c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    return sorted(rows,key=lambda r:(-r[0],tuple(-ord(c) for c in r[1])))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reverse input tie',solve([[N,'z'],[N,'a']]),[[N,'a'],[N,'z']])\ncheck('score before name',solve([[N,'a'],[N+1,'z']]),[[N+1,'z'],[N,'a']])\ncheck('already ordered',solve([[2,'a'],[1,'b']]),[[2,'a'],[1,'b']])\ncheck('empty candidates',solve([]),[])\ncheck('single candidate',solve([[N,'x']]),[[N,'x']])\ncheck('three tie order',solve([[0,'c'],[0,'b'],[0,'a']]),[[0,'a'],[0,'b'],[0,'c']])\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":"52dcc90abf9e355104b27d9bb7a1d84ec0248116fe38c6e1602619661b0a31be","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    return sorted(rows,key=lambda r:-r[0])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reverse input tie',solve([[N,'z'],[N,'a']]),[[N,'a'],[N,'z']])\ncheck('score before name',solve([[N,'a'],[N+1,'z']]),[[N+1,'z'],[N,'a']])\ncheck('already ordered',solve([[2,'a'],[1,'b']]),[[2,'a'],[1,'b']])\ncheck('empty candidates',solve([]),[])\ncheck('single candidate',solve([[N,'x']]),[[N,'x']])\ncheck('three tie order',solve([[0,'c'],[0,'b'],[0,'a']]),[[0,'a'],[0,'b'],[0,'c']])\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 is a finite toy beam-state contract and makes no claim about neural model quality or production decoding. 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":"w3-beam-search-bookkeeping-stable-score-ties","generated_at":"2026-09-30T16:48:13.668771+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Beam decoders rely on consistent hypothesis state while expanding and ranking candidates.","root_cause":"No deterministic secondary ordering is used for score ties.","sha256":"f4e3345114e6e8d6921e38840700a943642f325b3f166eb02974c8f938411b07","title":"Beam search: equal beam scores depend on incidental input order · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":28.251,"exit_code":1,"observations":[{"actual":[[1,"z"],[1,"a"]],"check":"reverse input tie","expected":[[1,"a"],[1,"z"]],"passed":false},{"actual":[[2,"z"],[1,"a"]],"check":"score before name","expected":[[2,"z"],[1,"a"]],"passed":true},{"actual":[[2,"a"],[1,"b"]],"check":"already ordered","expected":[[2,"a"],[1,"b"]],"passed":true},{"actual":[],"check":"empty candidates","expected":[],"passed":true},{"actual":[[1,"x"]],"check":"single candidate","expected":[[1,"x"]],"passed":true},{"actual":[[0,"c"],[0,"b"],[0,"a"]],"check":"three tie order","expected":[[0,"a"],[0,"b"],[0,"c"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse input tie\", \"actual\": [[1, \"z\"], [1, \"a\"]], \"expected\": [[1, \"a\"], [1, \"z\"]], \"passed\": false}, {\"check\": \"score before name\", \"actual\": [[2, \"z\"], [1, \"a\"]], \"expected\": [[2, \"z\"], [1, \"a\"]], \"passed\": true}, {\"check\": \"already ordered\", \"actual\": [[2, \"a\"], [1, \"b\"]], \"expected\": [[2, \"a\"], [1, \"b\"]], \"passed\": true}, {\"check\": \"empty candidates\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single candidate\", \"actual\": [[1, \"x\"]], \"expected\": [[1, \"x\"]], \"passed\": true}, {\"check\": \"three tie order\", \"actual\": [[0, \"c\"], [0, \"b\"], [0, \"a\"]], \"expected\": [[0, \"a\"], [0, \"b\"], [0, \"c\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.804,"exit_code":1,"observations":[{"actual":[[1,"z"],[1,"a"]],"check":"reverse input tie","expected":[[1,"a"],[1,"z"]],"passed":false},{"actual":[[2,"z"],[1,"a"]],"check":"score before name","expected":[[2,"z"],[1,"a"]],"passed":true},{"actual":[[2,"a"],[1,"b"]],"check":"already ordered","expected":[[2,"a"],[1,"b"]],"passed":true},{"actual":[],"check":"empty candidates","expected":[],"passed":true},{"actual":[[1,"x"]],"check":"single candidate","expected":[[1,"x"]],"passed":true},{"actual":[[0,"c"],[0,"b"],[0,"a"]],"check":"three tie order","expected":[[0,"a"],[0,"b"],[0,"c"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse input tie\", \"actual\": [[1, \"z\"], [1, \"a\"]], \"expected\": [[1, \"a\"], [1, \"z\"]], \"passed\": false}, {\"check\": \"score before name\", \"actual\": [[2, \"z\"], [1, \"a\"]], \"expected\": [[2, \"z\"], [1, \"a\"]], \"passed\": true}, {\"check\": \"already ordered\", \"actual\": [[2, \"a\"], [1, \"b\"]], \"expected\": [[2, \"a\"], [1, \"b\"]], \"passed\": true}, {\"check\": \"empty candidates\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single candidate\", \"actual\": [[1, \"x\"]], \"expected\": [[1, \"x\"]], \"passed\": true}, {\"check\": \"three tie order\", \"actual\": [[0, \"c\"], [0, \"b\"], [0, \"a\"]], \"expected\": [[0, \"a\"], [0, \"b\"], [0, \"c\"]], \"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."}}