{"abstract":"An ordinary end marker is reported as a length finish.","category":"Model output stopping rules","checks":6,"contract":"Given token stream and end marker, report eos if marker appears, length if token count reaches cap, otherwise null; eos has precedence.","contract_signature":"tokens, end_id, cap","evaluation_group":"w3-output-reason-map","failed_approach":"Renaming the EOS reason does not use the required canonical reason.","family":"w3-model-output-stopping-rules-finish-reason-map","id":"FA-100816","implementations":{"attempt":{"sha256":"94dbaa4c6fad97285b915b9faaf1621b1612bed3be656b7ac3ef10b46a1f9d91","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tokens, end_id, cap):\n    if end_id in tokens:return 'end'\n    if len(tokens)>=cap:return 'length'\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('eos before cap',solve([1,9],9,4),'eos')\ncheck('eos at cap',solve([1,9],9,2),'eos')\ncheck('cap reached',solve([1,2],9,2),'length')\ncheck('under cap',solve([1],9,3),None)\ncheck('empty zero cap',solve([],9,0),'length')\ncheck('end zero',solve([0],0,1),'eos')\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"8fdebcce7c61d935e8ee38a90be58199839255226132c8189f74e1630ebc0af3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tokens, end_id, cap):\n    if len(tokens)>=cap:return 'length'\n    if end_id in tokens:return 'eos'\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('eos before cap',solve([1,9],9,4),'eos')\ncheck('eos at cap',solve([1,9],9,2),'eos')\ncheck('cap reached',solve([1,2],9,2),'length')\ncheck('under cap',solve([1],9,3),None)\ncheck('empty zero cap',solve([],9,0),'length')\ncheck('end zero',solve([0],0,1),'eos')\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w3-model-output-stopping-rules-finish-reason-map","generated_at":"2026-09-30T16:48:40.054596+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic output-control model isolates one finish or streaming boundary from any particular runtime.","root_cause":"The end marker is checked after the length cap, allowing a boundary EOS to be mislabeled as length.","sha256":"0fb4c41ebb4938be56dd88bd916f1c0a9c677b2b536e94cf358cbb68fe3e1e93","title":"Output stopping: An ordinary end marker is reported as a length finish · case 01","variant":1,"variant_policy":"The same explicitly authored fixtures repeat across all five numbered records; runtime N is unused. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":27.109,"exit_code":1,"observations":[{"actual":"end","check":"eos before cap","expected":"eos","passed":false},{"actual":"end","check":"eos at cap","expected":"eos","passed":false},{"actual":"length","check":"cap reached","expected":"length","passed":true},{"actual":null,"check":"under cap","expected":null,"passed":true},{"actual":"length","check":"empty zero cap","expected":"length","passed":true},{"actual":"end","check":"end zero","expected":"eos","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"eos before cap\", \"actual\": \"end\", \"expected\": \"eos\", \"passed\": false}, {\"check\": \"eos at cap\", \"actual\": \"end\", \"expected\": \"eos\", \"passed\": false}, {\"check\": \"cap reached\", \"actual\": \"length\", \"expected\": \"length\", \"passed\": true}, {\"check\": \"under cap\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty zero cap\", \"actual\": \"length\", \"expected\": \"length\", \"passed\": true}, {\"check\": \"end zero\", \"actual\": \"end\", \"expected\": \"eos\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.388,"exit_code":1,"observations":[{"actual":"eos","check":"eos before cap","expected":"eos","passed":true},{"actual":"length","check":"eos at cap","expected":"eos","passed":false},{"actual":"length","check":"cap reached","expected":"length","passed":true},{"actual":null,"check":"under cap","expected":null,"passed":true},{"actual":"length","check":"empty zero cap","expected":"length","passed":true},{"actual":"length","check":"end zero","expected":"eos","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"eos before cap\", \"actual\": \"eos\", \"expected\": \"eos\", \"passed\": true}, {\"check\": \"eos at cap\", \"actual\": \"length\", \"expected\": \"eos\", \"passed\": false}, {\"check\": \"cap reached\", \"actual\": \"length\", \"expected\": \"length\", \"passed\": true}, {\"check\": \"under cap\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty zero cap\", \"actual\": \"length\", \"expected\": \"length\", \"passed\": true}, {\"check\": \"end zero\", \"actual\": \"length\", \"expected\": \"eos\", \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}