{"abstract":"Context assembly omits separator tokens from its budget.","category":"RAG context assembly","checks":6,"contract":"Select the longest input prefix fitting budget; each chunk has cost and each inter-chunk separator costs sep. Return texts.","contract_signature":"chunks, budget, sep","evaluation_group":"ragctx-separator-budget","failed_approach":"Charging a separator after every chunk also charges a nonexistent trailing boundary.","family":"w3-rag-context-assembly-separator-budget","id":"FA-99551","implementations":{"attempt":{"sha256":"feab9a9e4bb22a03013760d222ed3dca5588a17b4f56a89d1395d0d7086c359a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(chunks, budget, sep):\n    out=[]; used=0\n    for text,cost in chunks:\n        if used+cost+sep>budget: break\n        out.append(text); used+=cost+sep\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('separator blocks second', solve([['a',N],['b',1]],N+1,1), ['a'])\ncheck('exact with boundary', solve([['a',1],['b',1]],3,1), ['a','b'])\ncheck('single no separator', solve([['a',N]],N,2), ['a'])\ncheck('empty', solve([],N,1), [])\ncheck('zero costs', solve([['a',0],['b',0]],1,1), ['a','b'])\ncheck('first too large', solve([['x',N+1]],N,1), [])\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":"fa1606fcdad0d0ee7639aeb366672c22294958f5f03dcd7242088a7422bdb6bd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(chunks, budget, sep):\n    out=[]; used=0\n    for text,cost in chunks:\n        if used+cost>budget: break\n        out.append(text); used+=cost\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('separator blocks second', solve([['a',N],['b',1]],N+1,1), ['a'])\ncheck('exact with boundary', solve([['a',1],['b',1]],3,1), ['a','b'])\ncheck('single no separator', solve([['a',N]],N,2), ['a'])\ncheck('empty', solve([],N,1), [])\ncheck('zero costs', solve([['a',0],['b',0]],1,1), ['a','b'])\ncheck('first too large', solve([['x',N+1]],N,1), [])\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-separator-budget","generated_at":"2026-09-30T16:48:25.349303+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":"Chunk costs are added without accounting for separators inserted between chunks.","sha256":"164b0e56ffbac8d8d580c00fbce36eab747de571c833c6fa8a21e54d4931b3fa","title":"Context assembly omits separator tokens from its budget · 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":26.829,"exit_code":1,"observations":[{"actual":["a"],"check":"separator blocks second","expected":["a"],"passed":true},{"actual":["a"],"check":"exact with boundary","expected":["a","b"],"passed":false},{"actual":[],"check":"single no separator","expected":["a"],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["a"],"check":"zero costs","expected":["a","b"],"passed":false},{"actual":[],"check":"first too large","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"separator blocks second\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"exact with boundary\", \"actual\": [\"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"single no separator\", \"actual\": [], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero costs\", \"actual\": [\"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"first too large\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":26.212,"exit_code":1,"observations":[{"actual":["a","b"],"check":"separator blocks second","expected":["a"],"passed":false},{"actual":["a","b"],"check":"exact with boundary","expected":["a","b"],"passed":true},{"actual":["a"],"check":"single no separator","expected":["a"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["a","b"],"check":"zero costs","expected":["a","b"],"passed":true},{"actual":[],"check":"first too large","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"separator blocks second\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"exact with boundary\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"single no separator\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero costs\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"first too large\", \"actual\": [], \"expected\": [], \"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."}}