{"abstract":"One sample’s finish state changes a neighboring sample.","category":"Model output stopping rules","checks":6,"contract":"Each sample has own token list and stop IDs. Return per-sample truncated outputs and finish reasons, processing every sample independently.","contract_signature":"token_batches, stop_ids","evaluation_group":"w3-output-batch-isolation","failed_approach":"A shared loop flag still changes the finish state of later samples.","family":"w3-model-output-stopping-rules-sample-finish-isolation","id":"FA-100811","implementations":{"attempt":{"sha256":"c8e3b87a9fbacb93d320ae93ee72fa63051c222c8c516bcab016417c0584e606","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(token_batches, stop_ids):\n    out=[]\n    finished=False\n    for row in token_batches:\n        if finished: out.append(([], 'stop'))\n        elif any(t in stop_ids for t in row):\n            out.append((row[:next(i for i,t in enumerate(row) if t in stop_ids)],'stop')); finished=True\n        else: out.append((row,'length'))\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('separate finish',solve([[1,8,2],[3,4]], [8]),[([1],'stop'),([3,4],'length')])\ncheck('both stop',solve([[8],[2,8]], [8]),[([],'stop'),([2],'stop')])\ncheck('no batches',solve([], [8]),[])\ncheck('empty row',solve([[]], [8]),[([],'length')])\ncheck('later sample stop',solve([[1],[8,2]], [8]),[([1],'length'),([],'stop')])\ncheck('zero marker',solve([[0,1]], [0]),[([],'stop')])\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":"3c8ca6186d074a02846567a5bc47e89c1f831dbac67af2475eeeaa1b371b01b4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(token_batches, stop_ids):\n    out=[]\n    any_stop=any(t in stop_ids for row in token_batches for t in row)\n    for row in token_batches:\n        if any_stop: out.append(([], 'stop'))\n        else: out.append((row, 'length'))\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('separate finish',solve([[1,8,2],[3,4]], [8]),[([1],'stop'),([3,4],'length')])\ncheck('both stop',solve([[8],[2,8]], [8]),[([],'stop'),([2],'stop')])\ncheck('no batches',solve([], [8]),[])\ncheck('empty row',solve([[]], [8]),[([],'length')])\ncheck('later sample stop',solve([[1],[8,2]], [8]),[([1],'length'),([],'stop')])\ncheck('zero marker',solve([[0,1]], [0]),[([],'stop')])\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-sample-finish-isolation","generated_at":"2026-09-30T16:48:40.054266+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":"Completion state is shared across samples, so one sample can mark every sample finished.","sha256":"5683cb5d757da80540bc90abcf8e8639d2022ea4bc96b0b5f8920e903857eb77","title":"Output stopping: One sample’s finish state changes a neighboring sample · 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.021,"exit_code":1,"observations":[{"actual":[[[1],"stop"],[[],"stop"]],"check":"separate finish","expected":[[[1],"stop"],[[3,4],"length"]],"passed":false},{"actual":[[[],"stop"],[[],"stop"]],"check":"both stop","expected":[[[],"stop"],[[2],"stop"]],"passed":false},{"actual":[],"check":"no batches","expected":[],"passed":true},{"actual":[[[],"length"]],"check":"empty row","expected":[[[],"length"]],"passed":true},{"actual":[[[1],"length"],[[],"stop"]],"check":"later sample stop","expected":[[[1],"length"],[[],"stop"]],"passed":true},{"actual":[[[],"stop"]],"check":"zero marker","expected":[[[],"stop"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"separate finish\", \"actual\": [[[1], \"stop\"], [[], \"stop\"]], \"expected\": [[[1], \"stop\"], [[3, 4], \"length\"]], \"passed\": false}, {\"check\": \"both stop\", \"actual\": [[[], \"stop\"], [[], \"stop\"]], \"expected\": [[[], \"stop\"], [[2], \"stop\"]], \"passed\": false}, {\"check\": \"no batches\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty row\", \"actual\": [[[], \"length\"]], \"expected\": [[[], \"length\"]], \"passed\": true}, {\"check\": \"later sample stop\", \"actual\": [[[1], \"length\"], [[], \"stop\"]], \"expected\": [[[1], \"length\"], [[], \"stop\"]], \"passed\": true}, {\"check\": \"zero marker\", \"actual\": [[[], \"stop\"]], \"expected\": [[[], \"stop\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.95,"exit_code":1,"observations":[{"actual":[[[],"stop"],[[],"stop"]],"check":"separate finish","expected":[[[1],"stop"],[[3,4],"length"]],"passed":false},{"actual":[[[],"stop"],[[],"stop"]],"check":"both stop","expected":[[[],"stop"],[[2],"stop"]],"passed":false},{"actual":[],"check":"no batches","expected":[],"passed":true},{"actual":[[[],"length"]],"check":"empty row","expected":[[[],"length"]],"passed":true},{"actual":[[[],"stop"],[[],"stop"]],"check":"later sample stop","expected":[[[1],"length"],[[],"stop"]],"passed":false},{"actual":[[[],"stop"]],"check":"zero marker","expected":[[[],"stop"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"separate finish\", \"actual\": [[[], \"stop\"], [[], \"stop\"]], \"expected\": [[[1], \"stop\"], [[3, 4], \"length\"]], \"passed\": false}, {\"check\": \"both stop\", \"actual\": [[[], \"stop\"], [[], \"stop\"]], \"expected\": [[[], \"stop\"], [[2], \"stop\"]], \"passed\": false}, {\"check\": \"no batches\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty row\", \"actual\": [[[], \"length\"]], \"expected\": [[[], \"length\"]], \"passed\": true}, {\"check\": \"later sample stop\", \"actual\": [[[], \"stop\"], [[], \"stop\"]], \"expected\": [[[1], \"length\"], [[], \"stop\"]], \"passed\": false}, {\"check\": \"zero marker\", \"actual\": [[[], \"stop\"]], \"expected\": [[[], \"stop\"]], \"passed\": true}], \"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."}}