{"abstract":"Repeated chunk identifiers consume the evidence budget twice.","category":"RAG context assembly","checks":6,"contract":"Rows are [chunk_id,text]. Preserve first occurrence by ID and return its text.","contract_signature":"rows","evaluation_group":"ragctx-deduplicate-id","failed_approach":"Deduplicating by text merges distinct chunks that happen to have equal wording.","family":"w3-rag-context-assembly-deduplicate-identical-chunks","id":"FA-99621","implementations":{"attempt":{"sha256":"a66d5f6cdfc03a9bad00ed224bd578b7bf4fe9cb4f3ed7f6bceb53938527aa2c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    seen=set(); out=[]\n    for ident,text in rows:\n        if text not in seen: seen.add(text); out.append(text)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ni='id'+str(N)\ncheck('same id distinct text', solve([[i,'first'],[i,'updated']]), ['first'])\ncheck('same text distinct IDs', solve([[i,'same'],['other','same']]), ['same','same'])\ncheck('different ids', solve([[i,'a'],['b','b']]), ['a','b'])\ncheck('empty', solve([]), [])\ncheck('singleton', solve([[i,'x']]), ['x'])\ncheck('repeated nonadjacent', solve([[i,'x'],['j','y'],[i,'z']]), ['x','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":"dea221848068aaab577eee26bf4814efc6ffe4fa2056d6aebfa774b98243dab4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    return [text for ident,text in rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ni='id'+str(N)\ncheck('same id distinct text', solve([[i,'first'],[i,'updated']]), ['first'])\ncheck('same text distinct IDs', solve([[i,'same'],['other','same']]), ['same','same'])\ncheck('different ids', solve([[i,'a'],['b','b']]), ['a','b'])\ncheck('empty', solve([]), [])\ncheck('singleton', solve([[i,'x']]), ['x'])\ncheck('repeated nonadjacent', solve([[i,'x'],['j','y'],[i,'z']]), ['x','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-deduplicate-identical-chunks","generated_at":"2026-09-30T16:48:26.270258+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 assembler treats repeated references to the same chunk as independent evidence.","sha256":"487784c0f08c0e0e06d3f5e9eed3a4d7a0597f1901ae8416b88a73fd0ff71c08","title":"Repeated chunk identifiers consume the evidence budget twice · 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":28.563,"exit_code":1,"observations":[{"actual":["first","updated"],"check":"same id distinct text","expected":["first"],"passed":false},{"actual":["same"],"check":"same text distinct IDs","expected":["same","same"],"passed":false},{"actual":["a","b"],"check":"different ids","expected":["a","b"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["x"],"check":"singleton","expected":["x"],"passed":true},{"actual":["x","y","z"],"check":"repeated nonadjacent","expected":["x","y"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same id distinct text\", \"actual\": [\"first\", \"updated\"], \"expected\": [\"first\"], \"passed\": false}, {\"check\": \"same text distinct IDs\", \"actual\": [\"same\"], \"expected\": [\"same\", \"same\"], \"passed\": false}, {\"check\": \"different ids\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"repeated nonadjacent\", \"actual\": [\"x\", \"y\", \"z\"], \"expected\": [\"x\", \"y\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":32.514,"exit_code":1,"observations":[{"actual":["first","updated"],"check":"same id distinct text","expected":["first"],"passed":false},{"actual":["same","same"],"check":"same text distinct IDs","expected":["same","same"],"passed":true},{"actual":["a","b"],"check":"different ids","expected":["a","b"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["x"],"check":"singleton","expected":["x"],"passed":true},{"actual":["x","y","z"],"check":"repeated nonadjacent","expected":["x","y"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same id distinct text\", \"actual\": [\"first\", \"updated\"], \"expected\": [\"first\"], \"passed\": false}, {\"check\": \"same text distinct IDs\", \"actual\": [\"same\", \"same\"], \"expected\": [\"same\", \"same\"], \"passed\": true}, {\"check\": \"different ids\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"repeated nonadjacent\", \"actual\": [\"x\", \"y\", \"z\"], \"expected\": [\"x\", \"y\"], \"passed\": false}], \"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."}}