FAILURE MAP
← Case archive

FA-100801 / Model output stopping rules / Open access

Output stopping: A stop token in the prompt prematurely ends generated output · case 01

A stop token in the prompt prematurely ends generated output.

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

ROOT CAUSE

Prompt and generated IDs share one scan, allowing prompt content to terminate new output.

THE FAILURE

Prompt and generated IDs share one scan, allowing prompt content to terminate new output.

Unsuccessful approach: Skipping position zero misses a stop as the first generated token.

Case contract

Inspect only generated IDs for stop membership; prompt IDs never terminate generated output. Return the generated prefix before the first stop and a bool.

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(prompt, generated, stop_ids):
    combined=prompt+generated
    for i,t in enumerate(combined):
        if t in stop_ids:return combined[:i],True
    return generated,False
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('prompt stop ignored',solve([8],[1,2],[8]),([1,2],False))
check('generated first stop',solve([8],[8,1],[8]),([],True))
check('generated later stop',solve([2],[1,8,3],[8]),([1],True))
check('no generated stop',solve([8],[1,2],[9]),([1,2],False))
check('empty generation',solve([8],[],[8]),([],False))
check('zero stop valid',solve([], [0,2],[0]),([],True))
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
prompt stop ignored[[], True][[1, 2], False]Failed
generated first stop[[], True][[], True]Passed
generated later stop[[2, 1], True][[1], True]Failed
no generated stop[[1, 2], False][[1, 2], False]Passed
empty generation[[], True][[], False]Failed
zero stop valid[[], True][[], True]Passed

SHA-256 / 4bf6cb6de8923d499be7f46c200b60e07f94fc61e00f276ad3f99f95397b6aff

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(prompt, generated, stop_ids):
    for i,t in enumerate(generated):
        if t in stop_ids and i>0:return generated[:i],True
    return generated,False
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('prompt stop ignored',solve([8],[1,2],[8]),([1,2],False))
check('generated first stop',solve([8],[8,1],[8]),([],True))
check('generated later stop',solve([2],[1,8,3],[8]),([1],True))
check('no generated stop',solve([8],[1,2],[9]),([1,2],False))
check('empty generation',solve([8],[],[8]),([],False))
check('zero stop valid',solve([], [0,2],[0]),([],True))
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
prompt stop ignored[[1, 2], False][[1, 2], False]Passed
generated first stop[[8, 1], False][[], True]Failed
generated later stop[[1], True][[1], True]Passed
no generated stop[[1, 2], False][[1, 2], False]Passed
empty generation[[], False][[], False]Passed
zero stop valid[[0, 2], False][[], True]Failed

SHA-256 / 2272b122afe62e1567a88051b1827e6d8a6204da2a3282df57453f496d7d5709

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

Case digest / dcd82e8d6bd13a9fbe0d85c91f9d210805ba23f9ce0736225c0037971376853d