{"abstract":"child ancestry points to sorted candidate position rather than source parent.","category":"Beam search bookkeeping","checks":6,"contract":"Candidates [parent,score,token]; return selected rows [parent,token] after global top width.","contract_signature":"candidates, width","evaluation_group":"beam-parent_map","failed_approach":"Recovering parent IDs from the first candidate per parent fails when one parent has several candidates.","family":"w3-beam-search-bookkeeping-beam-slot-parent-map","id":"FA-98521","implementations":{"attempt":{"sha256":"e2e028a785eb8d7c7fee3339eab03728d70550053c5a04603d389ee125afc082","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(candidates, width):\n    return [[next(i for i,r in enumerate(candidates) if r[0]==x[0]),x[2]] for x in sorted(candidates,key=lambda r:-r[1])[:width]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nc=[[7,N,'a'],[3,N+2,'b'],[7,N+1,'c']]\ncheck('sorted child keeps source',solve(c,2),[[3,'b'],[7,'c']])\ncheck('same source repeated',solve(c,3),[[3,'b'],[7,'c'],[7,'a']])\ncheck('empty set',solve([],N),[])\ncheck('zero width',solve(c,0),[])\ncheck('single child',solve([[9,1,'x']],1),[[9,'x']])\ncheck('tie by parent',solve([[8,N,'z'],[2,N,'a']],2),[[2,'a'],[8,'z']])\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":"5d2996212b517dd3b3e9517f0e436829886cfc0ac4808b0f1f567243ca0fc426","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(candidates, width):\n    return [[i,r[2]] for i,r in enumerate(sorted(candidates,key=lambda r:-r[1])[:width])]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nc=[[7,N,'a'],[3,N+2,'b'],[7,N+1,'c']]\ncheck('sorted child keeps source',solve(c,2),[[3,'b'],[7,'c']])\ncheck('same source repeated',solve(c,3),[[3,'b'],[7,'c'],[7,'a']])\ncheck('empty set',solve([],N),[])\ncheck('zero width',solve(c,0),[])\ncheck('single child',solve([[9,1,'x']],1),[[9,'x']])\ncheck('tie by parent',solve([[8,N,'z'],[2,N,'a']],2),[[2,'a'],[8,'z']])\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-beam-slot-parent-map","generated_at":"2026-09-30T16:48:14.105858+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":"After ranking a flattened candidate list, the child stores its position in that list as parent ID.","sha256":"34ca65497ecec7e6dc4f594355a716e8eed93dd7bd3d8be3644cefb78e402238","title":"Beam search: child ancestry points to sorted candidate position rather than source parent · 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.895,"exit_code":1,"observations":[{"actual":[[1,"b"],[0,"c"]],"check":"sorted child keeps source","expected":[[3,"b"],[7,"c"]],"passed":false},{"actual":[[1,"b"],[0,"c"],[0,"a"]],"check":"same source repeated","expected":[[3,"b"],[7,"c"],[7,"a"]],"passed":false},{"actual":[],"check":"empty set","expected":[],"passed":true},{"actual":[],"check":"zero width","expected":[],"passed":true},{"actual":[[0,"x"]],"check":"single child","expected":[[9,"x"]],"passed":false},{"actual":[[0,"z"],[1,"a"]],"check":"tie by parent","expected":[[2,"a"],[8,"z"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"sorted child keeps source\", \"actual\": [[1, \"b\"], [0, \"c\"]], \"expected\": [[3, \"b\"], [7, \"c\"]], \"passed\": false}, {\"check\": \"same source repeated\", \"actual\": [[1, \"b\"], [0, \"c\"], [0, \"a\"]], \"expected\": [[3, \"b\"], [7, \"c\"], [7, \"a\"]], \"passed\": false}, {\"check\": \"empty set\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero width\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single child\", \"actual\": [[0, \"x\"]], \"expected\": [[9, \"x\"]], \"passed\": false}, {\"check\": \"tie by parent\", \"actual\": [[0, \"z\"], [1, \"a\"]], \"expected\": [[2, \"a\"], [8, \"z\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.413,"exit_code":1,"observations":[{"actual":[[0,"b"],[1,"c"]],"check":"sorted child keeps source","expected":[[3,"b"],[7,"c"]],"passed":false},{"actual":[[0,"b"],[1,"c"],[2,"a"]],"check":"same source repeated","expected":[[3,"b"],[7,"c"],[7,"a"]],"passed":false},{"actual":[],"check":"empty set","expected":[],"passed":true},{"actual":[],"check":"zero width","expected":[],"passed":true},{"actual":[[0,"x"]],"check":"single child","expected":[[9,"x"]],"passed":false},{"actual":[[0,"z"],[1,"a"]],"check":"tie by parent","expected":[[2,"a"],[8,"z"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"sorted child keeps source\", \"actual\": [[0, \"b\"], [1, \"c\"]], \"expected\": [[3, \"b\"], [7, \"c\"]], \"passed\": false}, {\"check\": \"same source repeated\", \"actual\": [[0, \"b\"], [1, \"c\"], [2, \"a\"]], \"expected\": [[3, \"b\"], [7, \"c\"], [7, \"a\"]], \"passed\": false}, {\"check\": \"empty set\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero width\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single child\", \"actual\": [[0, \"x\"]], \"expected\": [[9, \"x\"]], \"passed\": false}, {\"check\": \"tie by parent\", \"actual\": [[0, \"z\"], [1, \"a\"]], \"expected\": [[2, \"a\"], [8, \"z\"]], \"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."}}