{"abstract":"length normalization changes accumulated search scores.","category":"Beam search bookkeeping","checks":6,"contract":"Given token deltas and alpha, return prefix raw totals; alpha is reserved for final ranking.","contract_signature":"deltas, alpha","evaluation_group":"beam-raw_score_state","failed_approach":"Keeping only normalized values and adding new token deltas still corrupts later ranks.","family":"w3-beam-search-bookkeeping-final-only-penalty","id":"FA-98491","implementations":{"attempt":{"sha256":"667e568a11f4d867a79673259abcc77ac3aa8e64d431b60c237bbdc5502d183d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(deltas, alpha):\n    return [sum(deltas[:i+1])/(1+alpha*i) for i in range(len(deltas))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('raw prefix totals',solve([-N,-2],1),[-N,-N-2])\ncheck('single step',solve([-3],N),[-3])\ncheck('empty steps',solve([],N),[])\ncheck('positive toy deltas',solve([N,1],2),[N,N+1])\ncheck('later negative step',solve([0,-N,-1],.5),[0,-N,-N-1])\ncheck('zero penalty',solve([-1,-1],0),[-1,-2])\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":"d2090e4dc4c24d119d3b46f0a9309cd8be69982064d14ca1c8fe63b2a1bfb28f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(deltas, alpha):\n    return [sum(deltas[:i+1])/(1+alpha*(i+1)) for i in range(len(deltas))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('raw prefix totals',solve([-N,-2],1),[-N,-N-2])\ncheck('single step',solve([-3],N),[-3])\ncheck('empty steps',solve([],N),[])\ncheck('positive toy deltas',solve([N,1],2),[N,N+1])\ncheck('later negative step',solve([0,-N,-1],.5),[0,-N,-N-1])\ncheck('zero penalty',solve([-1,-1],0),[-1,-2])\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 is a finite toy beam-state contract and makes no claim about neural model quality or production decoding. 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-beam-search-bookkeeping-final-only-penalty","generated_at":"2026-09-30T16:48:13.668730+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Beam decoders rely on consistent hypothesis state while expanding and ranking candidates.","root_cause":"The decoder feeds a ranking-only adjustment back into subsequent token accumulation.","sha256":"054ba06058dc7a070eca5523c5e882ec9aeca6b2c23422fdf269fb557d57dd7b","title":"Beam search: length normalization changes accumulated search scores · 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.784,"exit_code":1,"observations":[{"actual":[-1.0,-1.5],"check":"raw prefix totals","expected":[-1,-3],"passed":false},{"actual":[-3.0],"check":"single step","expected":[-3],"passed":true},{"actual":[],"check":"empty steps","expected":[],"passed":true},{"actual":[1.0,0.6666666666666666],"check":"positive toy deltas","expected":[1,2],"passed":false},{"actual":[0.0,-0.6666666666666666,-1.0],"check":"later negative step","expected":[0,-1,-2],"passed":false},{"actual":[-1.0,-2.0],"check":"zero penalty","expected":[-1,-2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"raw prefix totals\", \"actual\": [-1.0, -1.5], \"expected\": [-1, -3], \"passed\": false}, {\"check\": \"single step\", \"actual\": [-3.0], \"expected\": [-3], \"passed\": true}, {\"check\": \"empty steps\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"positive toy deltas\", \"actual\": [1.0, 0.6666666666666666], \"expected\": [1, 2], \"passed\": false}, {\"check\": \"later negative step\", \"actual\": [0.0, -0.6666666666666666, -1.0], \"expected\": [0, -1, -2], \"passed\": false}, {\"check\": \"zero penalty\", \"actual\": [-1.0, -2.0], \"expected\": [-1, -2], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.242,"exit_code":1,"observations":[{"actual":[-0.5,-1.0],"check":"raw prefix totals","expected":[-1,-3],"passed":false},{"actual":[-1.5],"check":"single step","expected":[-3],"passed":false},{"actual":[],"check":"empty steps","expected":[],"passed":true},{"actual":[0.3333333333333333,0.4],"check":"positive toy deltas","expected":[1,2],"passed":false},{"actual":[0.0,-0.5,-0.8],"check":"later negative step","expected":[0,-1,-2],"passed":false},{"actual":[-1.0,-2.0],"check":"zero penalty","expected":[-1,-2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"raw prefix totals\", \"actual\": [-0.5, -1.0], \"expected\": [-1, -3], \"passed\": false}, {\"check\": \"single step\", \"actual\": [-1.5], \"expected\": [-3], \"passed\": false}, {\"check\": \"empty steps\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"positive toy deltas\", \"actual\": [0.3333333333333333, 0.4], \"expected\": [1, 2], \"passed\": false}, {\"check\": \"later negative step\", \"actual\": [0.0, -0.5, -0.8], \"expected\": [0, -1, -2], \"passed\": false}, {\"check\": \"zero penalty\", \"actual\": [-1.0, -2.0], \"expected\": [-1, -2], \"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."}}