FAILURE MAP
← Case archive

FA-98141 / Attention mask construction / Open access

Future keys leak through a reversed causal comparison · case 01

Future keys leak through a reversed causal comparison.

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

ROOT CAUSE

The key-query comparison is reversed, admitting future keys and excluding earlier ones.

THE FAILURE

The key-query comparison is reversed, admitting future keys and excluding earlier ones.

Unsuccessful approach: Comparing every key with the final sequence index makes every in-range key visible, including future keys.

Case contract

For length L, return an LxL lower triangle including diagonal. L may be zero.

Why this case matters

A small explicit visibility matrix makes sequence-attention boundary behavior reviewable.

1 / The failure

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

N = 1
observations = []
def solve(length):
    return [[j>=i for j in range(length)] for i in range(length)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('middle row',solve(N+1),[[j<=i for j in range(N+1)] for i in range(N+1)])
check('singleton',solve(1),[[True]])
check('empty',solve(0),[])
check('last query',solve(3)[2],[True,True,True])
check('first query',solve(3)[0],[True,False,False])
check('rectangular irrelevant',solve(2),[[True,False],[True,True]])
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
middle row[[True, True], [False, True]][[True, False], [True, True]]Failed
singleton[[True]][[True]]Passed
empty[][]Passed
last query[False, False, True][True, True, True]Failed
first query[True, True, True][True, False, False]Failed
rectangular irrelevant[[True, True], [False, True]][[True, False], [True, True]]Failed

SHA-256 / ef8173dee3b410222dabca2d9de691d6b04f60c652041c5ef2e81f60e08e924b

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(length):
    return [[j<=length-1 for j in range(length)] for i in range(length)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('middle row',solve(N+1),[[j<=i for j in range(N+1)] for i in range(N+1)])
check('singleton',solve(1),[[True]])
check('empty',solve(0),[])
check('last query',solve(3)[2],[True,True,True])
check('first query',solve(3)[0],[True,False,False])
check('rectangular irrelevant',solve(2),[[True,False],[True,True]])
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
middle row[[True, True], [True, True]][[True, False], [True, True]]Failed
singleton[[True]][[True]]Passed
empty[][]Passed
last query[True, True, True][True, True, True]Passed
first query[True, True, True][True, False, False]Failed
rectangular irrelevant[[True, True], [True, True]][[True, False], [True, True]]Failed

SHA-256 / 8b9b0e3b80df1e75c2112ec7adf4ed33bc93512b854bdd406c8210c05e29a8c7

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

These are toy Boolean matrix contracts; they do not define a production model architecture or tensor library behavior. 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:09.758160+00:00.

Case digest / 0104e4991e8d3ed7424a975474c8a8cad8d69849aabaab8b97ee0171e3af5900