{"abstract":"Equal-offset shard fragments retain arrival order.","category":"Distributed training aggregation","checks":6,"contract":"Rows [shard_index,worker_id,values]; sort by both keys and concatenate.","contract_signature":"rows","evaluation_group":"w3-dta-rank-sort-stable","failed_approach":"Sorting tied fragments by payload length ignores stable owner IDs and can preserve the wrong arrival order.","family":"w3-distributed-training-aggregation-rank-sort-stable","id":"FA-99331","implementations":{"attempt":{"sha256":"cba68676610366af122f76c4caa0d3b92291e780b6ba5ab3ada556ca3cbd578c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    return [v for s,w,vs in sorted(rows,key=lambda r:(r[0],len(r[2]))) for v in vs]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('tie arrival reversed',solve([[0,'b',['b']],[0,'a',['a']]]),['a','b'])\ncheck('different shard first',solve([[1,'a',['c']],[0,'z',['a']]]),['a','c'])\ncheck('empty',solve([]),[])\ncheck('singleton',solve([[N,'w',[N]]]),[N])\ncheck('width cannot order ties',solve([[0,'z',[1,2]],[0,'a',[3]]]),[3,1,2])\ncheck('three owners',solve([[2,'b',['c']],[1,'a',['b']],[0,'a',['a']]]),['a','b','c'])\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":"785bfcdff336edaaf09ef4606a4b1a1061b529fdc58fbd83a1f8bd88a0f099fb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    return [v for s,w,vs in sorted(rows,key=lambda r:r[0]) for v in vs]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('tie arrival reversed',solve([[0,'b',['b']],[0,'a',['a']]]),['a','b'])\ncheck('different shard first',solve([[1,'a',['c']],[0,'z',['a']]]),['a','c'])\ncheck('empty',solve([]),[])\ncheck('singleton',solve([[N,'w',[N]]]),[N])\ncheck('width cannot order ties',solve([[0,'z',[1,2]],[0,'a',[3]]]),[3,1,2])\ncheck('three owners',solve([[2,'b',['c']],[1,'a',['b']],[0,'a',['a']]]),['a','b','c'])\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":"Inputs are already materialized Python values from a fixed toy collective; no transport, failure recovery, optimizer state, or real model behavior is represented. 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-distributed-training-aggregation-rank-sort-stable","generated_at":"2026-09-30T16:48:23.079372+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A toy distributed-training contract makes replica and shard contribution rules explicit without claiming framework compatibility or performance.","root_cause":"Shard index ties need a deterministic secondary ownership key.","sha256":"61495cfbb48a8bed8a560289f8db42af6d94dcd3364e8a0cbef0f1ffe3edbf67","title":"Equal-offset shard fragments retain arrival order · 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.622,"exit_code":1,"observations":[{"actual":["b","a"],"check":"tie arrival reversed","expected":["a","b"],"passed":false},{"actual":["a","c"],"check":"different shard first","expected":["a","c"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[1],"check":"singleton","expected":[1],"passed":true},{"actual":[3,1,2],"check":"width cannot order ties","expected":[3,1,2],"passed":true},{"actual":["a","b","c"],"check":"three owners","expected":["a","b","c"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"tie arrival reversed\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"different shard first\", \"actual\": [\"a\", \"c\"], \"expected\": [\"a\", \"c\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"width cannot order ties\", \"actual\": [3, 1, 2], \"expected\": [3, 1, 2], \"passed\": true}, {\"check\": \"three owners\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":26.024,"exit_code":1,"observations":[{"actual":["b","a"],"check":"tie arrival reversed","expected":["a","b"],"passed":false},{"actual":["a","c"],"check":"different shard first","expected":["a","c"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[1],"check":"singleton","expected":[1],"passed":true},{"actual":[1,2,3],"check":"width cannot order ties","expected":[3,1,2],"passed":false},{"actual":["a","b","c"],"check":"three owners","expected":["a","b","c"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"tie arrival reversed\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"different shard first\", \"actual\": [\"a\", \"c\"], \"expected\": [\"a\", \"c\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"width cannot order ties\", \"actual\": [1, 2, 3], \"expected\": [3, 1, 2], \"passed\": false}, {\"check\": \"three owners\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"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."}}