{"abstract":"New sort columns start descending despite ascending contract.","category":"Table interactions","checks":9,"contract":"New sort is ascending; activation cycles ascending to descending to removed when allowed; single mode replaces all sorts; multi mode preserves priorities when changing direction.","contract_signature":"sorting, column, multi, removable","evaluation_group":"xi-sort-indicator","failed_approach":"Skipping the entry prevents starting sorting.","family":"xi-sort-indicator-new-column","id":"FA-8931","implementations":{"attempt":{"sha256":"295c0140a2b135fe6eecc104b056e537ad69c8e029c8ba72bd989d0dd8fe2968","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sorting, column, multi, removable):\n    sorting = list(sorting)\n    index = next((i for i, (c, d) in enumerate(sorting) if c == column), None)\n    if index is None: entry = None\n    elif sorting[index][1] == 'asc': entry = (column, 'desc')\n    else: entry = None if removable else (column, 'asc')\n    if not multi: return [entry] if entry else []\n    if index is None: return sorting + [entry]\n    if entry is None: return sorting[:index] + sorting[index+1:]\n    sorting[index] = entry\n    return sorting\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('new', solve([], 'a', False, True), [('a', 'asc')])\ncheck('reverse', solve([('a','asc')], 'a', False, True), [('a', 'desc')])\ncheck('locked', solve([('a','desc')], 'a', False, False), [('a', 'asc')])\ncheck('remove', solve([('a','desc')], 'a', False, True), [])\ncheck('single', solve([('a','asc')], 'b', False, True), [('b', 'asc')])\ncheck('priority', solve([('a','asc'),('b','asc')], 'a', True, True), [('a', 'desc'), ('b', 'asc')])\ncheck('append', solve([('a','asc')], 'b', True, True), [('a', 'asc'), ('b', 'asc')])\ncheck('parameterized sort identity', solve([],str(N),False,True), [(str(N),'asc')])\nfor repetition in range(N):\n    check('repeat append', solve([('a','asc')], 'b', True, True), [('a', 'asc'), ('b', 'asc')])\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":"490b0f846b4e2fb656b5d1b7d407ab4340b128d6e455e73a3c23538a5b9d0a87","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sorting, column, multi, removable):\n    sorting = list(sorting)\n    index = next((i for i, (c, d) in enumerate(sorting) if c == column), None)\n    if index is None: entry = (column, 'desc')\n    elif sorting[index][1] == 'asc': entry = (column, 'desc')\n    else: entry = None if removable else (column, 'asc')\n    if not multi: return [entry] if entry else []\n    if index is None: return sorting + [entry]\n    if entry is None: return sorting[:index] + sorting[index+1:]\n    sorting[index] = entry\n    return sorting\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('new', solve([], 'a', False, True), [('a', 'asc')])\ncheck('reverse', solve([('a','asc')], 'a', False, True), [('a', 'desc')])\ncheck('locked', solve([('a','desc')], 'a', False, False), [('a', 'asc')])\ncheck('remove', solve([('a','desc')], 'a', False, True), [])\ncheck('single', solve([('a','asc')], 'b', False, True), [('b', 'asc')])\ncheck('priority', solve([('a','asc'),('b','asc')], 'a', True, True), [('a', 'desc'), ('b', 'asc')])\ncheck('append', solve([('a','asc')], 'b', True, True), [('a', 'asc'), ('b', 'asc')])\ncheck('parameterized sort identity', solve([],str(N),False,True), [(str(N),'asc')])\nfor repetition in range(N):\n    check('repeat append', solve([('a','asc')], 'b', True, True), [('a', 'asc'), ('b', 'asc')])\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-sort-indicator-new-column","generated_at":"2026-09-29T14:38:25.741482+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of multi-column sort interaction; this isolates one interface invariant without requiring a browser.","root_cause":"The new column operation uses `if index is None: entry = (column, 'desc')` where the contract requires `if index is None: entry = (column, 'asc')`.","sha256":"064b50730288a724f67533d53bd915d2b2d3c7b6e01574535874167a60fdcd1d","title":"Multi-column sort interaction: New sort columns start descending despite ascending contract · 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":40.708,"exit_code":1,"observations":[{"actual":[],"check":"new","expected":[["a","asc"]],"passed":false},{"actual":[["a","desc"]],"check":"reverse","expected":[["a","desc"]],"passed":true},{"actual":[["a","asc"]],"check":"locked","expected":[["a","asc"]],"passed":true},{"actual":[],"check":"remove","expected":[],"passed":true},{"actual":[],"check":"single","expected":[["b","asc"]],"passed":false},{"actual":[["a","desc"],["b","asc"]],"check":"priority","expected":[["a","desc"],["b","asc"]],"passed":true},{"actual":[["a","asc"],null],"check":"append","expected":[["a","asc"],["b","asc"]],"passed":false},{"actual":[],"check":"parameterized sort identity","expected":[["1","asc"]],"passed":false},{"actual":[["a","asc"],null],"check":"repeat append","expected":[["a","asc"],["b","asc"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"new\", \"actual\": [], \"expected\": [[\"a\", \"asc\"]], \"passed\": false}, {\"check\": \"reverse\", \"actual\": [[\"a\", \"desc\"]], \"expected\": [[\"a\", \"desc\"]], \"passed\": true}, {\"check\": \"locked\", \"actual\": [[\"a\", \"asc\"]], \"expected\": [[\"a\", \"asc\"]], \"passed\": true}, {\"check\": \"remove\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single\", \"actual\": [], \"expected\": [[\"b\", \"asc\"]], \"passed\": false}, {\"check\": \"priority\", \"actual\": [[\"a\", \"desc\"], [\"b\", \"asc\"]], \"expected\": [[\"a\", \"desc\"], [\"b\", \"asc\"]], \"passed\": true}, {\"check\": \"append\", \"actual\": [[\"a\", \"asc\"], null], \"expected\": [[\"a\", \"asc\"], [\"b\", \"asc\"]], \"passed\": false}, {\"check\": \"parameterized sort identity\", \"actual\": [], \"expected\": [[\"1\", \"asc\"]], \"passed\": false}, {\"check\": \"repeat append\", \"actual\": [[\"a\", \"asc\"], null], \"expected\": [[\"a\", \"asc\"], [\"b\", \"asc\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.188,"exit_code":1,"observations":[{"actual":[["a","desc"]],"check":"new","expected":[["a","asc"]],"passed":false},{"actual":[["a","desc"]],"check":"reverse","expected":[["a","desc"]],"passed":true},{"actual":[["a","asc"]],"check":"locked","expected":[["a","asc"]],"passed":true},{"actual":[],"check":"remove","expected":[],"passed":true},{"actual":[["b","desc"]],"check":"single","expected":[["b","asc"]],"passed":false},{"actual":[["a","desc"],["b","asc"]],"check":"priority","expected":[["a","desc"],["b","asc"]],"passed":true},{"actual":[["a","asc"],["b","desc"]],"check":"append","expected":[["a","asc"],["b","asc"]],"passed":false},{"actual":[["1","desc"]],"check":"parameterized sort identity","expected":[["1","asc"]],"passed":false},{"actual":[["a","asc"],["b","desc"]],"check":"repeat append","expected":[["a","asc"],["b","asc"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"new\", \"actual\": [[\"a\", \"desc\"]], \"expected\": [[\"a\", \"asc\"]], \"passed\": false}, {\"check\": \"reverse\", \"actual\": [[\"a\", \"desc\"]], \"expected\": [[\"a\", \"desc\"]], \"passed\": true}, {\"check\": \"locked\", \"actual\": [[\"a\", \"asc\"]], \"expected\": [[\"a\", \"asc\"]], \"passed\": true}, {\"check\": \"remove\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single\", \"actual\": [[\"b\", \"desc\"]], \"expected\": [[\"b\", \"asc\"]], \"passed\": false}, {\"check\": \"priority\", \"actual\": [[\"a\", \"desc\"], [\"b\", \"asc\"]], \"expected\": [[\"a\", \"desc\"], [\"b\", \"asc\"]], \"passed\": true}, {\"check\": \"append\", \"actual\": [[\"a\", \"asc\"], [\"b\", \"desc\"]], \"expected\": [[\"a\", \"asc\"], [\"b\", \"asc\"]], \"passed\": false}, {\"check\": \"parameterized sort identity\", \"actual\": [[\"1\", \"desc\"]], \"expected\": [[\"1\", \"asc\"]], \"passed\": false}, {\"check\": \"repeat append\", \"actual\": [[\"a\", \"asc\"], [\"b\", \"desc\"]], \"expected\": [[\"a\", \"asc\"], [\"b\", \"asc\"]], \"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."}}