{"abstract":"A matched stop marker remains in returned output.","category":"Model output stopping rules","checks":6,"contract":"Remove the complete first stop sequence from generated tokens. Return clean prefix and matched stop index, or unchanged tokens and None.","contract_signature":"tokens, stops","evaluation_group":"w3-output-stop-exclusion","failed_approach":"Removing only the final marker token leaves earlier tokens of a multi-token stop visible.","family":"w3-model-output-stopping-rules-stop-inclusion","id":"FA-100771","implementations":{"attempt":{"sha256":"cbb0bfa5185f0662713d30c3b2613fee81e79e0662cf49ad0ee2ea3c71b79f77","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tokens, stops):\n    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]\n    if not hits:return tokens,None\n    i,j,s=min(hits)\n    return tokens[:i+len(s)-1],j\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('single stop removed',solve([1,8,2],[[8]]),([1],0))\ncheck('multi token stop removed',solve([1,8,9,2],[[8,9]]),([1],0))\ncheck('no match unchanged',solve([1,2],[[8]]),([1,2],None))\ncheck('stop at start',solve([8,2],[[8]]),([],0))\ncheck('empty sequence ignored',solve([1],[[]]),([1],None))\ncheck('stop at tail',solve([1,8],[[8]]),([1],0))\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":"43a15e7e61e33df1f93364dfb7bca8185992205ec21042eca3ad5119686ec9ac","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tokens, stops):\n    for i in range(len(tokens)):\n        for j,s in enumerate(stops):\n            if s and tokens[i:i+len(s)]==s:return tokens[:i+len(s)],j\n    return tokens,None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('single stop removed',solve([1,8,2],[[8]]),([1],0))\ncheck('multi token stop removed',solve([1,8,9,2],[[8,9]]),([1],0))\ncheck('no match unchanged',solve([1,2],[[8]]),([1,2],None))\ncheck('stop at start',solve([8,2],[[8]]),([],0))\ncheck('empty sequence ignored',solve([1],[[]]),([1],None))\ncheck('stop at tail',solve([1,8],[[8]]),([1],0))\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-stop-inclusion","generated_at":"2026-09-30T16:48:39.593740+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 matched stop sequence is returned as part of visible output.","sha256":"80131ee2a13a1aac9565eabec53492a2f8e00682fcd321ad88df53234d5a6ddc","title":"Output stopping: A matched stop marker remains in returned output · 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":29.019,"exit_code":1,"observations":[{"actual":[[1],0],"check":"single stop removed","expected":[[1],0],"passed":true},{"actual":[[1,8],0],"check":"multi token stop removed","expected":[[1],0],"passed":false},{"actual":[[1,2],null],"check":"no match unchanged","expected":[[1,2],null],"passed":true},{"actual":[[],0],"check":"stop at start","expected":[[],0],"passed":true},{"actual":[[1],null],"check":"empty sequence ignored","expected":[[1],null],"passed":true},{"actual":[[1],0],"check":"stop at tail","expected":[[1],0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single stop removed\", \"actual\": [[1], 0], \"expected\": [[1], 0], \"passed\": true}, {\"check\": \"multi token stop removed\", \"actual\": [[1, 8], 0], \"expected\": [[1], 0], \"passed\": false}, {\"check\": \"no match unchanged\", \"actual\": [[1, 2], null], \"expected\": [[1, 2], null], \"passed\": true}, {\"check\": \"stop at start\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"empty sequence ignored\", \"actual\": [[1], null], \"expected\": [[1], null], \"passed\": true}, {\"check\": \"stop at tail\", \"actual\": [[1], 0], \"expected\": [[1], 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":33.627,"exit_code":1,"observations":[{"actual":[[1,8],0],"check":"single stop removed","expected":[[1],0],"passed":false},{"actual":[[1,8,9],0],"check":"multi token stop removed","expected":[[1],0],"passed":false},{"actual":[[1,2],null],"check":"no match unchanged","expected":[[1,2],null],"passed":true},{"actual":[[8],0],"check":"stop at start","expected":[[],0],"passed":false},{"actual":[[1],null],"check":"empty sequence ignored","expected":[[1],null],"passed":true},{"actual":[[1,8],0],"check":"stop at tail","expected":[[1],0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single stop removed\", \"actual\": [[1, 8], 0], \"expected\": [[1], 0], \"passed\": false}, {\"check\": \"multi token stop removed\", \"actual\": [[1, 8, 9], 0], \"expected\": [[1], 0], \"passed\": false}, {\"check\": \"no match unchanged\", \"actual\": [[1, 2], null], \"expected\": [[1, 2], null], \"passed\": true}, {\"check\": \"stop at start\", \"actual\": [[8], 0], \"expected\": [[], 0], \"passed\": false}, {\"check\": \"empty sequence ignored\", \"actual\": [[1], null], \"expected\": [[1], null], \"passed\": true}, {\"check\": \"stop at tail\", \"actual\": [[1, 8], 0], \"expected\": [[1], 0], \"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."}}