FA-98501 / Beam search bookkeeping / Open access
Beam search: completed pool is capped by discovery order · case 01
completed pool is capped by discovery order.
ROOT CAUSE
Finished hypotheses are truncated before they are ranked by final score.
THE FAILURE
Finished hypotheses are truncated before they are ranked by final score.
Unsuccessful approach: Sorting ascending retains the weakest completions first.
Case contract
Rows [id,score]; keep up to capacity highest scores, lexical ID for ties.
Why this case matters
Beam decoders rely on consistent hypothesis state while expanding and ranking candidates.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, capacity):
return rows[:capacity]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
rows=[['early',N],['best',N+3],['mid',N+1]]
check('capacity winner',solve(rows,1),[['best',N+3]])
check('top two',solve(rows,2),[['best',N+3],['mid',N+1]])
check('zero capacity',solve(rows,0),[])
check('empty pool',solve([],N),[])
check('tie lexical',solve([['z',N],['a',N]],1),[['a',N]])
check('all retained sorted',solve(rows,5),[['best',N+3],['mid',N+1],['early',N]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| capacity winner | [['early', 1]] | [['best', 4]] | Failed |
| top two | [['early', 1], ['best', 4]] | [['best', 4], ['mid', 2]] | Failed |
| zero capacity | [] | [] | Passed |
| empty pool | [] | [] | Passed |
| tie lexical | [['z', 1]] | [['a', 1]] | Failed |
| all retained sorted | [['early', 1], ['best', 4], ['mid', 2]] | [['best', 4], ['mid', 2], ['early', 1]] | Failed |
SHA-256 / 6193e35316321e9f3ff237966a69cbb9fbda046b4d502980e8ca159d5127060c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, capacity):
return sorted(rows,key=lambda r:(r[1],r[0]))[:capacity]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
rows=[['early',N],['best',N+3],['mid',N+1]]
check('capacity winner',solve(rows,1),[['best',N+3]])
check('top two',solve(rows,2),[['best',N+3],['mid',N+1]])
check('zero capacity',solve(rows,0),[])
check('empty pool',solve([],N),[])
check('tie lexical',solve([['z',N],['a',N]],1),[['a',N]])
check('all retained sorted',solve(rows,5),[['best',N+3],['mid',N+1],['early',N]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| capacity winner | [['early', 1]] | [['best', 4]] | Failed |
| top two | [['early', 1], ['mid', 2]] | [['best', 4], ['mid', 2]] | Failed |
| zero capacity | [] | [] | Passed |
| empty pool | [] | [] | Passed |
| tie lexical | [['a', 1]] | [['a', 1]] | Passed |
| all retained sorted | [['early', 1], ['mid', 2], ['best', 4]] | [['best', 4], ['mid', 2], ['early', 1]] | Failed |
SHA-256 / 7dff26ce3367b35a887a16e30dfdfe901950588d9392f74f99afc7cc0431e057
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-30T16:48:13.669345+00:00.
Case digest / 3e58ec7a8a97918927ffb7f2ea4f6ad25b1ca211e4475a9b3adb5041c40a9f39