{"abstract":"Rank-ordered evidence crowds out other sources.","category":"RAG context assembly","checks":6,"contract":"Rows are [source,text] in rank order. Return at most k by round-robin passes across sources in first-seen order.","contract_signature":"rows, k","evaluation_group":"ragctx-round-robin","failed_approach":"Sorting sources alphabetically changes the intended first-seen source order.","family":"w3-rag-context-assembly-round-robin-sources","id":"FA-99571","implementations":{"attempt":{"sha256":"bff1de75772580dc4b8a10b7002e02909039373e0869a1fdbcd36a2a9066aed0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, k):\n    groups={}\n    for s,t in rows: groups.setdefault(s,[]).append([s,t])\n    return [r for s in sorted(groups) for r in groups[s]][:k]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\na='z'+str(N); b='a'+str(N)\ncheck('balanced top three', solve([[a,'1'],[a,'2'],[b,'3'],[b,'4']],3), [[a,'1'],[b,'3'],[a,'2']])\ncheck('single source order', solve([[a,'1'],[a,'2']],2), [[a,'1'],[a,'2']])\ncheck('k zero', solve([[a,'1']],0), [])\ncheck('empty', solve([],N), [])\ncheck('new source later', solve([[a,'1'],[a,'2'],[b,'3']],4), [[a,'1'],[b,'3'],[a,'2']])\ncheck('one each', solve([[b,'1'],[a,'2']],2), [[b,'1'],[a,'2']])\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":"86207b285fadb0a9ab8b6aeb5b7c23c3cab8f1437a2ce236306ea43f634217c8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, k):\n    return rows[:k]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\na='z'+str(N); b='a'+str(N)\ncheck('balanced top three', solve([[a,'1'],[a,'2'],[b,'3'],[b,'4']],3), [[a,'1'],[b,'3'],[a,'2']])\ncheck('single source order', solve([[a,'1'],[a,'2']],2), [[a,'1'],[a,'2']])\ncheck('k zero', solve([[a,'1']],0), [])\ncheck('empty', solve([],N), [])\ncheck('new source later', solve([[a,'1'],[a,'2'],[b,'3']],4), [[a,'1'],[b,'3'],[a,'2']])\ncheck('one each', solve([[b,'1'],[a,'2']],2), [[b,'1'],[a,'2']])\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":"Toy inputs and token counts only; this does not claim compatibility with a tokenizer, prompt format, or production retrieval system. 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-rag-context-assembly-round-robin-sources","generated_at":"2026-09-30T16:48:25.802004+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small deterministic evidence assembly model makes context budgeting behavior inspectable.","root_cause":"Candidates are emitted in one global ranking order even when source coverage is required.","sha256":"83081b8fb246f0a4097ac9522316a6d53c603e343beb210d30ac61dc3685f9ed","title":"Rank-ordered evidence crowds out other sources · 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":31.513,"exit_code":1,"observations":[{"actual":[["a1","3"],["a1","4"],["z1","1"]],"check":"balanced top three","expected":[["z1","1"],["a1","3"],["z1","2"]],"passed":false},{"actual":[["z1","1"],["z1","2"]],"check":"single source order","expected":[["z1","1"],["z1","2"]],"passed":true},{"actual":[],"check":"k zero","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["a1","3"],["z1","1"],["z1","2"]],"check":"new source later","expected":[["z1","1"],["a1","3"],["z1","2"]],"passed":false},{"actual":[["a1","1"],["z1","2"]],"check":"one each","expected":[["a1","1"],["z1","2"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"balanced top three\", \"actual\": [[\"a1\", \"3\"], [\"a1\", \"4\"], [\"z1\", \"1\"]], \"expected\": [[\"z1\", \"1\"], [\"a1\", \"3\"], [\"z1\", \"2\"]], \"passed\": false}, {\"check\": \"single source order\", \"actual\": [[\"z1\", \"1\"], [\"z1\", \"2\"]], \"expected\": [[\"z1\", \"1\"], [\"z1\", \"2\"]], \"passed\": true}, {\"check\": \"k zero\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"new source later\", \"actual\": [[\"a1\", \"3\"], [\"z1\", \"1\"], [\"z1\", \"2\"]], \"expected\": [[\"z1\", \"1\"], [\"a1\", \"3\"], [\"z1\", \"2\"]], \"passed\": false}, {\"check\": \"one each\", \"actual\": [[\"a1\", \"1\"], [\"z1\", \"2\"]], \"expected\": [[\"a1\", \"1\"], [\"z1\", \"2\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.948,"exit_code":1,"observations":[{"actual":[["z1","1"],["z1","2"],["a1","3"]],"check":"balanced top three","expected":[["z1","1"],["a1","3"],["z1","2"]],"passed":false},{"actual":[["z1","1"],["z1","2"]],"check":"single source order","expected":[["z1","1"],["z1","2"]],"passed":true},{"actual":[],"check":"k zero","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["z1","1"],["z1","2"],["a1","3"]],"check":"new source later","expected":[["z1","1"],["a1","3"],["z1","2"]],"passed":false},{"actual":[["a1","1"],["z1","2"]],"check":"one each","expected":[["a1","1"],["z1","2"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"balanced top three\", \"actual\": [[\"z1\", \"1\"], [\"z1\", \"2\"], [\"a1\", \"3\"]], \"expected\": [[\"z1\", \"1\"], [\"a1\", \"3\"], [\"z1\", \"2\"]], \"passed\": false}, {\"check\": \"single source order\", \"actual\": [[\"z1\", \"1\"], [\"z1\", \"2\"]], \"expected\": [[\"z1\", \"1\"], [\"z1\", \"2\"]], \"passed\": true}, {\"check\": \"k zero\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"new source later\", \"actual\": [[\"z1\", \"1\"], [\"z1\", \"2\"], [\"a1\", \"3\"]], \"expected\": [[\"z1\", \"1\"], [\"a1\", \"3\"], [\"z1\", \"2\"]], \"passed\": false}, {\"check\": \"one each\", \"actual\": [[\"a1\", \"1\"], [\"z1\", \"2\"]], \"expected\": [[\"a1\", \"1\"], [\"z1\", \"2\"]], \"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."}}