{"abstract":"Repeated stop matches return the final occurrence.","category":"Model output stopping rules","checks":6,"contract":"For one stop token, truncate at its first occurrence and report that index; absence returns None.","contract_signature":"tokens, stop_id","evaluation_group":"w3-output-first-stop","failed_approach":"Selecting the first position but returning through it leaves the stopping ID visible.","family":"w3-model-output-stopping-rules-repeated-stop-first","id":"FA-100826","implementations":{"attempt":{"sha256":"c41919ce4a9b6d1c5857e90d507fd29c710c0250e72b74dca2c69c1b7de6a287","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tokens, stop_id):\n    i=tokens.index(stop_id) if stop_id in tokens else None\n    return (tokens[:i+1],i) if i is not None else (tokens,None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('repeated stop',solve([1,8,2,8,3],8),([1],1))\ncheck('first token',solve([8,1],8),([],0))\ncheck('last token',solve([1,8],8),([1],1))\ncheck('absent',solve([1,2],8),([1,2],None))\ncheck('empty',solve([],8),([],None))\ncheck('zero stop',solve([0,1,0],0),([],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":"b4bd1dc846d224351ca4d2022b8be9ac9136962dac0cc144060064cbd8474a21","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tokens, stop_id):\n    i=len(tokens)-1-tokens[::-1].index(stop_id) if stop_id in tokens else None\n    return (tokens[:i],i) if i is not None else (tokens,None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('repeated stop',solve([1,8,2,8,3],8),([1],1))\ncheck('first token',solve([8,1],8),([],0))\ncheck('last token',solve([1,8],8),([1],1))\ncheck('absent',solve([1,2],8),([1,2],None))\ncheck('empty',solve([],8),([],None))\ncheck('zero stop',solve([0,1,0],0),([],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-repeated-stop-first","generated_at":"2026-09-30T16:48:40.055365+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":"Reverse scanning selects the last occurrence of a repeated stop ID.","sha256":"56350b5eb96a54e88b17f51504d8a95fd3d4755ba56d0bf5b0bcee4ee42f246a","title":"Output stopping: Repeated stop matches return the final occurrence · 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":26.808,"exit_code":1,"observations":[{"actual":[[1,8],1],"check":"repeated stop","expected":[[1],1],"passed":false},{"actual":[[8],0],"check":"first token","expected":[[],0],"passed":false},{"actual":[[1,8],1],"check":"last token","expected":[[1],1],"passed":false},{"actual":[[1,2],null],"check":"absent","expected":[[1,2],null],"passed":true},{"actual":[[],null],"check":"empty","expected":[[],null],"passed":true},{"actual":[[0],0],"check":"zero stop","expected":[[],0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated stop\", \"actual\": [[1, 8], 1], \"expected\": [[1], 1], \"passed\": false}, {\"check\": \"first token\", \"actual\": [[8], 0], \"expected\": [[], 0], \"passed\": false}, {\"check\": \"last token\", \"actual\": [[1, 8], 1], \"expected\": [[1], 1], \"passed\": false}, {\"check\": \"absent\", \"actual\": [[1, 2], null], \"expected\": [[1, 2], null], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[], null], \"expected\": [[], null], \"passed\": true}, {\"check\": \"zero stop\", \"actual\": [[0], 0], \"expected\": [[], 0], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.648,"exit_code":1,"observations":[{"actual":[[1,8,2],3],"check":"repeated stop","expected":[[1],1],"passed":false},{"actual":[[],0],"check":"first token","expected":[[],0],"passed":true},{"actual":[[1],1],"check":"last token","expected":[[1],1],"passed":true},{"actual":[[1,2],null],"check":"absent","expected":[[1,2],null],"passed":true},{"actual":[[],null],"check":"empty","expected":[[],null],"passed":true},{"actual":[[0,1],2],"check":"zero stop","expected":[[],0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated stop\", \"actual\": [[1, 8, 2], 3], \"expected\": [[1], 1], \"passed\": false}, {\"check\": \"first token\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"last token\", \"actual\": [[1], 1], \"expected\": [[1], 1], \"passed\": true}, {\"check\": \"absent\", \"actual\": [[1, 2], null], \"expected\": [[1, 2], null], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[], null], \"expected\": [[], null], \"passed\": true}, {\"check\": \"zero stop\", \"actual\": [[0, 1], 2], \"expected\": [[], 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."}}