{"abstract":"completed pool is capped by discovery order.","category":"Beam search bookkeeping","checks":6,"contract":"Rows [id,score]; keep up to capacity highest scores, lexical ID for ties.","contract_signature":"rows, capacity","evaluation_group":"beam-finished_cap","failed_approach":"Sorting ascending retains the weakest completions first.","family":"w3-beam-search-bookkeeping-finished-ranking-cap","id":"FA-98501","implementations":{"attempt":{"sha256":"7dff26ce3367b35a887a16e30dfdfe901950588d9392f74f99afc7cc0431e057","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, capacity):\n    return sorted(rows,key=lambda r:(r[1],r[0]))[:capacity]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nrows=[['early',N],['best',N+3],['mid',N+1]]\ncheck('capacity winner',solve(rows,1),[['best',N+3]])\ncheck('top two',solve(rows,2),[['best',N+3],['mid',N+1]])\ncheck('zero capacity',solve(rows,0),[])\ncheck('empty pool',solve([],N),[])\ncheck('tie lexical',solve([['z',N],['a',N]],1),[['a',N]])\ncheck('all retained sorted',solve(rows,5),[['best',N+3],['mid',N+1],['early',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":"6193e35316321e9f3ff237966a69cbb9fbda046b4d502980e8ca159d5127060c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, capacity):\n    return rows[:capacity]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nrows=[['early',N],['best',N+3],['mid',N+1]]\ncheck('capacity winner',solve(rows,1),[['best',N+3]])\ncheck('top two',solve(rows,2),[['best',N+3],['mid',N+1]])\ncheck('zero capacity',solve(rows,0),[])\ncheck('empty pool',solve([],N),[])\ncheck('tie lexical',solve([['z',N],['a',N]],1),[['a',N]])\ncheck('all retained sorted',solve(rows,5),[['best',N+3],['mid',N+1],['early',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":"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-finished-ranking-cap","generated_at":"2026-09-30T16:48:13.669345+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":"Finished hypotheses are truncated before they are ranked by final score.","sha256":"3e58ec7a8a97918927ffb7f2ea4f6ad25b1ca211e4475a9b3adb5041c40a9f39","title":"Beam search: completed pool is capped by discovery 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":27.96,"exit_code":1,"observations":[{"actual":[["early",1]],"check":"capacity winner","expected":[["best",4]],"passed":false},{"actual":[["early",1],["mid",2]],"check":"top two","expected":[["best",4],["mid",2]],"passed":false},{"actual":[],"check":"zero capacity","expected":[],"passed":true},{"actual":[],"check":"empty pool","expected":[],"passed":true},{"actual":[["a",1]],"check":"tie lexical","expected":[["a",1]],"passed":true},{"actual":[["early",1],["mid",2],["best",4]],"check":"all retained sorted","expected":[["best",4],["mid",2],["early",1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"capacity winner\", \"actual\": [[\"early\", 1]], \"expected\": [[\"best\", 4]], \"passed\": false}, {\"check\": \"top two\", \"actual\": [[\"early\", 1], [\"mid\", 2]], \"expected\": [[\"best\", 4], [\"mid\", 2]], \"passed\": false}, {\"check\": \"zero capacity\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty pool\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"tie lexical\", \"actual\": [[\"a\", 1]], \"expected\": [[\"a\", 1]], \"passed\": true}, {\"check\": \"all retained sorted\", \"actual\": [[\"early\", 1], [\"mid\", 2], [\"best\", 4]], \"expected\": [[\"best\", 4], [\"mid\", 2], [\"early\", 1]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.362,"exit_code":1,"observations":[{"actual":[["early",1]],"check":"capacity winner","expected":[["best",4]],"passed":false},{"actual":[["early",1],["best",4]],"check":"top two","expected":[["best",4],["mid",2]],"passed":false},{"actual":[],"check":"zero capacity","expected":[],"passed":true},{"actual":[],"check":"empty pool","expected":[],"passed":true},{"actual":[["z",1]],"check":"tie lexical","expected":[["a",1]],"passed":false},{"actual":[["early",1],["best",4],["mid",2]],"check":"all retained sorted","expected":[["best",4],["mid",2],["early",1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"capacity winner\", \"actual\": [[\"early\", 1]], \"expected\": [[\"best\", 4]], \"passed\": false}, {\"check\": \"top two\", \"actual\": [[\"early\", 1], [\"best\", 4]], \"expected\": [[\"best\", 4], [\"mid\", 2]], \"passed\": false}, {\"check\": \"zero capacity\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty pool\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"tie lexical\", \"actual\": [[\"z\", 1]], \"expected\": [[\"a\", 1]], \"passed\": false}, {\"check\": \"all retained sorted\", \"actual\": [[\"early\", 1], [\"best\", 4], [\"mid\", 2]], \"expected\": [[\"best\", 4], [\"mid\", 2], [\"early\", 1]], \"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."}}