{"abstract":"Left-arrow collapses unrelated branches.","category":"Tree accessibility","checks":8,"contract":"Right expands then enters the first child; Left collapses only the current branch or focuses its parent; roots retain focus; collapse-all clears every expansion.","contract_signature":"node, expanded, parents, children, key","evaluation_group":"xi-tree-navigation","failed_approach":"Adding the node keeps the current branch expanded.","family":"xi-tree-navigation-collapse-left","id":"FA-8391","implementations":{"attempt":{"sha256":"2dc72109ef26af633f232dd8f37bf75121a12f0edcf3c526a09ac1bdaec12cde","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(node, expanded, parents, children, key):\n    expanded = set(expanded)\n    kids = children.get(node, [])\n    if key == 'Right' and kids:\n        if node not in expanded: expanded.add(node)\n        else: node = kids[0]\n    elif key == 'Left':\n        if node in expanded: expanded.add(node)\n        else: node = parents.get(node, node)\n    elif key == 'CollapseAll': expanded.clear()\n    return (node, sorted(expanded))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('expand', solve('a', ['z'], {}, {'a':['b','c']}, 'Right'), ('a', ['a', 'z']))\ncheck('descend', solve('a', ['a'], {}, {'a':['b','c']}, 'Right'), ('b', ['a']))\ncheck('collapse', solve('a', ['a','z'], {}, {'a':['b']}, 'Left'), ('a', ['z']))\ncheck('parent', solve('b', [], {'b':'a'}, {}, 'Left'), ('a', []))\ncheck('root', solve('a', [], {}, {}, 'Left'), ('a', []))\ncheck('all', solve('a', ['a','z'], {}, {}, 'CollapseAll'), ('a', []))\ncheck('parameterized child count', solve('a', [], {}, {'a':list(range(N))}, 'Right'), ('a',['a']))\nfor repetition in range(N):\n    check('repeat all', solve('a', ['a','z'], {}, {}, 'CollapseAll'), ('a', []))\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":"a4dffe91163f7deee6ebc436d7c2d23e4a674b12f976fb7f26467031c027c260","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(node, expanded, parents, children, key):\n    expanded = set(expanded)\n    kids = children.get(node, [])\n    if key == 'Right' and kids:\n        if node not in expanded: expanded.add(node)\n        else: node = kids[0]\n    elif key == 'Left':\n        if node in expanded: expanded.clear()\n        else: node = parents.get(node, node)\n    elif key == 'CollapseAll': expanded.clear()\n    return (node, sorted(expanded))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('expand', solve('a', ['z'], {}, {'a':['b','c']}, 'Right'), ('a', ['a', 'z']))\ncheck('descend', solve('a', ['a'], {}, {'a':['b','c']}, 'Right'), ('b', ['a']))\ncheck('collapse', solve('a', ['a','z'], {}, {'a':['b']}, 'Left'), ('a', ['z']))\ncheck('parent', solve('b', [], {'b':'a'}, {}, 'Left'), ('a', []))\ncheck('root', solve('a', [], {}, {}, 'Left'), ('a', []))\ncheck('all', solve('a', ['a','z'], {}, {}, 'CollapseAll'), ('a', []))\ncheck('parameterized child count', solve('a', [], {}, {'a':list(range(N))}, 'Right'), ('a',['a']))\nfor repetition in range(N):\n    check('repeat all', solve('a', ['a','z'], {}, {}, 'CollapseAll'), ('a', []))\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 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":"xi-tree-navigation-collapse-left","generated_at":"2026-09-29T14:38:21.061370+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of tree keyboard expansion; this isolates one interface invariant without requiring a browser.","root_cause":"The collapse left operation uses `expanded.clear()` where the contract requires `expanded.remove(node)`.","sha256":"f5aaed029819b970649dc3389febc040f4a95473066c7088f7f9685169c3fc00","title":"Tree keyboard expansion: Left-arrow collapses unrelated branches · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":36.99,"exit_code":1,"observations":[{"actual":["a",["a","z"]],"check":"expand","expected":["a",["a","z"]],"passed":true},{"actual":["b",["a"]],"check":"descend","expected":["b",["a"]],"passed":true},{"actual":["a",["a","z"]],"check":"collapse","expected":["a",["z"]],"passed":false},{"actual":["a",[]],"check":"parent","expected":["a",[]],"passed":true},{"actual":["a",[]],"check":"root","expected":["a",[]],"passed":true},{"actual":["a",[]],"check":"all","expected":["a",[]],"passed":true},{"actual":["a",["a"]],"check":"parameterized child count","expected":["a",["a"]],"passed":true},{"actual":["a",[]],"check":"repeat all","expected":["a",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"expand\", \"actual\": [\"a\", [\"a\", \"z\"]], \"expected\": [\"a\", [\"a\", \"z\"]], \"passed\": true}, {\"check\": \"descend\", \"actual\": [\"b\", [\"a\"]], \"expected\": [\"b\", [\"a\"]], \"passed\": true}, {\"check\": \"collapse\", \"actual\": [\"a\", [\"a\", \"z\"]], \"expected\": [\"a\", [\"z\"]], \"passed\": false}, {\"check\": \"parent\", \"actual\": [\"a\", []], \"expected\": [\"a\", []], \"passed\": true}, {\"check\": \"root\", \"actual\": [\"a\", []], \"expected\": [\"a\", []], \"passed\": true}, {\"check\": \"all\", \"actual\": [\"a\", []], \"expected\": [\"a\", []], \"passed\": true}, {\"check\": \"parameterized child count\", \"actual\": [\"a\", [\"a\"]], \"expected\": [\"a\", [\"a\"]], \"passed\": true}, {\"check\": \"repeat all\", \"actual\": [\"a\", []], \"expected\": [\"a\", []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":35.309,"exit_code":1,"observations":[{"actual":["a",["a","z"]],"check":"expand","expected":["a",["a","z"]],"passed":true},{"actual":["b",["a"]],"check":"descend","expected":["b",["a"]],"passed":true},{"actual":["a",[]],"check":"collapse","expected":["a",["z"]],"passed":false},{"actual":["a",[]],"check":"parent","expected":["a",[]],"passed":true},{"actual":["a",[]],"check":"root","expected":["a",[]],"passed":true},{"actual":["a",[]],"check":"all","expected":["a",[]],"passed":true},{"actual":["a",["a"]],"check":"parameterized child count","expected":["a",["a"]],"passed":true},{"actual":["a",[]],"check":"repeat all","expected":["a",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"expand\", \"actual\": [\"a\", [\"a\", \"z\"]], \"expected\": [\"a\", [\"a\", \"z\"]], \"passed\": true}, {\"check\": \"descend\", \"actual\": [\"b\", [\"a\"]], \"expected\": [\"b\", [\"a\"]], \"passed\": true}, {\"check\": \"collapse\", \"actual\": [\"a\", []], \"expected\": [\"a\", [\"z\"]], \"passed\": false}, {\"check\": \"parent\", \"actual\": [\"a\", []], \"expected\": [\"a\", []], \"passed\": true}, {\"check\": \"root\", \"actual\": [\"a\", []], \"expected\": [\"a\", []], \"passed\": true}, {\"check\": \"all\", \"actual\": [\"a\", []], \"expected\": [\"a\", []], \"passed\": true}, {\"check\": \"parameterized child count\", \"actual\": [\"a\", [\"a\"]], \"expected\": [\"a\", [\"a\"]], \"passed\": true}, {\"check\": \"repeat all\", \"actual\": [\"a\", []], \"expected\": [\"a\", []], \"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."}}