{"abstract":"Context is built from earliest rather than newest evidence.","category":"RAG context assembly","checks":6,"contract":"Rows are [text,cost] oldest to newest. Select a newest-first suffix fitting budget, then return selected rows oldest to newest.","contract_signature":"rows, budget","evaluation_group":"ragctx-recent-window","failed_approach":"Reversing the selected suffix also reverses within-window chronology.","family":"w3-rag-context-assembly-latest-chunk-window","id":"FA-99591","implementations":{"attempt":{"sha256":"62b04da63931ea0d62c5a448adfaeb44c3956612e10abc90bc0eabb1cd1d5c17","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, budget):\n    out=[]; used=0\n    for t,c in rows[::-1]:\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('recent suffix', solve([['old',1],['mid',1],['new',1]],2), ['mid','new'])\ncheck('expensive recent skipped', solve([['old',1],['new',N+1]],N), ['old'])\ncheck('all fit', solve([['a',1],['b',1]],2), ['a','b'])\ncheck('empty', solve([],N), [])\ncheck('one row', solve([['x',N]],N), ['x'])\ncheck('none fit', solve([['x',N+1]],N), [])\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":"f8a16457e5893cdb053e4889b9215b05074164a3802a957a60bba73016708f0d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, budget):\n    out=[]; used=0\n    for t,c in rows:\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('recent suffix', solve([['old',1],['mid',1],['new',1]],2), ['mid','new'])\ncheck('expensive recent skipped', solve([['old',1],['new',N+1]],N), ['old'])\ncheck('all fit', solve([['a',1],['b',1]],2), ['a','b'])\ncheck('empty', solve([],N), [])\ncheck('one row', solve([['x',N]],N), ['x'])\ncheck('none fit', solve([['x',N+1]],N), [])\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-latest-chunk-window","generated_at":"2026-09-30T16:48:25.802407+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 bounded window is filled from the beginning although the contract prioritizes recent chunks.","sha256":"5cc29ffca98b2fb0472d04ec4bfbe1e80d227fdc7fce5b3b2bb92e02c2525499","title":"Context is built from earliest rather than newest evidence · 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.57,"exit_code":1,"observations":[{"actual":["new","mid"],"check":"recent suffix","expected":["mid","new"],"passed":false},{"actual":["old"],"check":"expensive recent skipped","expected":["old"],"passed":true},{"actual":["b","a"],"check":"all fit","expected":["a","b"],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["x"],"check":"one row","expected":["x"],"passed":true},{"actual":[],"check":"none fit","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"recent suffix\", \"actual\": [\"new\", \"mid\"], \"expected\": [\"mid\", \"new\"], \"passed\": false}, {\"check\": \"expensive recent skipped\", \"actual\": [\"old\"], \"expected\": [\"old\"], \"passed\": true}, {\"check\": \"all fit\", \"actual\": [\"b\", \"a\"], \"expected\": [\"a\", \"b\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"one row\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"none fit\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.812,"exit_code":1,"observations":[{"actual":["old","mid"],"check":"recent suffix","expected":["mid","new"],"passed":false},{"actual":["old"],"check":"expensive recent skipped","expected":["old"],"passed":true},{"actual":["a","b"],"check":"all fit","expected":["a","b"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["x"],"check":"one row","expected":["x"],"passed":true},{"actual":[],"check":"none fit","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"recent suffix\", \"actual\": [\"old\", \"mid\"], \"expected\": [\"mid\", \"new\"], \"passed\": false}, {\"check\": \"expensive recent skipped\", \"actual\": [\"old\"], \"expected\": [\"old\"], \"passed\": true}, {\"check\": \"all fit\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"one row\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"none fit\", \"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."}}