{"abstract":"Scores are paired with the wrong candidate IDs.","category":"Vector retrieval ranking","checks":6,"contract":"Return IDs sorted by descending scores; IDs and scores are parallel arrays.","contract_signature":"ids, scores","evaluation_group":"vector-retrieval-payload-id-alignment","failed_approach":"Descending identifier ties still violate the requested lexical order.","family":"w3-vector-retrieval-ranking-payload-id-alignment","id":"FA-99531","implementations":{"attempt":{"sha256":"b6f593d9bf241e5b707e83c065e52a29ae12330804e6472edfde1e293cbde3d0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ids, scores):\n    return [ids[i] for i in sorted(range(len(ids)),key=lambda i:(-scores[i],tuple(-ord(c) for c in ids[i])))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('clear winner',solve(['a','b'],[N,N+4]),['b','a'])\ncheck('three scores',solve(['a','b','c'],[N+1,N+3,N+2]),['b','c','a'])\ncheck('tie IDs',solve(['z','a'],[N,N]),['a','z'])\ncheck('negative',solve(['a','b'],[-N,-N-2]),['a','b'])\ncheck('singleton',solve(['x'],[N]),['x'])\ncheck('empty',solve([],[]),[])\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":"eae1a46b766dc6db7a0becb9acdbf1a4abfe3e5f6e7e8bbb5e15b95e64d6b200","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(ids, scores):\n    return [ids[i] for i in sorted(range(len(ids)),key=lambda i:scores[i])]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('clear winner',solve(['a','b'],[N,N+4]),['b','a'])\ncheck('three scores',solve(['a','b','c'],[N+1,N+3,N+2]),['b','c','a'])\ncheck('tie IDs',solve(['z','a'],[N,N]),['a','z'])\ncheck('negative',solve(['a','b'],[-N,-N-2]),['a','b'])\ncheck('singleton',solve(['x'],[N]),['x'])\ncheck('empty',solve([],[]),[])\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-payload-id-alignment","generated_at":"2026-09-30T16:48:25.348618+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 index used to read scores is reversed or the score direction is ascending.","sha256":"5ec04c59ff6c06eb6ed21b6b44e1a4293bc8d10041bfedc67e3c3ae576805e9f","title":"Vector retrieval: Scores are paired with the wrong candidate IDs · 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":28.346,"exit_code":1,"observations":[{"actual":["b","a"],"check":"clear winner","expected":["b","a"],"passed":true},{"actual":["b","c","a"],"check":"three scores","expected":["b","c","a"],"passed":true},{"actual":["z","a"],"check":"tie IDs","expected":["a","z"],"passed":false},{"actual":["a","b"],"check":"negative","expected":["a","b"],"passed":true},{"actual":["x"],"check":"singleton","expected":["x"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"clear winner\", \"actual\": [\"b\", \"a\"], \"expected\": [\"b\", \"a\"], \"passed\": true}, {\"check\": \"three scores\", \"actual\": [\"b\", \"c\", \"a\"], \"expected\": [\"b\", \"c\", \"a\"], \"passed\": true}, {\"check\": \"tie IDs\", \"actual\": [\"z\", \"a\"], \"expected\": [\"a\", \"z\"], \"passed\": false}, {\"check\": \"negative\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":26.683,"exit_code":1,"observations":[{"actual":["a","b"],"check":"clear winner","expected":["b","a"],"passed":false},{"actual":["a","c","b"],"check":"three scores","expected":["b","c","a"],"passed":false},{"actual":["z","a"],"check":"tie IDs","expected":["a","z"],"passed":false},{"actual":["b","a"],"check":"negative","expected":["a","b"],"passed":false},{"actual":["x"],"check":"singleton","expected":["x"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"clear winner\", \"actual\": [\"a\", \"b\"], \"expected\": [\"b\", \"a\"], \"passed\": false}, {\"check\": \"three scores\", \"actual\": [\"a\", \"c\", \"b\"], \"expected\": [\"b\", \"c\", \"a\"], \"passed\": false}, {\"check\": \"tie IDs\", \"actual\": [\"z\", \"a\"], \"expected\": [\"a\", \"z\"], \"passed\": false}, {\"check\": \"negative\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"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."}}