FAILURE MAP
← Case archive

FA-100791 / Model output stopping rules / Open access

Output stopping: Normal stream completion drops the held partial marker · case 01

Normal stream completion drops the held partial marker.

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

ROOT CAUSE

Normal completion drops the last buffered character instead of flushing all remaining text.

THE FAILURE

Normal completion drops the last buffered character instead of flushing all remaining text.

Unsuccessful approach: Normal flushing works, but stopped streams return a scalar instead of the required pair.

Case contract

At normal end of stream, return all buffered text as visible and empty buffer; if an actual stop has completed, omit marker and discard remainder.

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, stop, stopped):
    if stopped:
        i=text.find(stop)
        return text[:i] if i>=0 else text
    return text[:-1] if text else ''
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal final flush',solve('answer<st','<stop>',False),('answer<st',''))
check('complete stop',solve('answer<stop>x','<stop>',True),('answer',''))
check('stopped without marker',solve('safe','<stop>',True),('safe',''))
check('empty normal',solve('','<stop>',False),('',''))
check('marker at start',solve('<stop>x','<stop>',True),('',''))
check('partial shorter than marker',solve('ab','long',False),('ab',''))
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
normal final flushanswer<s['answer<st', '']Failed
complete stopanswer['answer', '']Failed
stopped without markersafe['safe', '']Failed
empty normal['', '']Failed
marker at start['', '']Failed
partial shorter than markera['ab', '']Failed

SHA-256 / 9c66b09f1942540b87e8811de972ce0636d9628e74c2b6838236764f1786699f

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(text, stop, stopped):
    if stopped:
        i=text.find(stop)
        return text[:i] if i>=0 else text
    return text[:-1] if text else '', ''
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal final flush',solve('answer<st','<stop>',False),('answer<st',''))
check('complete stop',solve('answer<stop>x','<stop>',True),('answer',''))
check('stopped without marker',solve('safe','<stop>',True),('safe',''))
check('empty normal',solve('','<stop>',False),('',''))
check('marker at start',solve('<stop>x','<stop>',True),('',''))
check('partial shorter than marker',solve('ab','long',False),('ab',''))
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
normal final flush['answer<s', '']['answer<st', '']Failed
complete stopanswer['answer', '']Failed
stopped without markersafe['safe', '']Failed
empty normal['', '']['', '']Passed
marker at start['', '']Failed
partial shorter than marker['a', '']['ab', '']Failed

SHA-256 / a73d6226cf7fb32e2190feedbd63f0f934a297b1626ff1e80b19dbfdb13706f2

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

Case digest / bd3071170ada8c230ce2600d6110334146c7cee994a251dc36bfaca5b545a11d