FAILURE MAP
← Case archive

FA-100836 / Model output stopping rules / Open access

Output stopping: Streaming suffix retains only one character of a longer possible stop prefix · case 01

Streaming suffix retains only one character of a longer possible stop prefix.

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

ROOT CAUSE

Only a one-character suffix is considered, losing longer partial marker prefixes across stream calls.

THE FAILURE

Only a one-character suffix is considered, losing longer partial marker prefixes across stream calls.

Unsuccessful approach: Allowing a full stop string into the holdback range retains completed markers indefinitely.

Case contract

Return (emittable, holdback), withholding the longest suffix of text that equals a proper prefix of any stop string.

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):
    hold=1 if text and any(text.endswith(s[:1]) for s in stops if s) else 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('long partial held',solve('say<st',['<stop>']),('say','<st'))
check('full stop held by proper-prefix rule',solve('<stop>', ['<stop>']),('<stop>',''))
check('unrelated suffix',solve('hello',['<stop>']),('hello',''))
check('two candidate lengths',solve('abab',['ababc','abc']),('','abab'))
check('empty input',solve('', ['abc']),('',''))
check('one-char prefix',solve('x',['xyz']),('','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 fixtureActualExpectedOutcome
long partial held['say<st', '']['say', '<st']Failed
full stop held by proper-prefix rule['<stop>', '']['<stop>', '']Passed
unrelated suffix['hello', '']['hello', '']Passed
two candidate lengths['abab', '']['', 'abab']Failed
empty input['', '']['', '']Passed
one-char prefix['', 'x']['', 'x']Passed

SHA-256 / 206b2c538ffb36fd07f574efe28d3250db026052cc2d9b4e43e08c097126804b

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((k for s in stops for k in range(1,min(len(s),len(text))+1) if text.endswith(s[:k])),default=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('long partial held',solve('say<st',['<stop>']),('say','<st'))
check('full stop held by proper-prefix rule',solve('<stop>', ['<stop>']),('<stop>',''))
check('unrelated suffix',solve('hello',['<stop>']),('hello',''))
check('two candidate lengths',solve('abab',['ababc','abc']),('','abab'))
check('empty input',solve('', ['abc']),('',''))
check('one-char prefix',solve('x',['xyz']),('','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 fixtureActualExpectedOutcome
long partial held['say', '<st']['say', '<st']Passed
full stop held by proper-prefix rule['', '<stop>']['<stop>', '']Failed
unrelated suffix['hello', '']['hello', '']Passed
two candidate lengths['', 'abab']['', 'abab']Passed
empty input['', '']['', '']Passed
one-char prefix['', 'x']['', 'x']Passed

SHA-256 / 7a847126f8a4b78094573b5ef0f1ec0f64ac43161daf18e3a602c9102c08b4df

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

Case digest / e49db435b555b25428e433f39c0398d3cd4090dc77da4d19f491fb540762ba51