FAILURE MAP
← Case archive

FA-100771 / Model output stopping rules / Open access

Output stopping: A matched stop marker remains in returned output · case 01

A matched stop marker remains in returned output.

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

ROOT CAUSE

The matched stop sequence is returned as part of visible output.

THE FAILURE

The matched stop sequence is returned as part of visible output.

Unsuccessful approach: Removing only the final marker token leaves earlier tokens of a multi-token stop visible.

Case contract

Remove the complete first stop sequence from generated tokens. Return clean prefix and matched stop index, or unchanged 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 i in range(len(tokens)):
        for j,s in enumerate(stops):
            if s and tokens[i:i+len(s)]==s:return tokens[:i+len(s)],j
    return tokens,None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('single stop removed',solve([1,8,2],[[8]]),([1],0))
check('multi token stop removed',solve([1,8,9,2],[[8,9]]),([1],0))
check('no match unchanged',solve([1,2],[[8]]),([1,2],None))
check('stop at start',solve([8,2],[[8]]),([],0))
check('empty sequence ignored',solve([1],[[]]),([1],None))
check('stop at tail',solve([1,8],[[8]]),([1],0))
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
single stop removed[[1, 8], 0][[1], 0]Failed
multi token stop removed[[1, 8, 9], 0][[1], 0]Failed
no match unchanged[[1, 2], None][[1, 2], None]Passed
stop at start[[8], 0][[], 0]Failed
empty sequence ignored[[1], None][[1], None]Passed
stop at tail[[1, 8], 0][[1], 0]Failed

SHA-256 / 43a15e7e61e33df1f93364dfb7bca8185992205ec21042eca3ad5119686ec9ac

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,s) 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,s=min(hits)
    return tokens[:i+len(s)-1],j
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('single stop removed',solve([1,8,2],[[8]]),([1],0))
check('multi token stop removed',solve([1,8,9,2],[[8,9]]),([1],0))
check('no match unchanged',solve([1,2],[[8]]),([1,2],None))
check('stop at start',solve([8,2],[[8]]),([],0))
check('empty sequence ignored',solve([1],[[]]),([1],None))
check('stop at tail',solve([1,8],[[8]]),([1],0))
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
single stop removed[[1], 0][[1], 0]Passed
multi token stop removed[[1, 8], 0][[1], 0]Failed
no match unchanged[[1, 2], None][[1, 2], None]Passed
stop at start[[], 0][[], 0]Passed
empty sequence ignored[[1], None][[1], None]Passed
stop at tail[[1], 0][[1], 0]Passed

SHA-256 / cbb0bfa5185f0662713d30c3b2613fee81e79e0662cf49ad0ee2ea3c71b79f77

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

Case digest / 80131ee2a13a1aac9565eabec53492a2f8e00682fcd321ad88df53234d5a6ddc