{"abstract":"Duplicate IDs keep the first shard score.","category":"Vector retrieval ranking","checks":6,"contract":"Across shards, repeated IDs retain their maximum score before global ranking.","contract_signature":"shards","evaluation_group":"vector-retrieval-stale-candidate-score","failed_approach":"Choosing the minimum loses a stronger later shard result.","family":"w3-vector-retrieval-ranking-stale-candidate-score","id":"FA-99526","implementations":{"attempt":{"sha256":"faf203eeb46123674fcb59b8102944ca62ebebaf867881073761cf95a1710fea","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shards):\n    scores={}\n    for shard in shards:\n     for ident,score in shard: scores[ident]=min(score,scores.get(ident,score))\n    return sorted(scores,key=lambda x:(-scores[x],x))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('later better',solve([[['a',N]], [['a',N+4],['b',N+2]]]),['a','b'])\ncheck('first better',solve([[['a',N+5]], [['a',N],['b',N+2]]]),['a','b'])\ncheck('duplicates collapse',solve([[['x',1],['x',2]]]),['x'])\ncheck('ties',solve([[['z',N]], [['a',N]]]),['a','z'])\ncheck('empty',solve([[],[]]),[])\ncheck('three shards',solve([[['a',1]],[['b',N+2]],[['a',N+3]]]),['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":"3774e0aeb8c8d9ee507501f0ad538f48e2465c6c4938682606598ce5e5b2221e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shards):\n    scores={}\n    for shard in shards:\n     for ident,score in shard: scores.setdefault(ident,score)\n    return sorted(scores,key=lambda x:(-scores[x],x))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('later better',solve([[['a',N]], [['a',N+4],['b',N+2]]]),['a','b'])\ncheck('first better',solve([[['a',N+5]], [['a',N],['b',N+2]]]),['a','b'])\ncheck('duplicates collapse',solve([[['x',1],['x',2]]]),['x'])\ncheck('ties',solve([[['z',N]], [['a',N]]]),['a','z'])\ncheck('empty',solve([[],[]]),[])\ncheck('three shards',solve([[['a',1]],[['b',N+2]],[['a',N+3]]]),['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-stale-candidate-score","generated_at":"2026-09-30T16:48:25.348111+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":"The merge preserves first-seen scores or chooses the minimum score.","sha256":"4f9b34c077b88f66b203b1d0d78123d8fa729712ff038174ff320791f32d02bd","title":"Vector retrieval: Duplicate IDs keep the first shard score · 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":26.059,"exit_code":1,"observations":[{"actual":["b","a"],"check":"later better","expected":["a","b"],"passed":false},{"actual":["b","a"],"check":"first better","expected":["a","b"],"passed":false},{"actual":["x"],"check":"duplicates collapse","expected":["x"],"passed":true},{"actual":["a","z"],"check":"ties","expected":["a","z"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["b","a"],"check":"three shards","expected":["a","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"later better\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"first better\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"duplicates collapse\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"ties\", \"actual\": [\"a\", \"z\"], \"expected\": [\"a\", \"z\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"three shards\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.237,"exit_code":1,"observations":[{"actual":["b","a"],"check":"later better","expected":["a","b"],"passed":false},{"actual":["a","b"],"check":"first better","expected":["a","b"],"passed":true},{"actual":["x"],"check":"duplicates collapse","expected":["x"],"passed":true},{"actual":["a","z"],"check":"ties","expected":["a","z"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["b","a"],"check":"three shards","expected":["a","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"later better\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"first better\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"duplicates collapse\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"ties\", \"actual\": [\"a\", \"z\"], \"expected\": [\"a\", \"z\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"three 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."}}