FA-100786 / Model output stopping rules / Open access
Output stopping: Streaming buffer emits partial stop prefixes too early · case 01
Streaming buffer emits partial stop prefixes too early.
ROOT CAUSE
The stream emits every character immediately, including suffixes that may complete a stop marker.
THE FAILURE
The stream emits every character immediately, including suffixes that may complete a stop marker.
Unsuccessful approach: Holding a fixed maximum marker length delays unrelated text and does not track the actual suffix.
Case contract
For a stream suffix and stop strings, emit the longest prefix that cannot be part of any stop string prefix; retain the remaining suffix. Empty stop list emits everything.
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(text, stops):
return text,
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('partial marker held',solve('hello<st',['<stop>']),('hello','<st'))
check('no prefix emits all',solve('hello',['<stop>']),('hello',''))
check('longest suffix prefix',solve('ababa',['ababx','baq']),('ab','aba'))
check('empty stop list',solve('abc',[]),('abc',''))
check('whole marker prefix',solve('<stop>', ['<stop>']),('<stop>',''))
check('short input',solve('x',['long']),('x',''))
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 |
|---|---|---|---|
| partial marker held | ['hello<st'] | ['hello', '<st'] | Failed |
| no prefix emits all | ['hello'] | ['hello', ''] | Failed |
| longest suffix prefix | ['ababa'] | ['ab', 'aba'] | Failed |
| empty stop list | ['abc'] | ['abc', ''] | Failed |
| whole marker prefix | ['<stop>'] | ['<stop>', ''] | Failed |
| short input | ['x'] | ['x', ''] | Failed |
SHA-256 / 7157eb757889bfe15c1e7826fa6bf24a528165dc3249d3de8cafa35bd781306d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(text, stops):
hold=max([len(s)-1 for s in stops if s] or [0])
return text[:-hold] if hold else text, text[-hold:] if hold else ''
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('partial marker held',solve('hello<st',['<stop>']),('hello','<st'))
check('no prefix emits all',solve('hello',['<stop>']),('hello',''))
check('longest suffix prefix',solve('ababa',['ababx','baq']),('ab','aba'))
check('empty stop list',solve('abc',[]),('abc',''))
check('whole marker prefix',solve('<stop>', ['<stop>']),('<stop>',''))
check('short input',solve('x',['long']),('x',''))
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 |
|---|---|---|---|
| partial marker held | ['hel', 'lo<st'] | ['hello', '<st'] | Failed |
| no prefix emits all | ['', 'hello'] | ['hello', ''] | Failed |
| longest suffix prefix | ['a', 'baba'] | ['ab', 'aba'] | Failed |
| empty stop list | ['abc', ''] | ['abc', ''] | Passed |
| whole marker prefix | ['<', 'stop>'] | ['<stop>', ''] | Failed |
| short input | ['', 'x'] | ['x', ''] | Failed |
SHA-256 / 697f899a2ccc1407116f8d9bf058da8ebc507a7e799c3a5afe6ed0aae635f6e2
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.593640+00:00.
Case digest / 0c4dd58d90a146a4426a3c60d4d0524cb92039faeb5c96bd75da62ed0dee6662