{"abstract":"A grouped evidence bundle is partially included.","category":"RAG context assembly","checks":6,"contract":"Bundles are lists of [text,cost]. Visit in order; include every text in a bundle only when their total fits remaining budget.","contract_signature":"bundles, budget","evaluation_group":"ragctx-atomic-bundle","failed_approach":"Checking each chunk against the original budget can overrun after accepting a partial bundle.","family":"w3-rag-context-assembly-group-atomic-bundle","id":"FA-99576","implementations":{"attempt":{"sha256":"bd9ebfd3ed9b0ced7046fe12aaff78586a048aaa92a25c2ebc7e26b01e0e649b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(bundles, budget):\n    out=[]; used=0\n    for b in bundles:\n        for t,c in b:\n            if used+c<=budget: out.append(t); used+=c\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reject partial bundle', solve([[['a',2],['b',2]],[['c',1]]],3), ['c'])\ncheck('accept complete bundles', solve([[['a',1],['b',1]],[['c',1]]],3), ['a','b','c'])\ncheck('empty bundle', solve([[],[['x',1]]],1), ['x'])\ncheck('empty input', solve([],N), [])\ncheck('first fits second not', solve([[['a',N]],[['b',1]]],N), ['a'])\ncheck('oversized bundle skipped', solve([[['x',N+1]],[['y',1]]],N), ['y'])\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":"6791bc1c23b5076264bc1cb6a09b78310694765ef65bdc39cf6601f6aab196cc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(bundles, budget):\n    return [t for b in bundles for t,c in b if c<=budget]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reject partial bundle', solve([[['a',2],['b',2]],[['c',1]]],3), ['c'])\ncheck('accept complete bundles', solve([[['a',1],['b',1]],[['c',1]]],3), ['a','b','c'])\ncheck('empty bundle', solve([[],[['x',1]]],1), ['x'])\ncheck('empty input', solve([],N), [])\ncheck('first fits second not', solve([[['a',N]],[['b',1]]],N), ['a'])\ncheck('oversized bundle skipped', solve([[['x',N+1]],[['y',1]]],N), ['y'])\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-group-atomic-bundle","generated_at":"2026-09-30T16:48:25.802828+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":"Budget selection treats chunks from one required bundle independently.","sha256":"b0154555bed0ba4691d8fc15ff5c52612f737a6ecb787438058cebd627e685a3","title":"A grouped evidence bundle is partially included · 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":30.405,"exit_code":1,"observations":[{"actual":["a","c"],"check":"reject partial bundle","expected":["c"],"passed":false},{"actual":["a","b","c"],"check":"accept complete bundles","expected":["a","b","c"],"passed":true},{"actual":["x"],"check":"empty bundle","expected":["x"],"passed":true},{"actual":[],"check":"empty input","expected":[],"passed":true},{"actual":["a"],"check":"first fits second not","expected":["a"],"passed":true},{"actual":["y"],"check":"oversized bundle skipped","expected":["y"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reject partial bundle\", \"actual\": [\"a\", \"c\"], \"expected\": [\"c\"], \"passed\": false}, {\"check\": \"accept complete bundles\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"empty bundle\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"empty input\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"first fits second not\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"oversized bundle skipped\", \"actual\": [\"y\"], \"expected\": [\"y\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.048,"exit_code":1,"observations":[{"actual":["a","b","c"],"check":"reject partial bundle","expected":["c"],"passed":false},{"actual":["a","b","c"],"check":"accept complete bundles","expected":["a","b","c"],"passed":true},{"actual":["x"],"check":"empty bundle","expected":["x"],"passed":true},{"actual":[],"check":"empty input","expected":[],"passed":true},{"actual":["a","b"],"check":"first fits second not","expected":["a"],"passed":false},{"actual":["y"],"check":"oversized bundle skipped","expected":["y"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reject partial bundle\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"c\"], \"passed\": false}, {\"check\": \"accept complete bundles\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"empty bundle\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"empty input\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"first fits second not\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"oversized bundle skipped\", \"actual\": [\"y\"], \"expected\": [\"y\"], \"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."}}