FA-100761 / Model output stopping rules / Open access
Output stopping: Prompt length is omitted from a total context cap · case 01
Prompt length is omitted from a total context cap.
ROOT CAUSE
The cap is applied to generated tokens without subtracting the prompt length.
THE FAILURE
The cap is applied to generated tokens without subtracting the prompt length.
Unsuccessful approach: Subtracting one extra slot truncates output even when it exactly fits the remaining room.
Case contract
Retain generated tokens so prompt plus retained output is at most total_limit. Return retained tokens and whether truncation occurred.
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, prompt_len, total_limit):
room=max(0,total_limit)
kept=tokens[:room]
return kept,len(kept)<len(tokens)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('prompt consumes room',solve(list(range(N+2)),N, N+2),([0,1],True))
check('exact fit',solve([1,2],N, N+2),([1,2],False))
check('prompt fills limit',solve([1],N,N),([],True))
check('empty suffix',solve([],N,N+1),([],False))
check('zero total',solve([1],N,0),([],True))
check('one slot',solve([8,9],N,N+1),([8],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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| prompt consumes room | [[0, 1, 2], False] | [[0, 1], True] | Failed |
| exact fit | [[1, 2], False] | [[1, 2], False] | Passed |
| prompt fills limit | [[1], False] | [[], True] | Failed |
| empty suffix | [[], False] | [[], False] | Passed |
| zero total | [[], True] | [[], True] | Passed |
| one slot | [[8, 9], False] | [[8], True] | Failed |
SHA-256 / 66a7768eeac4d4473240bcc49c7a6471e013cc0cca4e25e4f025e3f3838a87a9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tokens, prompt_len, total_limit):
room=max(0,total_limit-prompt_len-1)
kept=tokens[:room]
return kept,len(kept)<len(tokens)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('prompt consumes room',solve(list(range(N+2)),N, N+2),([0,1],True))
check('exact fit',solve([1,2],N, N+2),([1,2],False))
check('prompt fills limit',solve([1],N,N),([],True))
check('empty suffix',solve([],N,N+1),([],False))
check('zero total',solve([1],N,0),([],True))
check('one slot',solve([8,9],N,N+1),([8],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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| prompt consumes room | [[0], True] | [[0, 1], True] | Failed |
| exact fit | [[1], True] | [[1, 2], False] | Failed |
| prompt fills limit | [[], True] | [[], True] | Passed |
| empty suffix | [[], False] | [[], False] | Passed |
| zero total | [[], True] | [[], True] | Passed |
| one slot | [[], True] | [[8], True] | Failed |
SHA-256 / fc3a7da61e95f0f8f15addae41c88db322eb8640688f12f2a0f831e2eeac469e
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.562738+00:00.
Case digest / 9816505d546328507e8c8903f3d3166dc59918a8a859b1d102030445bd5b43cf