{"abstract":"Per-shard top results are concatenated without global ranking.","category":"Vector retrieval ranking","checks":6,"contract":"Shard lists contain [id,score], unique IDs; globally return top k by score then ID.","contract_signature":"shards, k","evaluation_group":"vector-retrieval-shard-merge","failed_approach":"Sorting ascending fixes merge order in the wrong score direction.","family":"w3-vector-retrieval-ranking-shard-merge","id":"FA-99521","implementations":{"attempt":{"sha256":"948d230f7c51df7e9725d5173556c9cab36f7e67fa83f258fd8555596e0e4789","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shards, k):\n    return [r[0] for r in sorted([r for shard in shards for r in shard],key=lambda r:r[1])[:k]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('global winner',solve([[['a',N]], [['b',N+4]]],1),['b'])\ncheck('tie across shards',solve([[['z',N]], [['a',N]]],2),['a','z'])\ncheck('third shard',solve([[['x',1]],[['y',N+2]],[['z',N+3]]],2),['z','y'])\ncheck('zero limit',solve([[['a',N]]],0),[])\ncheck('empty shards',solve([[],[]],N),[])\ncheck('reordered shards',solve([[['b',N+1]],[['a',N+2]]],2),['a','b'])\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":"6ec991e5969b05c268d9d8d0c98be79387c5908cd319c705d16205d84fe90b9f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shards, k):\n    return [r[0] for shard in shards for r in shard][:k]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('global winner',solve([[['a',N]], [['b',N+4]]],1),['b'])\ncheck('tie across shards',solve([[['z',N]], [['a',N]]],2),['a','z'])\ncheck('third shard',solve([[['x',1]],[['y',N+2]],[['z',N+3]]],2),['z','y'])\ncheck('zero limit',solve([[['a',N]]],0),[])\ncheck('empty shards',solve([[],[]],N),[])\ncheck('reordered shards',solve([[['b',N+1]],[['a',N+2]]],2),['a','b'])\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 small exact toy vectors and scores. No production index, ANN recall, embedding quality, or latency claim is implied. 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-vector-retrieval-ranking-shard-merge","generated_at":"2026-09-30T16:48:25.348868+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An offline vector retrieval toy model isolates one ranking contract from embedding generation, storage, and serving.","root_cause":"Each shard’s local order is concatenated and treated as globally ranked.","sha256":"de958229903c05074056368b36bcb7855a2fb22349f0763628a12d9cbe2333b1","title":"Vector retrieval: Per-shard top results are concatenated without global ranking · 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.683,"exit_code":1,"observations":[{"actual":["a"],"check":"global winner","expected":["b"],"passed":false},{"actual":["z","a"],"check":"tie across shards","expected":["a","z"],"passed":false},{"actual":["x","y"],"check":"third shard","expected":["z","y"],"passed":false},{"actual":[],"check":"zero limit","expected":[],"passed":true},{"actual":[],"check":"empty shards","expected":[],"passed":true},{"actual":["b","a"],"check":"reordered shards","expected":["a","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"global winner\", \"actual\": [\"a\"], \"expected\": [\"b\"], \"passed\": false}, {\"check\": \"tie across shards\", \"actual\": [\"z\", \"a\"], \"expected\": [\"a\", \"z\"], \"passed\": false}, {\"check\": \"third shard\", \"actual\": [\"x\", \"y\"], \"expected\": [\"z\", \"y\"], \"passed\": false}, {\"check\": \"zero limit\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty shards\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"reordered shards\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.012,"exit_code":1,"observations":[{"actual":["a"],"check":"global winner","expected":["b"],"passed":false},{"actual":["z","a"],"check":"tie across shards","expected":["a","z"],"passed":false},{"actual":["x","y"],"check":"third shard","expected":["z","y"],"passed":false},{"actual":[],"check":"zero limit","expected":[],"passed":true},{"actual":[],"check":"empty shards","expected":[],"passed":true},{"actual":["b","a"],"check":"reordered shards","expected":["a","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"global winner\", \"actual\": [\"a\"], \"expected\": [\"b\"], \"passed\": false}, {\"check\": \"tie across shards\", \"actual\": [\"z\", \"a\"], \"expected\": [\"a\", \"z\"], \"passed\": false}, {\"check\": \"third shard\", \"actual\": [\"x\", \"y\"], \"expected\": [\"z\", \"y\"], \"passed\": false}, {\"check\": \"zero limit\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty shards\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"reordered shards\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"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."}}