{"abstract":"Filtered search returns an underfilled result page.","category":"Search retrieval semantics","checks":7,"contract":"Hits are [id,score,eligible], IDs unique. Return the highest ranked k eligible IDs with lexical score ties; k is nonnegative.","evaluation_group":"model-079f0e142c6e23ec","failed_approach":"Oversampling a fixed multiple still misses eligible hits farther down the candidate list.","family":"z-search-filter-before-topk","id":"FA-11871","implementations":{"attempt":{"sha256":"85b3d177f5556cd37960ff38ddfaad8c9b4c6e667caad09ba6587b8c752b14a8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(hits, k):\n    return [h[0] for h in sorted(hits,key=lambda h:(-h[1],h[0]))[:2*k] if h[2]][:k]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('deep eligible hit', solve([[str(i),100-i,False] for i in range(N+3)]+[['ok',0,True]],1),['ok'])\ncheck('eligible score order', solve([['b',N,True],['a',N+1,True]],2),['a','b'])\ncheck('score ties', solve([['b',N,True],['a',N,True]],1),['a'])\ncheck('zero limit', solve([['a',N,True]],0),[])\ncheck('empty candidates', solve([],N),[])\ncheck('all rejected', solve([['a',N,False]],1),[])\ncheck('short page exhausted', solve([['a',N,True]],5),['a'])\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":"4ce2d552f508e500a8f0c1986b6258f9885813fdb27ba33c08267f1c89649003","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(hits, k):\n    return [h[0] for h in sorted(hits,key=lambda h:(-h[1],h[0]))[:k] if h[2]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('deep eligible hit', solve([[str(i),100-i,False] for i in range(N+3)]+[['ok',0,True]],1),['ok'])\ncheck('eligible score order', solve([['b',N,True],['a',N+1,True]],2),['a','b'])\ncheck('score ties', solve([['b',N,True],['a',N,True]],1),['a'])\ncheck('zero limit', solve([['a',N,True]],0),[])\ncheck('empty candidates', solve([],N),[])\ncheck('all rejected', solve([['a',N,False]],1),[])\ncheck('short page exhausted', solve([['a',N,True]],5),['a'])\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"},"fixed":{"sha256":"05454f9b80779229ef491dfd8a92bab66cefdd406dccbee9b6dd2f2485da9c31","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(hits, k):\n    return [h[0] for h in sorted((h for h in hits if h[2]),key=lambda h:(-h[1],h[0]))[:k]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('deep eligible hit', solve([[str(i),100-i,False] for i in range(N+3)]+[['ok',0,True]],1),['ok'])\ncheck('eligible score order', solve([['b',N,True],['a',N+1,True]],2),['a','b'])\ncheck('score ties', solve([['b',N,True],['a',N,True]],1),['a'])\ncheck('zero limit', solve([['a',N,True]],0),[])\ncheck('empty candidates', solve([],N),[])\ncheck('all rejected', solve([['a',N,False]],1),[])\ncheck('short page exhausted', solve([['a',N,True]],5),['a'])\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 already tokenized or scored; this model makes no claim about production engine performance or linguistic analysis. 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":"z-search-filter-before-topk","generated_at":"2026-09-29T14:38:51.749573+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An offline deterministic retrieval model isolates this search contract from tokenization, storage, and network behavior.","repair":"Filter all candidates, sort by descending score and identifier, then truncate.","root_cause":"The rank cutoff is applied before eligibility filtering.","sha256":"071dae902cee60c74f1014bdd3841de520328b0c9813c8701208f00692de9ab9","title":"Filtered search returns an underfilled result page · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.467,"exit_code":1,"observations":[{"actual":[],"check":"deep eligible hit","expected":["ok"],"passed":false},{"actual":["a","b"],"check":"eligible score order","expected":["a","b"],"passed":true},{"actual":["a"],"check":"score ties","expected":["a"],"passed":true},{"actual":[],"check":"zero limit","expected":[],"passed":true},{"actual":[],"check":"empty candidates","expected":[],"passed":true},{"actual":[],"check":"all rejected","expected":[],"passed":true},{"actual":["a"],"check":"short page exhausted","expected":["a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"deep eligible hit\", \"actual\": [], \"expected\": [\"ok\"], \"passed\": false}, {\"check\": \"eligible score order\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"score ties\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"zero limit\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty candidates\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"all rejected\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"short page exhausted\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.931,"exit_code":1,"observations":[{"actual":[],"check":"deep eligible hit","expected":["ok"],"passed":false},{"actual":["a","b"],"check":"eligible score order","expected":["a","b"],"passed":true},{"actual":["a"],"check":"score ties","expected":["a"],"passed":true},{"actual":[],"check":"zero limit","expected":[],"passed":true},{"actual":[],"check":"empty candidates","expected":[],"passed":true},{"actual":[],"check":"all rejected","expected":[],"passed":true},{"actual":["a"],"check":"short page exhausted","expected":["a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"deep eligible hit\", \"actual\": [], \"expected\": [\"ok\"], \"passed\": false}, {\"check\": \"eligible score order\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"score ties\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"zero limit\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty candidates\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"all rejected\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"short page exhausted\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":37.852,"exit_code":0,"observations":[{"actual":["ok"],"check":"deep eligible hit","expected":["ok"],"passed":true},{"actual":["a","b"],"check":"eligible score order","expected":["a","b"],"passed":true},{"actual":["a"],"check":"score ties","expected":["a"],"passed":true},{"actual":[],"check":"zero limit","expected":[],"passed":true},{"actual":[],"check":"empty candidates","expected":[],"passed":true},{"actual":[],"check":"all rejected","expected":[],"passed":true},{"actual":["a"],"check":"short page exhausted","expected":["a"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"deep eligible hit\", \"actual\": [\"ok\"], \"expected\": [\"ok\"], \"passed\": true}, {\"check\": \"eligible score order\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"score ties\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"zero limit\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty candidates\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"all rejected\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"short page exhausted\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}