FA-11856 / Search retrieval semantics / Open access
Required terms in different fields produce a same-field hit · case 01
Required terms in different fields produce a same-field hit.
ROOT CAUSE
Flattened document fields erase the field boundary required by the query.
VERIFIED REPAIR
Test the entire query against each field independently.
Unsuccessful approach: Restricting to the first field drops legitimate matches in later fields.
Case contract
Return whether any single field contains all query terms. Empty query matches any existing field; no fields never matches.
Why this case matters
An offline deterministic retrieval model isolates this search contract from tokenization, storage, and network behavior.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(fields, query):
return set(query) <= set(t for field in fields for t in field)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='a'+str(N)
check('cross field leakage', solve([[a],['b']],[a,'b']),False)
check('later field complete', solve([[],[a,'b']],[a,'b']),True)
check('first field complete', solve([[a,'b'],[]],[a,'b']),True)
check('no fields', solve([],[]),False)
check('empty query existing field', solve([[]],[]),True)
check('repeated query term', solve([[a]],[a,a]),True)
check('absent term', solve([[a]],['z']),False)
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 |
|---|---|---|---|
| cross field leakage | True | False | Failed |
| later field complete | True | True | Passed |
| first field complete | True | True | Passed |
| no fields | True | False | Failed |
| empty query existing field | True | True | Passed |
| repeated query term | True | True | Passed |
| absent term | False | False | Passed |
SHA-256 / 351912e278d151c43c278b38c43b54f1974fd5a0237faab6fb20ae7c7b445b44
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(fields, query):
return bool(fields) and set(query) <= set(fields[0])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='a'+str(N)
check('cross field leakage', solve([[a],['b']],[a,'b']),False)
check('later field complete', solve([[],[a,'b']],[a,'b']),True)
check('first field complete', solve([[a,'b'],[]],[a,'b']),True)
check('no fields', solve([],[]),False)
check('empty query existing field', solve([[]],[]),True)
check('repeated query term', solve([[a]],[a,a]),True)
check('absent term', solve([[a]],['z']),False)
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 |
|---|---|---|---|
| cross field leakage | False | False | Passed |
| later field complete | False | True | Failed |
| first field complete | True | True | Passed |
| no fields | False | False | Passed |
| empty query existing field | True | True | Passed |
| repeated query term | True | True | Passed |
| absent term | False | False | Passed |
SHA-256 / 4cf09ebcb033a4cabf22ed60b695dfff4bd03d4d8b01ec75a48e659a0c19d2b1
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(fields, query):
return any(set(query) <= set(field) for field in fields)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='a'+str(N)
check('cross field leakage', solve([[a],['b']],[a,'b']),False)
check('later field complete', solve([[],[a,'b']],[a,'b']),True)
check('first field complete', solve([[a,'b'],[]],[a,'b']),True)
check('no fields', solve([],[]),False)
check('empty query existing field', solve([[]],[]),True)
check('repeated query term', solve([[a]],[a,a]),True)
check('absent term', solve([[a]],['z']),False)
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 |
|---|---|---|---|
| cross field leakage | False | False | Passed |
| later field complete | True | True | Passed |
| first field complete | True | True | Passed |
| no fields | False | False | Passed |
| empty query existing field | True | True | Passed |
| repeated query term | True | True | Passed |
| absent term | False | False | Passed |
SHA-256 / 340bcd8c16520f7c60ffbd873624c923ba26f3fb1b44fdc682fbc482f4fbf112
Verification & scope
Inputs are already tokenized or scored; this model makes no claim about production engine performance or linguistic analysis. 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-29T14:38:51.674344+00:00.
Case digest / 3635220e85a9996c855d072c3289cd2e2e9308379187027e61b3df0439233f44