{"abstract":"Context assembly ignores boundary-specific wrapper costs.","category":"RAG context assembly","checks":6,"contract":"Rows are [text,content_cost,boundary_cost]. Return the longest prefix fitting budget; the first row has no preceding boundary.","contract_signature":"chunks, budget","evaluation_group":"ragctx-separator-count","failed_approach":"Charging boundary cost on the first item applies a wrapper where no join exists.","family":"w3-rag-context-assembly-separator-count-multiple","id":"FA-99601","implementations":{"attempt":{"sha256":"9ab9a59a5baa10df539b61651bf731757832052527219d2d08135cc40541dc3b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(chunks, budget):\n    out=[]; used=0\n    for t,c,b in chunks:\n        extra=c+(b if out else 0)\n        if used+extra+b>budget: break\n        out.append(t); used+=extra+b\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('different wrappers', solve([['a',1,4],['b',1,1]],2), ['a'])\ncheck('cheap second join', solve([['a',1,0],['b',1,1],['c',1,0]],4), ['a','b','c'])\ncheck('first ignores wrapper', solve([['a',N,9]],N), ['a'])\ncheck('empty', solve([],N), [])\ncheck('zero wrapper', solve([['a',1,0],['b',1,0]],2), ['a','b'])\ncheck('first fits only', solve([['a',1,0],['b',1,N]],N), ['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":"6b4ecda47e84e1c0598d7f30209466fcef71c0d81c48ebb75fed90b2e7810f15","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(chunks, budget):\n    out=[]; used=0\n    for t,c,b in chunks:\n        if used+c>budget: break\n        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('different wrappers', solve([['a',1,4],['b',1,1]],2), ['a'])\ncheck('cheap second join', solve([['a',1,0],['b',1,1],['c',1,0]],4), ['a','b','c'])\ncheck('first ignores wrapper', solve([['a',N,9]],N), ['a'])\ncheck('empty', solve([],N), [])\ncheck('zero wrapper', solve([['a',1,0],['b',1,0]],2), ['a','b'])\ncheck('first fits only', solve([['a',1,0],['b',1,N]],N), ['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-separator-count-multiple","generated_at":"2026-09-30T16:48:26.270407+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":"The budget accounts for chunk content while omitting the different wrapper cost at each join.","sha256":"d50d75ed8377bf211a2cbdece51300ea3682aa7c09c62da79b83a7dca5b1d89e","title":"Context assembly ignores boundary-specific wrapper costs · 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.351,"exit_code":1,"observations":[{"actual":[],"check":"different wrappers","expected":["a"],"passed":false},{"actual":["a","b"],"check":"cheap second join","expected":["a","b","c"],"passed":false},{"actual":[],"check":"first ignores wrapper","expected":["a"],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["a","b"],"check":"zero wrapper","expected":["a","b"],"passed":true},{"actual":["a"],"check":"first fits only","expected":["a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"different wrappers\", \"actual\": [], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"cheap second join\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": false}, {\"check\": \"first ignores wrapper\", \"actual\": [], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero wrapper\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"first fits only\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":33.957,"exit_code":1,"observations":[{"actual":["a","b"],"check":"different wrappers","expected":["a"],"passed":false},{"actual":["a","b","c"],"check":"cheap second join","expected":["a","b","c"],"passed":true},{"actual":["a"],"check":"first ignores wrapper","expected":["a"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["a","b"],"check":"zero wrapper","expected":["a","b"],"passed":true},{"actual":["a"],"check":"first fits only","expected":["a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"different wrappers\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"cheap second join\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"first ignores wrapper\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero wrapper\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"first fits only\", \"actual\": [\"a\"], \"expected\": [\"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."}}