{"abstract":"zero-width search retains one live hypothesis.","category":"Beam search bookkeeping","checks":6,"contract":"Return the top width candidate rows; width is a nonnegative integer.","contract_signature":"rows, width","evaluation_group":"beam-width","failed_approach":"Clamping width to one still creates a hypothesis when the caller requested none.","family":"w3-beam-search-bookkeeping-beam-width-zero","id":"FA-98516","implementations":{"attempt":{"sha256":"7d72cb65509f0a747f2511f9555578d1a60e71c0244967a8f124805e473e8064","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, width):\n    return sorted(rows,key=lambda r:-r[1])[:max(0,width+1)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nrows=[['a',N],['b',N+1]]\ncheck('zero width',solve(rows,0),[])\ncheck('one width',solve(rows,1),[['b',N+1]])\ncheck('wide beam',solve(rows,5),[['b',N+1],['a',N]])\ncheck('empty rows',solve([],0),[])\ncheck('tie order',solve([['z',N],['a',N]],1),[['a',N]])\ncheck('singleton width zero',solve([['x',1]],0),[])\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":"3bcacaa614ddd6ac1d0c76d5067b87468aad49a09098d3c0e73b88c320cab8e0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, width):\n    return sorted(rows,key=lambda r:-r[1])[:max(1,width)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nrows=[['a',N],['b',N+1]]\ncheck('zero width',solve(rows,0),[])\ncheck('one width',solve(rows,1),[['b',N+1]])\ncheck('wide beam',solve(rows,5),[['b',N+1],['a',N]])\ncheck('empty rows',solve([],0),[])\ncheck('tie order',solve([['z',N],['a',N]],1),[['a',N]])\ncheck('singleton width zero',solve([['x',1]],0),[])\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-beam-width-zero","generated_at":"2026-09-30T16:48:13.668727+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":"The pruning helper treats a zero beam width as a request for the default single path.","sha256":"ce295787c87f0f5c8ad174b34bc2953448b3a2725f6bc76466b9c335e31aa99d","title":"Beam search: zero-width search retains one live hypothesis · 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.866,"exit_code":1,"observations":[{"actual":[["b",2]],"check":"zero width","expected":[],"passed":false},{"actual":[["b",2],["a",1]],"check":"one width","expected":[["b",2]],"passed":false},{"actual":[["b",2],["a",1]],"check":"wide beam","expected":[["b",2],["a",1]],"passed":true},{"actual":[],"check":"empty rows","expected":[],"passed":true},{"actual":[["z",1],["a",1]],"check":"tie order","expected":[["a",1]],"passed":false},{"actual":[["x",1]],"check":"singleton width zero","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero width\", \"actual\": [[\"b\", 2]], \"expected\": [], \"passed\": false}, {\"check\": \"one width\", \"actual\": [[\"b\", 2], [\"a\", 1]], \"expected\": [[\"b\", 2]], \"passed\": false}, {\"check\": \"wide beam\", \"actual\": [[\"b\", 2], [\"a\", 1]], \"expected\": [[\"b\", 2], [\"a\", 1]], \"passed\": true}, {\"check\": \"empty rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"tie order\", \"actual\": [[\"z\", 1], [\"a\", 1]], \"expected\": [[\"a\", 1]], \"passed\": false}, {\"check\": \"singleton width zero\", \"actual\": [[\"x\", 1]], \"expected\": [], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":26.943,"exit_code":1,"observations":[{"actual":[["b",2]],"check":"zero width","expected":[],"passed":false},{"actual":[["b",2]],"check":"one width","expected":[["b",2]],"passed":true},{"actual":[["b",2],["a",1]],"check":"wide beam","expected":[["b",2],["a",1]],"passed":true},{"actual":[],"check":"empty rows","expected":[],"passed":true},{"actual":[["z",1]],"check":"tie order","expected":[["a",1]],"passed":false},{"actual":[["x",1]],"check":"singleton width zero","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero width\", \"actual\": [[\"b\", 2]], \"expected\": [], \"passed\": false}, {\"check\": \"one width\", \"actual\": [[\"b\", 2]], \"expected\": [[\"b\", 2]], \"passed\": true}, {\"check\": \"wide beam\", \"actual\": [[\"b\", 2], [\"a\", 1]], \"expected\": [[\"b\", 2], [\"a\", 1]], \"passed\": true}, {\"check\": \"empty rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"tie order\", \"actual\": [[\"z\", 1]], \"expected\": [[\"a\", 1]], \"passed\": false}, {\"check\": \"singleton width zero\", \"actual\": [[\"x\", 1]], \"expected\": [], \"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."}}