{"abstract":"The bounded weak ancestor certificate reports an incorrect path.","category":"Heap invariants","checks":7,"contract":"A weak heap stores reverse bits r in a zero-based array. For nonroot node j, climb while j is a left child under its parent reverse bit: (j mod 2)==r[j//2]. Its distinguished ancestor is j//2 after climbing; zero has none. Report ancestor, climb path, climb count, stopping child, orientation bit, and whether direct parent suffices.","evaluation_group":"s3-heap-model-weak-ancestor","failed_approach":"The local patch uses path[1:] and still violates the stated relation.","family":"s3-heap-weak-ancestor-path","id":"FA-40536","implementations":{"attempt":{"sha256":"e177214f7944ea012c8fdda4c14210c770b981fb1b14996f52d1e2e4fd4e3b1b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    r=d['reverse']; start=d['node']; j=start; path=[]\n    while j>0 and j%2==r[j//2]:\n        path.append(j); j//=2\n    ancestor=None if start==0 else j//2\n    return {'ancestor': ancestor,\n    'path': path[1:],\n    'cost': len(path),\n    'stop': j,\n    'orientation': None if start==0 else r[j//2],\n    'direct': start!=0 and ancestor==start//2}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 2}, {'ancestor': 1, 'path': [], 'cost': 0, 'stop': 2, 'orientation': 1, 'direct': True})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 3}, {'ancestor': 0, 'path': [3], 'cost': 1, 'stop': 1, 'orientation': 0, 'direct': False})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 4}, {'ancestor': 2, 'path': [], 'cost': 0, 'stop': 4, 'orientation': 1, 'direct': True})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 5}, {'ancestor': 1, 'path': [5], 'cost': 1, 'stop': 2, 'orientation': 1, 'direct': False})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True})]][N-1]\ncheck('regression certificate 1', solve(cases[0][0]), cases[0][1])\ncheck('regression certificate 2', solve(cases[1][0]), cases[1][1])\ncheck('regression certificate 3', solve(cases[2][0]), cases[2][1])\ncheck('regression certificate 4', solve(cases[3][0]), cases[3][1])\ncheck('regression certificate 5', solve(cases[4][0]), cases[4][1])\ncheck('regression certificate 6', solve(cases[5][0]), cases[5][1])\ncheck('variant-dependent certificate', solve(cases[6][0]), cases[6][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":"bc8bdaaf3f55d1d0ee7777c62af2394524dde5ac59f842300e1b672776136280","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    r=d['reverse']; start=d['node']; j=start; path=[]\n    while j>0 and j%2==r[j//2]:\n        path.append(j); j//=2\n    ancestor=None if start==0 else j//2\n    return {'ancestor': ancestor,\n    'path': list(reversed(path)),\n    'cost': len(path),\n    'stop': j,\n    'orientation': None if start==0 else r[j//2],\n    'direct': start!=0 and ancestor==start//2}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 2}, {'ancestor': 1, 'path': [], 'cost': 0, 'stop': 2, 'orientation': 1, 'direct': True})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 3}, {'ancestor': 0, 'path': [3], 'cost': 1, 'stop': 1, 'orientation': 0, 'direct': False})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 4}, {'ancestor': 2, 'path': [], 'cost': 0, 'stop': 4, 'orientation': 1, 'direct': True})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 5}, {'ancestor': 1, 'path': [5], 'cost': 1, 'stop': 2, 'orientation': 1, 'direct': False})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True})]][N-1]\ncheck('regression certificate 1', solve(cases[0][0]), cases[0][1])\ncheck('regression certificate 2', solve(cases[1][0]), cases[1][1])\ncheck('regression certificate 3', solve(cases[2][0]), cases[2][1])\ncheck('regression certificate 4', solve(cases[3][0]), cases[3][1])\ncheck('regression certificate 5', solve(cases[4][0]), cases[4][1])\ncheck('regression certificate 6', solve(cases[5][0]), cases[5][1])\ncheck('variant-dependent certificate', solve(cases[6][0]), cases[6][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"},"fixed":{"sha256":"57fce4bbbb395f2d57a9a53ffc3bbc5556222049b8ae9a0673d013bb0b24f76b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    r=d['reverse']; start=d['node']; j=start; path=[]\n    while j>0 and j%2==r[j//2]:\n        path.append(j); j//=2\n    ancestor=None if start==0 else j//2\n    return {'ancestor': ancestor,\n    'path': path,\n    'cost': len(path),\n    'stop': j,\n    'orientation': None if start==0 else r[j//2],\n    'direct': start!=0 and ancestor==start//2}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 2}, {'ancestor': 1, 'path': [], 'cost': 0, 'stop': 2, 'orientation': 1, 'direct': True})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 3}, {'ancestor': 0, 'path': [3], 'cost': 1, 'stop': 1, 'orientation': 0, 'direct': False})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 4}, {'ancestor': 2, 'path': [], 'cost': 0, 'stop': 4, 'orientation': 1, 'direct': True})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 5}, {'ancestor': 1, 'path': [5], 'cost': 1, 'stop': 2, 'orientation': 1, 'direct': False})], [({'reverse': [0], 'node': 0}, {'ancestor': None, 'path': [], 'cost': 0, 'stop': 0, 'orientation': None, 'direct': False}), ({'reverse': [0, 0], 'node': 1}, {'ancestor': 0, 'path': [], 'cost': 0, 'stop': 1, 'orientation': 0, 'direct': True}), ({'reverse': [0, 0, 0, 0, 0, 0, 0, 0], 'node': 4}, {'ancestor': 0, 'path': [4, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 0, 1, 0, 0, 0, 0], 'node': 7}, {'ancestor': 0, 'path': [7, 3], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 0, 1, 0, 0, 0, 0, 0], 'node': 5}, {'ancestor': 0, 'path': [5, 2], 'cost': 2, 'stop': 1, 'orientation': 0, 'direct': False}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True}), ({'reverse': [0, 1, 1, 1, 0, 0, 0, 0], 'node': 6}, {'ancestor': 3, 'path': [], 'cost': 0, 'stop': 6, 'orientation': 1, 'direct': True})]][N-1]\ncheck('regression certificate 1', solve(cases[0][0]), cases[0][1])\ncheck('regression certificate 2', solve(cases[1][0]), cases[1][1])\ncheck('regression certificate 3', solve(cases[2][0]), cases[2][1])\ncheck('regression certificate 4', solve(cases[3][0]), cases[3][1])\ncheck('regression certificate 5', solve(cases[4][0]), cases[4][1])\ncheck('regression certificate 6', solve(cases[5][0]), cases[5][1])\ncheck('variant-dependent certificate', solve(cases[6][0]), cases[6][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":"A stipulated offline diagnostic model; it does not implement a production allocator, concurrency protocol, or complete heap library. 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":"s3-heap-weak-ancestor-path","generated_at":"2026-09-29T14:43:32.092867+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This isolates an internal heap representation or priority-structure invariant using deterministic finite records.","repair":"Derive path using path under the stated bounded certificate contract.","root_cause":"Weak heap ancestor search records climbed nodes from descendant upward.","sha256":"2b2adde358401982ba4503c559c24f7342fc5c0d5ed74d7470b3fe48c906a37e","title":"Weak heap ancestor search records climbed nodes from descendant upward · case 01","variant":1,"variant_policy":"Six explicit regression certificates are retained; a seventh changes structural size, position, priority, or bounds with N.","verification":{"attempt":{"elapsed_ms":38.995,"exit_code":1,"observations":[{"actual":{"ancestor":null,"cost":0,"direct":false,"orientation":null,"path":[],"stop":0},"check":"regression certificate 1","expected":{"ancestor":null,"cost":0,"direct":false,"orientation":null,"path":[],"stop":0},"passed":true},{"actual":{"ancestor":0,"cost":0,"direct":true,"orientation":0,"path":[],"stop":1},"check":"regression certificate 2","expected":{"ancestor":0,"cost":0,"direct":true,"orientation":0,"path":[],"stop":1},"passed":true},{"actual":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[2],"stop":1},"check":"regression certificate 3","expected":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[4,2],"stop":1},"passed":false},{"actual":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[3],"stop":1},"check":"regression certificate 4","expected":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[7,3],"stop":1},"passed":false},{"actual":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[2],"stop":1},"check":"regression certificate 5","expected":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[5,2],"stop":1},"passed":false},{"actual":{"ancestor":3,"cost":0,"direct":true,"orientation":1,"path":[],"stop":6},"check":"regression certificate 6","expected":{"ancestor":3,"cost":0,"direct":true,"orientation":1,"path":[],"stop":6},"passed":true},{"actual":{"ancestor":1,"cost":0,"direct":true,"orientation":1,"path":[],"stop":2},"check":"variant-dependent certificate","expected":{"ancestor":1,"cost":0,"direct":true,"orientation":1,"path":[],"stop":2},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression certificate 1\", \"actual\": {\"ancestor\": null, \"path\": [], \"cost\": 0, \"stop\": 0, \"orientation\": null, \"direct\": false}, \"expected\": {\"ancestor\": null, \"path\": [], \"cost\": 0, \"stop\": 0, \"orientation\": null, \"direct\": false}, \"passed\": true}, {\"check\": \"regression certificate 2\", \"actual\": {\"ancestor\": 0, \"path\": [], \"cost\": 0, \"stop\": 1, \"orientation\": 0, \"direct\": true}, \"expected\": {\"ancestor\": 0, \"path\": [], \"cost\": 0, \"stop\": 1, \"orientation\": 0, \"direct\": true}, \"passed\": true}, {\"check\": \"regression certificate 3\", \"actual\": {\"ancestor\": 0, \"path\": [2], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"expected\": {\"ancestor\": 0, \"path\": [4, 2], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"passed\": false}, {\"check\": \"regression certificate 4\", \"actual\": {\"ancestor\": 0, \"path\": [3], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"expected\": {\"ancestor\": 0, \"path\": [7, 3], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"passed\": false}, {\"check\": \"regression certificate 5\", \"actual\": {\"ancestor\": 0, \"path\": [2], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"expected\": {\"ancestor\": 0, \"path\": [5, 2], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"passed\": false}, {\"check\": \"regression certificate 6\", \"actual\": {\"ancestor\": 3, \"path\": [], \"cost\": 0, \"stop\": 6, \"orientation\": 1, \"direct\": true}, \"expected\": {\"ancestor\": 3, \"path\": [], \"cost\": 0, \"stop\": 6, \"orientation\": 1, \"direct\": true}, \"passed\": true}, {\"check\": \"variant-dependent certificate\", \"actual\": {\"ancestor\": 1, \"path\": [], \"cost\": 0, \"stop\": 2, \"orientation\": 1, \"direct\": true}, \"expected\": {\"ancestor\": 1, \"path\": [], \"cost\": 0, \"stop\": 2, \"orientation\": 1, \"direct\": true}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.044,"exit_code":1,"observations":[{"actual":{"ancestor":null,"cost":0,"direct":false,"orientation":null,"path":[],"stop":0},"check":"regression certificate 1","expected":{"ancestor":null,"cost":0,"direct":false,"orientation":null,"path":[],"stop":0},"passed":true},{"actual":{"ancestor":0,"cost":0,"direct":true,"orientation":0,"path":[],"stop":1},"check":"regression certificate 2","expected":{"ancestor":0,"cost":0,"direct":true,"orientation":0,"path":[],"stop":1},"passed":true},{"actual":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[2,4],"stop":1},"check":"regression certificate 3","expected":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[4,2],"stop":1},"passed":false},{"actual":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[3,7],"stop":1},"check":"regression certificate 4","expected":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[7,3],"stop":1},"passed":false},{"actual":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[2,5],"stop":1},"check":"regression certificate 5","expected":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[5,2],"stop":1},"passed":false},{"actual":{"ancestor":3,"cost":0,"direct":true,"orientation":1,"path":[],"stop":6},"check":"regression certificate 6","expected":{"ancestor":3,"cost":0,"direct":true,"orientation":1,"path":[],"stop":6},"passed":true},{"actual":{"ancestor":1,"cost":0,"direct":true,"orientation":1,"path":[],"stop":2},"check":"variant-dependent certificate","expected":{"ancestor":1,"cost":0,"direct":true,"orientation":1,"path":[],"stop":2},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression certificate 1\", \"actual\": {\"ancestor\": null, \"path\": [], \"cost\": 0, \"stop\": 0, \"orientation\": null, \"direct\": false}, \"expected\": {\"ancestor\": null, \"path\": [], \"cost\": 0, \"stop\": 0, \"orientation\": null, \"direct\": false}, \"passed\": true}, {\"check\": \"regression certificate 2\", \"actual\": {\"ancestor\": 0, \"path\": [], \"cost\": 0, \"stop\": 1, \"orientation\": 0, \"direct\": true}, \"expected\": {\"ancestor\": 0, \"path\": [], \"cost\": 0, \"stop\": 1, \"orientation\": 0, \"direct\": true}, \"passed\": true}, {\"check\": \"regression certificate 3\", \"actual\": {\"ancestor\": 0, \"path\": [2, 4], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"expected\": {\"ancestor\": 0, \"path\": [4, 2], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"passed\": false}, {\"check\": \"regression certificate 4\", \"actual\": {\"ancestor\": 0, \"path\": [3, 7], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"expected\": {\"ancestor\": 0, \"path\": [7, 3], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"passed\": false}, {\"check\": \"regression certificate 5\", \"actual\": {\"ancestor\": 0, \"path\": [2, 5], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"expected\": {\"ancestor\": 0, \"path\": [5, 2], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"passed\": false}, {\"check\": \"regression certificate 6\", \"actual\": {\"ancestor\": 3, \"path\": [], \"cost\": 0, \"stop\": 6, \"orientation\": 1, \"direct\": true}, \"expected\": {\"ancestor\": 3, \"path\": [], \"cost\": 0, \"stop\": 6, \"orientation\": 1, \"direct\": true}, \"passed\": true}, {\"check\": \"variant-dependent certificate\", \"actual\": {\"ancestor\": 1, \"path\": [], \"cost\": 0, \"stop\": 2, \"orientation\": 1, \"direct\": true}, \"expected\": {\"ancestor\": 1, \"path\": [], \"cost\": 0, \"stop\": 2, \"orientation\": 1, \"direct\": true}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.559,"exit_code":0,"observations":[{"actual":{"ancestor":null,"cost":0,"direct":false,"orientation":null,"path":[],"stop":0},"check":"regression certificate 1","expected":{"ancestor":null,"cost":0,"direct":false,"orientation":null,"path":[],"stop":0},"passed":true},{"actual":{"ancestor":0,"cost":0,"direct":true,"orientation":0,"path":[],"stop":1},"check":"regression certificate 2","expected":{"ancestor":0,"cost":0,"direct":true,"orientation":0,"path":[],"stop":1},"passed":true},{"actual":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[4,2],"stop":1},"check":"regression certificate 3","expected":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[4,2],"stop":1},"passed":true},{"actual":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[7,3],"stop":1},"check":"regression certificate 4","expected":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[7,3],"stop":1},"passed":true},{"actual":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[5,2],"stop":1},"check":"regression certificate 5","expected":{"ancestor":0,"cost":2,"direct":false,"orientation":0,"path":[5,2],"stop":1},"passed":true},{"actual":{"ancestor":3,"cost":0,"direct":true,"orientation":1,"path":[],"stop":6},"check":"regression certificate 6","expected":{"ancestor":3,"cost":0,"direct":true,"orientation":1,"path":[],"stop":6},"passed":true},{"actual":{"ancestor":1,"cost":0,"direct":true,"orientation":1,"path":[],"stop":2},"check":"variant-dependent certificate","expected":{"ancestor":1,"cost":0,"direct":true,"orientation":1,"path":[],"stop":2},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression certificate 1\", \"actual\": {\"ancestor\": null, \"path\": [], \"cost\": 0, \"stop\": 0, \"orientation\": null, \"direct\": false}, \"expected\": {\"ancestor\": null, \"path\": [], \"cost\": 0, \"stop\": 0, \"orientation\": null, \"direct\": false}, \"passed\": true}, {\"check\": \"regression certificate 2\", \"actual\": {\"ancestor\": 0, \"path\": [], \"cost\": 0, \"stop\": 1, \"orientation\": 0, \"direct\": true}, \"expected\": {\"ancestor\": 0, \"path\": [], \"cost\": 0, \"stop\": 1, \"orientation\": 0, \"direct\": true}, \"passed\": true}, {\"check\": \"regression certificate 3\", \"actual\": {\"ancestor\": 0, \"path\": [4, 2], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"expected\": {\"ancestor\": 0, \"path\": [4, 2], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"passed\": true}, {\"check\": \"regression certificate 4\", \"actual\": {\"ancestor\": 0, \"path\": [7, 3], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"expected\": {\"ancestor\": 0, \"path\": [7, 3], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"passed\": true}, {\"check\": \"regression certificate 5\", \"actual\": {\"ancestor\": 0, \"path\": [5, 2], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"expected\": {\"ancestor\": 0, \"path\": [5, 2], \"cost\": 2, \"stop\": 1, \"orientation\": 0, \"direct\": false}, \"passed\": true}, {\"check\": \"regression certificate 6\", \"actual\": {\"ancestor\": 3, \"path\": [], \"cost\": 0, \"stop\": 6, \"orientation\": 1, \"direct\": true}, \"expected\": {\"ancestor\": 3, \"path\": [], \"cost\": 0, \"stop\": 6, \"orientation\": 1, \"direct\": true}, \"passed\": true}, {\"check\": \"variant-dependent certificate\", \"actual\": {\"ancestor\": 1, \"path\": [], \"cost\": 0, \"stop\": 2, \"orientation\": 1, \"direct\": true}, \"expected\": {\"ancestor\": 1, \"path\": [], \"cost\": 0, \"stop\": 2, \"orientation\": 1, \"direct\": true}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}