FAILURE MAP
← Case archive

FA-98461 / Beam search bookkeeping / Open access

Beam search: end marker is expanded as an ordinary live token · case 01

end marker is expanded as an ordinary live token.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

A completed hypothesis remains in the active set and receives further tokens.

THE FAILURE

A completed hypothesis remains in the active set and receives further tokens.

Unsuccessful approach: Dropping every end-marker child loses valid completed hypotheses.

Case contract

Children are [parent,token,score]; tokens equal eos complete a path. Return (live,finished) lists preserving child rows.

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(children, eos):
    return (list(children),[])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
c=[[0,'x',N],[0,'END',N+1],[1,'y',N-1]]
check('live and done',solve(c,'END'),([c[0],c[2]],[c[1]]))
check('all terminal',solve([[0,'END',N]],'END'),([] ,[[0,'END',N]]))
check('no terminal',solve([[0,'x',N]],'END'),([[0,'x',N]],[]))
check('empty children',solve([],'END'),([],[]))
check('multiple completions',solve([[0,'END',1],[1,'END',2]],'END'),([] ,[[0,'END',1],[1,'END',2]]))
check('token N remains live',solve([[0,N,N+1]],'END'),([[0,N,N+1]],[]))
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 fixtureActualExpectedOutcome
live and done[[[0, 'x', 1], [0, 'END', 2], [1, 'y', 0]], []][[[0, 'x', 1], [1, 'y', 0]], [[0, 'END', 2]]]Failed
all terminal[[[0, 'END', 1]], []][[], [[0, 'END', 1]]]Failed
no terminal[[[0, 'x', 1]], []][[[0, 'x', 1]], []]Passed
empty children[[], []][[], []]Passed
multiple completions[[[0, 'END', 1], [1, 'END', 2]], []][[], [[0, 'END', 1], [1, 'END', 2]]]Failed
token N remains live[[[0, 1, 2]], []][[[0, 1, 2]], []]Passed

SHA-256 / c93bcf383baf121193379bcecd9dedd11dac8cfce7464ec9c02ef6e81347a347

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(children, eos):
    return ([r for r in children if r[1]!=eos],[])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
c=[[0,'x',N],[0,'END',N+1],[1,'y',N-1]]
check('live and done',solve(c,'END'),([c[0],c[2]],[c[1]]))
check('all terminal',solve([[0,'END',N]],'END'),([] ,[[0,'END',N]]))
check('no terminal',solve([[0,'x',N]],'END'),([[0,'x',N]],[]))
check('empty children',solve([],'END'),([],[]))
check('multiple completions',solve([[0,'END',1],[1,'END',2]],'END'),([] ,[[0,'END',1],[1,'END',2]]))
check('token N remains live',solve([[0,N,N+1]],'END'),([[0,N,N+1]],[]))
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 fixtureActualExpectedOutcome
live and done[[[0, 'x', 1], [1, 'y', 0]], []][[[0, 'x', 1], [1, 'y', 0]], [[0, 'END', 2]]]Failed
all terminal[[], []][[], [[0, 'END', 1]]]Failed
no terminal[[[0, 'x', 1]], []][[[0, 'x', 1]], []]Passed
empty children[[], []][[], []]Passed
multiple completions[[], []][[], [[0, 'END', 1], [1, 'END', 2]]]Failed
token N remains live[[[0, 1, 2]], []][[[0, 1, 2]], []]Passed

SHA-256 / b73bb1e011eb5408e367d60a81c87b1837a84d677006d4742faa69b3a898ca74

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.239438+00:00.

Case digest / 0541b821294a850f7af99b0e1104df6933e767a9c4b371d2fff54395b21ee0f1