{"abstract":"Vector coordinates are compared lexicographically.","category":"Vector retrieval ranking","checks":6,"contract":"Rows [id,vector] rank by exact squared Euclidean distance to query, then ID.","contract_signature":"rows, query","evaluation_group":"vector-retrieval-lexicographic-vector-distance","failed_approach":"Manhattan distance changes the metric and ranks a different geometry.","family":"w3-vector-retrieval-ranking-lexicographic-vector-distance","id":"FA-99481","implementations":{"attempt":{"sha256":"268ea1b6b7fcf41f4d410d0b3fa9b283bfafda8eb0450ac6adf8ceca20155d9e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, query):\n    return [r[0] for r in sorted(rows,key=lambda r:sum(abs(a-b) for a,b in zip(r[1],query)))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nq=[N,0]\ncheck('large first coordinate',solve([['a',[N+1,0]],['b',[N,2]]],q),['a','b'])\ncheck('negative coordinate',solve([['a',[N-2,0]],['b',[N,1]]],q),['b','a'])\ncheck('squared beats manhattan',solve([['a',[3,0]],['b',[2,2]]],[0,0]),['b','a'])\ncheck('tie lexical',solve([['z',[N,1]],['a',[N,-1]]],q),['a','z'])\ncheck('exact match',solve([['x',q],['y',[N+1,0]]],q),['x','y'])\ncheck('empty',solve([],q),[])\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":"431b145190cbca38aa32ae41f12162e6cda044aafc8478b59c9a6e2493a91e00","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, query):\n    return [r[0] for r in sorted(rows,key=lambda r:tuple(r[1]))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nq=[N,0]\ncheck('large first coordinate',solve([['a',[N+1,0]],['b',[N,2]]],q),['a','b'])\ncheck('negative coordinate',solve([['a',[N-2,0]],['b',[N,1]]],q),['b','a'])\ncheck('squared beats manhattan',solve([['a',[3,0]],['b',[2,2]]],[0,0]),['b','a'])\ncheck('tie lexical',solve([['z',[N,1]],['a',[N,-1]]],q),['a','z'])\ncheck('exact match',solve([['x',q],['y',[N+1,0]]],q),['x','y'])\ncheck('empty',solve([],q),[])\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-lexicographic-vector-distance","generated_at":"2026-09-30T16:48:24.913108+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 candidate vector tuple itself is used as a ranking key.","sha256":"7fc72efe1ac9fad59e519d8a41be636e925a738cc12e0b1afcca71c05c8030eb","title":"Vector retrieval: Vector coordinates are compared lexicographically · 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.827,"exit_code":1,"observations":[{"actual":["a","b"],"check":"large first coordinate","expected":["a","b"],"passed":true},{"actual":["b","a"],"check":"negative coordinate","expected":["b","a"],"passed":true},{"actual":["a","b"],"check":"squared beats manhattan","expected":["b","a"],"passed":false},{"actual":["z","a"],"check":"tie lexical","expected":["a","z"],"passed":false},{"actual":["x","y"],"check":"exact match","expected":["x","y"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"large first coordinate\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"negative coordinate\", \"actual\": [\"b\", \"a\"], \"expected\": [\"b\", \"a\"], \"passed\": true}, {\"check\": \"squared beats manhattan\", \"actual\": [\"a\", \"b\"], \"expected\": [\"b\", \"a\"], \"passed\": false}, {\"check\": \"tie lexical\", \"actual\": [\"z\", \"a\"], \"expected\": [\"a\", \"z\"], \"passed\": false}, {\"check\": \"exact match\", \"actual\": [\"x\", \"y\"], \"expected\": [\"x\", \"y\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.997,"exit_code":1,"observations":[{"actual":["b","a"],"check":"large first coordinate","expected":["a","b"],"passed":false},{"actual":["a","b"],"check":"negative coordinate","expected":["b","a"],"passed":false},{"actual":["b","a"],"check":"squared beats manhattan","expected":["b","a"],"passed":true},{"actual":["a","z"],"check":"tie lexical","expected":["a","z"],"passed":true},{"actual":["x","y"],"check":"exact match","expected":["x","y"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"large first coordinate\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"negative coordinate\", \"actual\": [\"a\", \"b\"], \"expected\": [\"b\", \"a\"], \"passed\": false}, {\"check\": \"squared beats manhattan\", \"actual\": [\"b\", \"a\"], \"expected\": [\"b\", \"a\"], \"passed\": true}, {\"check\": \"tie lexical\", \"actual\": [\"a\", \"z\"], \"expected\": [\"a\", \"z\"], \"passed\": true}, {\"check\": \"exact match\", \"actual\": [\"x\", \"y\"], \"expected\": [\"x\", \"y\"], \"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."}}