{"abstract":"Multi-vector aggregation uses the maximum chunk distance.","category":"Vector retrieval ranking","checks":6,"contract":"Rows [doc,distance] aggregate by minimum distance per document; nearest first.","contract_signature":"hits","evaluation_group":"vector-retrieval-min-distance-aggregation","failed_approach":"Taking the minimum then sorting descending reverses nearest-first ordering.","family":"w3-vector-retrieval-ranking-min-distance-aggregation","id":"FA-99476","implementations":{"attempt":{"sha256":"d4961ae87211a8e1e0e91e98ee90f603f2c039409448972ce022a8615a08735c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(hits):\n    scores={}\n    for d,v in hits: scores[d]=min(v,scores.get(d,v))\n    return sorted(scores,key=lambda d:(-scores[d],d))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('nearest chunk wins',solve([['a',N+5],['a',N],['b',N+2]]),['a','b'])\ncheck('input order independent',solve([['b',N+2],['a',N+4],['a',N+1]]),['a','b'])\ncheck('single chunk order',solve([['z',9],['a',2]]),['a','z'])\ncheck('negative distances toy',solve([['a',-1],['b',0]]),['a','b'])\ncheck('empty',solve([]),[])\ncheck('three docs',solve([['c',8],['b',1],['a',5]]),['b','a','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":"1b0773b21157fd0e8aea7d65b1f0414a6ca5f20d8eba46d5219bd77a1dd89174","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(hits):\n    scores={}\n    for d,v in hits: scores[d]=max(v,scores.get(d,v))\n    return sorted(scores,key=lambda d:(scores[d],d))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('nearest chunk wins',solve([['a',N+5],['a',N],['b',N+2]]),['a','b'])\ncheck('input order independent',solve([['b',N+2],['a',N+4],['a',N+1]]),['a','b'])\ncheck('single chunk order',solve([['z',9],['a',2]]),['a','z'])\ncheck('negative distances toy',solve([['a',-1],['b',0]]),['a','b'])\ncheck('empty',solve([]),[])\ncheck('three docs',solve([['c',8],['b',1],['a',5]]),['b','a','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 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-min-distance-aggregation","generated_at":"2026-09-30T16:48:24.474137+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":"Document distance uses the maximum chunk distance, so a far vector controls the document score.","sha256":"7991219ba4ce5e12bbc989d6909a6144847190295405c14fbe5ffcf7c1e967ac","title":"Vector retrieval: Multi-vector aggregation uses the maximum chunk distance · 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.442,"exit_code":1,"observations":[{"actual":["b","a"],"check":"nearest chunk wins","expected":["a","b"],"passed":false},{"actual":["b","a"],"check":"input order independent","expected":["a","b"],"passed":false},{"actual":["z","a"],"check":"single chunk order","expected":["a","z"],"passed":false},{"actual":["b","a"],"check":"negative distances toy","expected":["a","b"],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["c","a","b"],"check":"three docs","expected":["b","a","c"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"nearest chunk wins\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"input order independent\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"single chunk order\", \"actual\": [\"z\", \"a\"], \"expected\": [\"a\", \"z\"], \"passed\": false}, {\"check\": \"negative distances toy\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"three docs\", \"actual\": [\"c\", \"a\", \"b\"], \"expected\": [\"b\", \"a\", \"c\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":26.889,"exit_code":1,"observations":[{"actual":["b","a"],"check":"nearest chunk wins","expected":["a","b"],"passed":false},{"actual":["b","a"],"check":"input order independent","expected":["a","b"],"passed":false},{"actual":["a","z"],"check":"single chunk order","expected":["a","z"],"passed":true},{"actual":["a","b"],"check":"negative distances toy","expected":["a","b"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["b","a","c"],"check":"three docs","expected":["b","a","c"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"nearest chunk wins\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"input order independent\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"single chunk order\", \"actual\": [\"a\", \"z\"], \"expected\": [\"a\", \"z\"], \"passed\": true}, {\"check\": \"negative distances toy\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"three docs\", \"actual\": [\"b\", \"a\", \"c\"], \"expected\": [\"b\", \"a\", \"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."}}