{"abstract":"The assembler fills budget without required source coverage.","category":"RAG context assembly","checks":6,"contract":"Rows are [source,text,cost]. Include the first fitting row for each required source in required order, then scan remaining rows in rank order without exceeding budget.","contract_signature":"rows, required, budget","evaluation_group":"ragctx-coverage","failed_approach":"Reserving a source name without checking its chunk cost can exceed budget.","family":"w3-rag-context-assembly-minimum-source-coverage","id":"FA-99586","implementations":{"attempt":{"sha256":"81a5ff8c597a72136ab18372e326f944f43e30c20029ddd9794f256814299e5c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, required, budget):\n    chosen=[]; used=0\n    for s in required:\n        row=next((r for r in rows if r[0]==s),None)\n        if row: chosen.append(row); used+=row[2]\n    return [[s,t] for s,t,c in chosen]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\na='A'+str(N); b='B'+str(N)\ncheck('reserve distinct sources', solve([[a,'a',2],[a,'aa',1],[b,'b',1]], [b],3), [[b,'b'],[a,'a']])\ncheck('required order', solve([[a,'a',1],[b,'b',1]], [b,a],2), [[b,'b'],[a,'a']])\ncheck('too costly source skipped', solve([[a,'a',N+1],[b,'b',1]], [a],N), [[b,'b']])\ncheck('no required', solve([[a,'a',1]], [],1), [[a,'a']])\ncheck('empty', solve([], [a],N), [])\ncheck('budget zero', solve([[a,'a',0]], [a],0), [[a,'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":"5d9f5eb4ce17ad9ff64f45c7ac8a1c29822757bc429455574063e297c72136cd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, required, budget):\n    out=[]; used=0\n    for s,t,c in rows:\n        if used+c<=budget: out.append([s,t]); used+=c\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\na='A'+str(N); b='B'+str(N)\ncheck('reserve distinct sources', solve([[a,'a',2],[a,'aa',1],[b,'b',1]], [b],3), [[b,'b'],[a,'a']])\ncheck('required order', solve([[a,'a',1],[b,'b',1]], [b,a],2), [[b,'b'],[a,'a']])\ncheck('too costly source skipped', solve([[a,'a',N+1],[b,'b',1]], [a],N), [[b,'b']])\ncheck('no required', solve([[a,'a',1]], [],1), [[a,'a']])\ncheck('empty', solve([], [a],N), [])\ncheck('budget zero', solve([[a,'a',0]], [a],0), [[a,'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":"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-minimum-source-coverage","generated_at":"2026-09-30T16:48:25.802704+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":"A greedy rank scan fills the context before checking the requested source set.","sha256":"36e5ff6f35f3049db1e063bc56d9116a6467e1ba4dae13f6de150bc83ed83d19","title":"The assembler fills budget without required source coverage · 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":29.289,"exit_code":1,"observations":[{"actual":[["B1","b"]],"check":"reserve distinct sources","expected":[["B1","b"],["A1","a"]],"passed":false},{"actual":[["B1","b"],["A1","a"]],"check":"required order","expected":[["B1","b"],["A1","a"]],"passed":true},{"actual":[["A1","a"]],"check":"too costly source skipped","expected":[["B1","b"]],"passed":false},{"actual":[],"check":"no required","expected":[["A1","a"]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["A1","a"]],"check":"budget zero","expected":[["A1","a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reserve distinct sources\", \"actual\": [[\"B1\", \"b\"]], \"expected\": [[\"B1\", \"b\"], [\"A1\", \"a\"]], \"passed\": false}, {\"check\": \"required order\", \"actual\": [[\"B1\", \"b\"], [\"A1\", \"a\"]], \"expected\": [[\"B1\", \"b\"], [\"A1\", \"a\"]], \"passed\": true}, {\"check\": \"too costly source skipped\", \"actual\": [[\"A1\", \"a\"]], \"expected\": [[\"B1\", \"b\"]], \"passed\": false}, {\"check\": \"no required\", \"actual\": [], \"expected\": [[\"A1\", \"a\"]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"budget zero\", \"actual\": [[\"A1\", \"a\"]], \"expected\": [[\"A1\", \"a\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.073,"exit_code":1,"observations":[{"actual":[["A1","a"],["A1","aa"]],"check":"reserve distinct sources","expected":[["B1","b"],["A1","a"]],"passed":false},{"actual":[["A1","a"],["B1","b"]],"check":"required order","expected":[["B1","b"],["A1","a"]],"passed":false},{"actual":[["B1","b"]],"check":"too costly source skipped","expected":[["B1","b"]],"passed":true},{"actual":[["A1","a"]],"check":"no required","expected":[["A1","a"]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["A1","a"]],"check":"budget zero","expected":[["A1","a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reserve distinct sources\", \"actual\": [[\"A1\", \"a\"], [\"A1\", \"aa\"]], \"expected\": [[\"B1\", \"b\"], [\"A1\", \"a\"]], \"passed\": false}, {\"check\": \"required order\", \"actual\": [[\"A1\", \"a\"], [\"B1\", \"b\"]], \"expected\": [[\"B1\", \"b\"], [\"A1\", \"a\"]], \"passed\": false}, {\"check\": \"too costly source skipped\", \"actual\": [[\"B1\", \"b\"]], \"expected\": [[\"B1\", \"b\"]], \"passed\": true}, {\"check\": \"no required\", \"actual\": [[\"A1\", \"a\"]], \"expected\": [[\"A1\", \"a\"]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"budget zero\", \"actual\": [[\"A1\", \"a\"]], \"expected\": [[\"A1\", \"a\"]], \"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."}}