{"abstract":"A full token budget is not reported as a length finish.","category":"Model output stopping rules","checks":6,"contract":"Return length when the emitted token count has reached or exceeded the nonnegative cap; otherwise return None. This includes cap zero with an empty output.","contract_signature":"tokens, cap","evaluation_group":"w3-output-output-cap","failed_approach":"Testing equality alone handles an exact fill but misses an already-over-budget count.","family":"w3-model-output-stopping-rules-exact-token-cap","id":"FA-100821","implementations":{"attempt":{"sha256":"9cafcd86df8599506836edb74624c33ca1e004c4e2244f7866325b07fffb870e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tokens, cap):\n    return 'length' if len(tokens)==cap else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('exact cap',solve(list(range(N)),N),'length')\ncheck('below cap',solve(list(range(max(0,N-1))),N),None)\ncheck('over cap',solve(list(range(N+1)),N),'length')\ncheck('zero cap empty',solve([],0),'length')\ncheck('positive cap empty',solve([],N),None)\ncheck('singleton cap',solve([7],1),'length')\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":"d5867e34a1aef3b2d7d1d4ab2628755cc869b4f04cf778228429b50782111e3a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tokens, cap):\n    return 'length' if len(tokens)>cap else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('exact cap',solve(list(range(N)),N),'length')\ncheck('below cap',solve(list(range(max(0,N-1))),N),None)\ncheck('over cap',solve(list(range(N+1)),N),'length')\ncheck('zero cap empty',solve([],0),'length')\ncheck('positive cap empty',solve([],N),None)\ncheck('singleton cap',solve([7],1),'length')\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-exact-token-cap","generated_at":"2026-09-30T16:48:40.054341+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":"A strict comparison misses output that fills the configured token budget exactly.","sha256":"e41789123dbd93727b57a3cc82724f48df7673d043bd18a86672afab359dd4e2","title":"Output stopping: A full token budget is not reported as a length finish · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":28.078,"exit_code":1,"observations":[{"actual":"length","check":"exact cap","expected":"length","passed":true},{"actual":null,"check":"below cap","expected":null,"passed":true},{"actual":null,"check":"over cap","expected":"length","passed":false},{"actual":"length","check":"zero cap empty","expected":"length","passed":true},{"actual":null,"check":"positive cap empty","expected":null,"passed":true},{"actual":"length","check":"singleton cap","expected":"length","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact cap\", \"actual\": \"length\", \"expected\": \"length\", \"passed\": true}, {\"check\": \"below cap\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"over cap\", \"actual\": null, \"expected\": \"length\", \"passed\": false}, {\"check\": \"zero cap empty\", \"actual\": \"length\", \"expected\": \"length\", \"passed\": true}, {\"check\": \"positive cap empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"singleton cap\", \"actual\": \"length\", \"expected\": \"length\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.265,"exit_code":1,"observations":[{"actual":null,"check":"exact cap","expected":"length","passed":false},{"actual":null,"check":"below cap","expected":null,"passed":true},{"actual":"length","check":"over cap","expected":"length","passed":true},{"actual":null,"check":"zero cap empty","expected":"length","passed":false},{"actual":null,"check":"positive cap empty","expected":null,"passed":true},{"actual":null,"check":"singleton cap","expected":"length","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact cap\", \"actual\": null, \"expected\": \"length\", \"passed\": false}, {\"check\": \"below cap\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"over cap\", \"actual\": \"length\", \"expected\": \"length\", \"passed\": true}, {\"check\": \"zero cap empty\", \"actual\": null, \"expected\": \"length\", \"passed\": false}, {\"check\": \"positive cap empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"singleton cap\", \"actual\": null, \"expected\": \"length\", \"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."}}