FAILURE MAP
← Case archive

FA-99576 / RAG context assembly / Open access

A grouped evidence bundle is partially included · case 01

A grouped evidence bundle is partially included.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Budget selection treats chunks from one required bundle independently.

THE FAILURE

Budget selection treats chunks from one required bundle independently.

Unsuccessful approach: Checking each chunk against the original budget can overrun after accepting a partial bundle.

Case contract

Bundles are lists of [text,cost]. Visit in order; include every text in a bundle only when their total fits remaining budget.

Why this case matters

A small deterministic evidence assembly model makes context budgeting behavior inspectable.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(bundles, budget):
    return [t for b in bundles for t,c in b if c<=budget]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reject partial bundle', solve([[['a',2],['b',2]],[['c',1]]],3), ['c'])
check('accept complete bundles', solve([[['a',1],['b',1]],[['c',1]]],3), ['a','b','c'])
check('empty bundle', solve([[],[['x',1]]],1), ['x'])
check('empty input', solve([],N), [])
check('first fits second not', solve([[['a',N]],[['b',1]]],N), ['a'])
check('oversized bundle skipped', solve([[['x',N+1]],[['y',1]]],N), ['y'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
reject partial bundle['a', 'b', 'c']['c']Failed
accept complete bundles['a', 'b', 'c']['a', 'b', 'c']Passed
empty bundle['x']['x']Passed
empty input[][]Passed
first fits second not['a', 'b']['a']Failed
oversized bundle skipped['y']['y']Passed

SHA-256 / 6791bc1c23b5076264bc1cb6a09b78310694765ef65bdc39cf6601f6aab196cc

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(bundles, budget):
    out=[]; used=0
    for b in bundles:
        for t,c in b:
            if used+c<=budget: out.append(t); used+=c
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reject partial bundle', solve([[['a',2],['b',2]],[['c',1]]],3), ['c'])
check('accept complete bundles', solve([[['a',1],['b',1]],[['c',1]]],3), ['a','b','c'])
check('empty bundle', solve([[],[['x',1]]],1), ['x'])
check('empty input', solve([],N), [])
check('first fits second not', solve([[['a',N]],[['b',1]]],N), ['a'])
check('oversized bundle skipped', solve([[['x',N+1]],[['y',1]]],N), ['y'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
reject partial bundle['a', 'c']['c']Failed
accept complete bundles['a', 'b', 'c']['a', 'b', 'c']Passed
empty bundle['x']['x']Passed
empty input[][]Passed
first fits second not['a']['a']Passed
oversized bundle skipped['y']['y']Passed

SHA-256 / bd9ebfd3ed9b0ced7046fe12aaff78586a048aaa92a25c2ebc7e26b01e0e649b

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-30T16:48:25.802828+00:00.

Case digest / b0154555bed0ba4691d8fc15ff5c52612f737a6ecb787438058cebd627e685a3