FA-99586 / RAG context assembly / Open access
The assembler fills budget without required source coverage · case 01
The assembler fills budget without required source coverage.
ROOT CAUSE
A greedy rank scan fills the context before checking the requested source set.
THE FAILURE
A greedy rank scan fills the context before checking the requested source set.
Unsuccessful approach: Reserving a source name without checking its chunk cost can exceed budget.
Case contract
Rows are [source,text,cost]. Include the first fitting row for each required source in required order, then scan remaining rows in rank order without exceeding 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(rows, required, budget):
out=[]; used=0
for s,t,c in rows:
if used+c<=budget: out.append([s,t]); used+=c
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='A'+str(N); b='B'+str(N)
check('reserve distinct sources', solve([[a,'a',2],[a,'aa',1],[b,'b',1]], [b],3), [[b,'b'],[a,'a']])
check('required order', solve([[a,'a',1],[b,'b',1]], [b,a],2), [[b,'b'],[a,'a']])
check('too costly source skipped', solve([[a,'a',N+1],[b,'b',1]], [a],N), [[b,'b']])
check('no required', solve([[a,'a',1]], [],1), [[a,'a']])
check('empty', solve([], [a],N), [])
check('budget zero', solve([[a,'a',0]], [a],0), [[a,'a']])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| reserve distinct sources | [['A1', 'a'], ['A1', 'aa']] | [['B1', 'b'], ['A1', 'a']] | Failed |
| required order | [['A1', 'a'], ['B1', 'b']] | [['B1', 'b'], ['A1', 'a']] | Failed |
| too costly source skipped | [['B1', 'b']] | [['B1', 'b']] | Passed |
| no required | [['A1', 'a']] | [['A1', 'a']] | Passed |
| empty | [] | [] | Passed |
| budget zero | [['A1', 'a']] | [['A1', 'a']] | Passed |
SHA-256 / 5d9f5eb4ce17ad9ff64f45c7ac8a1c29822757bc429455574063e297c72136cd
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, required, budget):
chosen=[]; used=0
for s in required:
row=next((r for r in rows if r[0]==s),None)
if row: chosen.append(row); used+=row[2]
return [[s,t] for s,t,c in chosen]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='A'+str(N); b='B'+str(N)
check('reserve distinct sources', solve([[a,'a',2],[a,'aa',1],[b,'b',1]], [b],3), [[b,'b'],[a,'a']])
check('required order', solve([[a,'a',1],[b,'b',1]], [b,a],2), [[b,'b'],[a,'a']])
check('too costly source skipped', solve([[a,'a',N+1],[b,'b',1]], [a],N), [[b,'b']])
check('no required', solve([[a,'a',1]], [],1), [[a,'a']])
check('empty', solve([], [a],N), [])
check('budget zero', solve([[a,'a',0]], [a],0), [[a,'a']])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| reserve distinct sources | [['B1', 'b']] | [['B1', 'b'], ['A1', 'a']] | Failed |
| required order | [['B1', 'b'], ['A1', 'a']] | [['B1', 'b'], ['A1', 'a']] | Passed |
| too costly source skipped | [['A1', 'a']] | [['B1', 'b']] | Failed |
| no required | [] | [['A1', 'a']] | Failed |
| empty | [] | [] | Passed |
| budget zero | [['A1', 'a']] | [['A1', 'a']] | Passed |
SHA-256 / 81a5ff8c597a72136ab18372e326f944f43e30c20029ddd9794f256814299e5c
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.802704+00:00.
Case digest / 36e5ff6f35f3049db1e063bc56d9116a6467e1ba4dae13f6de150bc83ed83d19