{"abstract":"backtrace follows pre-prune beam slots.","category":"Beam search bookkeeping","checks":6,"contract":"At each layer, parent_ids names prior hypotheses and selected contains indices into that array; return token paths by following indices from final nodes.","contract_signature":"layers, final_indices","evaluation_group":"beam-ancestry","failed_approach":"Reversing the compacted order still associates children with the wrong histories.","family":"w3-beam-search-bookkeeping-ancestry-after-prune","id":"FA-98446","implementations":{"attempt":{"sha256":"c1dc3e6ffafb97f5b2a3eaa1b6fb08ee043f340a1cc8222b2210902f181cd9d5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(layers, final_indices):\n    paths=[]\n    for idx in final_indices:\n        paths.append([layer[idx][1] for layer in layers])\n    return paths\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nlayers=[[[0,'a'],[0,'b']],[[1,'c'],[0,'d']]]\ncheck('crossed ancestry',solve(layers,[0]),[['b','c']])\ncheck('other final slot',solve(layers,[1]),[['a','d']])\ncheck('first layer only',solve([[[0,'x']],[ [0,'y'] ]],[0]),[['x','y']])\ncheck('single token path',solve([[[0,'q']]], [0]),[['q']])\ncheck('two terminal paths',solve(layers,[0,1]),[['b','c'],['a','d']])\ncheck('N-independent IDs',solve([[[0,N]],[[0,N+1]]],[0]),[[N,N+1]])\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":"3a7b713f5689034def90d792dad513e7ad6af4f6e0f55d74ae0cd34362c1b688","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(layers, final_indices):\n    paths=[[] for _ in final_indices]\n    for layer in reversed(layers):\n        paths=[ [layer[t][1]]+p for t,p in zip([x[0] for x in layer],paths)]\n    return paths\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nlayers=[[[0,'a'],[0,'b']],[[1,'c'],[0,'d']]]\ncheck('crossed ancestry',solve(layers,[0]),[['b','c']])\ncheck('other final slot',solve(layers,[1]),[['a','d']])\ncheck('first layer only',solve([[[0,'x']],[ [0,'y'] ]],[0]),[['x','y']])\ncheck('single token path',solve([[[0,'q']]], [0]),[['q']])\ncheck('two terminal paths',solve(layers,[0,1]),[['b','c'],['a','d']])\ncheck('N-independent IDs',solve([[[0,N]],[[0,N+1]]],[0]),[[N,N+1]])\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-ancestry-after-prune","generated_at":"2026-09-30T16:48:13.239401+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":"Selected parent indices are interpreted against the newly compacted beam.","sha256":"831b2d64cbf656926c957fc5896ad014691feb60cee1e82da04a9c4099b0f9f0","title":"Beam search: backtrace follows pre-prune beam slots · 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":27.787,"exit_code":1,"observations":[{"actual":[["a","c"]],"check":"crossed ancestry","expected":[["b","c"]],"passed":false},{"actual":[["b","d"]],"check":"other final slot","expected":[["a","d"]],"passed":false},{"actual":[["x","y"]],"check":"first layer only","expected":[["x","y"]],"passed":true},{"actual":[["q"]],"check":"single token path","expected":[["q"]],"passed":true},{"actual":[["a","c"],["b","d"]],"check":"two terminal paths","expected":[["b","c"],["a","d"]],"passed":false},{"actual":[[1,2]],"check":"N-independent IDs","expected":[[1,2]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"crossed ancestry\", \"actual\": [[\"a\", \"c\"]], \"expected\": [[\"b\", \"c\"]], \"passed\": false}, {\"check\": \"other final slot\", \"actual\": [[\"b\", \"d\"]], \"expected\": [[\"a\", \"d\"]], \"passed\": false}, {\"check\": \"first layer only\", \"actual\": [[\"x\", \"y\"]], \"expected\": [[\"x\", \"y\"]], \"passed\": true}, {\"check\": \"single token path\", \"actual\": [[\"q\"]], \"expected\": [[\"q\"]], \"passed\": true}, {\"check\": \"two terminal paths\", \"actual\": [[\"a\", \"c\"], [\"b\", \"d\"]], \"expected\": [[\"b\", \"c\"], [\"a\", \"d\"]], \"passed\": false}, {\"check\": \"N-independent IDs\", \"actual\": [[1, 2]], \"expected\": [[1, 2]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.028,"exit_code":1,"observations":[{"actual":[["a","d"]],"check":"crossed ancestry","expected":[["b","c"]],"passed":false},{"actual":[["a","d"]],"check":"other final slot","expected":[["a","d"]],"passed":true},{"actual":[["x","y"]],"check":"first layer only","expected":[["x","y"]],"passed":true},{"actual":[["q"]],"check":"single token path","expected":[["q"]],"passed":true},{"actual":[["a","d"],["a","c"]],"check":"two terminal paths","expected":[["b","c"],["a","d"]],"passed":false},{"actual":[[1,2]],"check":"N-independent IDs","expected":[[1,2]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"crossed ancestry\", \"actual\": [[\"a\", \"d\"]], \"expected\": [[\"b\", \"c\"]], \"passed\": false}, {\"check\": \"other final slot\", \"actual\": [[\"a\", \"d\"]], \"expected\": [[\"a\", \"d\"]], \"passed\": true}, {\"check\": \"first layer only\", \"actual\": [[\"x\", \"y\"]], \"expected\": [[\"x\", \"y\"]], \"passed\": true}, {\"check\": \"single token path\", \"actual\": [[\"q\"]], \"expected\": [[\"q\"]], \"passed\": true}, {\"check\": \"two terminal paths\", \"actual\": [[\"a\", \"d\"], [\"a\", \"c\"]], \"expected\": [[\"b\", \"c\"], [\"a\", \"d\"]], \"passed\": false}, {\"check\": \"N-independent IDs\", \"actual\": [[1, 2]], \"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."}}