FA-100746 / Model output stopping rules / Open access
Output stopping: Tied stop matches choose the longest sequence · case 01
Tied stop matches choose the longest sequence.
ROOT CAUSE
The first matching stop at a stream position is chosen before considering longer alternatives.
THE FAILURE
The first matching stop at a stream position is chosen before considering longer alternatives.
Unsuccessful approach: Choosing the earliest position fixes ordering, but a first-listed short marker still masks a longer marker there.
Case contract
Among stop sequences beginning at the earliest matching position, choose the longest; ties use the lowest input index. Return prefix and chosen sequence index, or all tokens and None.
Why this case matters
A deterministic output-control model isolates one finish or streaming boundary from any particular runtime.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tokens, stops):
for j,s in enumerate(stops):
for i in range(len(tokens)-len(s)+1):
if s and tokens[i:i+len(s)]==s:return tokens[:i],j
return tokens,None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('longer tie',solve(['p','e','n','d'],[['e'],['e','n']]),(['p'],1))
check('earlier position beats length',solve(['e','n','x'],[['e'],['n','x']]),([],0))
check('same length stable index',solve(['a','b'],[['a','b'],['a','b']]),([],0))
check('no match',solve(['x'],[['a']]),(['x'],None))
check('empty output',solve([], [[]]),([],None))
check('suffix match',solve(['x','a','b'],[['a'],['a','b']]),(['x'],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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| longer tie | [['p'], 0] | [['p'], 1] | Failed |
| earlier position beats length | [[], 0] | [[], 0] | Passed |
| same length stable index | [[], 0] | [[], 0] | Passed |
| no match | [['x'], None] | [['x'], None] | Passed |
| empty output | [[], None] | [[], None] | Passed |
| suffix match | [['x'], 0] | [['x'], 1] | Failed |
SHA-256 / acc5547819e7b56e0e5f997ffb305fac0906f72ba74cc9cbc1f2b005a7993421
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tokens, stops):
hits=[(i,j) for j,s in enumerate(stops) if s for i in range(len(tokens)-len(s)+1) if tokens[i:i+len(s)]==s]
if not hits:return tokens,None
i,j=min(hits)
return tokens[:i],j
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('longer tie',solve(['p','e','n','d'],[['e'],['e','n']]),(['p'],1))
check('earlier position beats length',solve(['e','n','x'],[['e'],['n','x']]),([],0))
check('same length stable index',solve(['a','b'],[['a','b'],['a','b']]),([],0))
check('no match',solve(['x'],[['a']]),(['x'],None))
check('empty output',solve([], [[]]),([],None))
check('suffix match',solve(['x','a','b'],[['a'],['a','b']]),(['x'],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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| longer tie | [['p'], 0] | [['p'], 1] | Failed |
| earlier position beats length | [[], 0] | [[], 0] | Passed |
| same length stable index | [[], 0] | [[], 0] | Passed |
| no match | [['x'], None] | [['x'], None] | Passed |
| empty output | [[], None] | [[], None] | Passed |
| suffix match | [['x'], 0] | [['x'], 1] | Failed |
SHA-256 / dbc0432c71b3da3de285947b85759364324520ce16649a1ceb65b30c02ba3bf4
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 toy contract covers the supplied token records only; it does not claim compatibility with a particular model runtime or tokenizer. 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:39.096656+00:00.
Case digest / 807ff6167fc8a61bf8679db0b414407d00a077a655597198b1840193e911c2a7