FA-61916 / Currency rounding and FX conversion / Open access
The counter amount is rounded with the input currency exponent · case 01
Dollars converted to yen are returned with cents, and yen converted to dollars are whole numbers.
ROOT CAUSE
The quantum uses the exponent of ccy instead of the counter currency oc.
VERIFIED REPAIR
Round at the counter currency exponent.
Unsuccessful approach: Always using the quote currency exponent is wrong whenever the counter currency is the base.
Case contract
solve(side, amount, ccy, pair, bid, ask): pair is six letters BASEQUOTE; side is the customer's action on the base currency ('buy' or 'sell'). The dealer sells base at ask and buys at bid. If amount is in base, the counter amount in quote is amount*rate; if in quote, the counter amount in base is amount/rate. Amounts the customer pays are rounded up (ceiling) and amounts the customer receives are rounded down (floor) at the counter currency exponent (JPY 0, KWD 3, else 2). Return [counter_amount, counter_ccy]; errors: 'ERR:side', 'ERR:crossed-quote' when bid > ask (bid == ask is valid), 'ERR:currency-not-in-pair'.
Why this case matters
Currency amounts must be rounded at the right stage and in the right unit, or ledgers, quotes and settlements drift by minor units.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from decimal import Decimal, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_FLOOR, ROUND_CEILING, ROUND_DOWN, ROUND_UP, ROUND_HALF_DOWN
N = 1
observations = []
def solve(side, amount, ccy, pair, bid, ask):
exps = {'JPY': 0, 'KWD': 3}
base, quote = pair[:3], pair[3:]
if side not in ('buy', 'sell'): return 'ERR:side'
b, a = Decimal(bid), Decimal(ask)
if b > a: return 'ERR:crossed-quote'
r = a if side == 'buy' else b
x = Decimal(amount)
if ccy == base:
out, oc = x * r, quote
pays = side == 'buy'
elif ccy == quote:
out, oc = x / r, base
pays = side == 'sell'
else:
return 'ERR:currency-not-in-pair'
mode = ROUND_CEILING if pays else ROUND_FLOOR
return [format(out.quantize(Decimal(1).scaleb(-exps.get(ccy, 2)), rounding=mode), 'f'), oc]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression counter-exponent 1', ('buy', '10.01', 'USD', 'USDJPY', '151.20', '151.24'), ['1514', 'JPY']),
('regression counter-exponent 2', ('sell', '77.77', 'USD', 'KWDUSD', '3.2520', '3.2561'), ['23.915', 'KWD']),
('partial repair guard 2', ('sell', '50691', 'JPY', 'USDJPY', '61.7254', '61.7302'), ['821.24', 'USD']),
('control: buy base in base', ('buy', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.50', 'USD']),
('control: sell base in base', ('sell', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.10', 'USD']),
('control: spend quote', ('buy', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.29', 'EUR']),
('control: receive quote', ('sell', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.33', 'EUR'])],
[('regression counter-exponent 1', ('sell', '20310', 'EUR', 'EURJPY', '13.3392', '13.3438'), ['270919', 'JPY']),
('regression counter-exponent 2', ('sell', '50691', 'JPY', 'USDJPY', '61.7254', '61.7302'), ['821.24', 'USD']),
('partial repair guard 1', ('sell', '38162.39', 'USD', 'KWDUSD', '111.9590', '111.9634'), ['340.861', 'KWD']),
('partial repair guard 2', ('sell', '24387', 'KWD', 'USDKWD', '72.1987', '72.2047'), ['337.78', 'USD']),
('control: receive quote', ('sell', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.33', 'EUR']),
('control: yen counter', ('buy', '10.01', 'USD', 'USDJPY', '151.20', '151.24'), ['1514', 'JPY']),
('control: locked quote', ('sell', '250', 'GBP', 'GBPUSD', '1.2650', '1.2650'), ['316.25', 'USD']),
('control: crossed quote', ('buy', '5', 'EUR', 'EURUSD', '1.2', '1.1'), 'ERR:crossed-quote')],
[('regression counter-exponent 1', ('sell', '27002', 'KWD', 'KWDUSD', '127.8499', '127.8515'), ['3452202.99', 'USD']),
('regression counter-exponent 2', ('sell', '39619.07', 'USD', 'USDJPY', '122.3532', '122.3540'), ['4847519', 'JPY']),
('partial repair guard 1', ('sell', '350.83', 'KWD', 'USDKWD', '107.9091', '107.9159'), ['3.26', 'USD']),
('partial repair guard 2', ('buy', '34866', 'KWD', 'USDKWD', '148.1320', '148.1390'), ['235.36', 'USD']),
('control: crossed quote', ('buy', '5', 'EUR', 'EURUSD', '1.2', '1.1'), 'ERR:crossed-quote'),
('control: foreign currency', ('buy', '5', 'CHF', 'EURUSD', '1.08', '1.09'), 'ERR:currency-not-in-pair'),
('control: dinar counter', ('sell', '77.77', 'USD', 'KWDUSD', '3.2520', '3.2561'), ['23.915', 'KWD']),
('control: bad side', ('hold', '5', 'EUR', 'EURUSD', '1.08', '1.09'), 'ERR:side')],
[('regression counter-exponent 1', ('sell', '38162.39', 'USD', 'KWDUSD', '111.9590', '111.9634'), ['340.861', 'KWD']),
('regression counter-exponent 2', ('sell', '9400', 'USD', 'USDKWD', '70.9836', '70.9888'), ['667245.840', 'KWD']),
('partial repair guard 1', ('sell', '53319', 'USD', 'KWDUSD', '132.5974', '132.6024'), ['402.112', 'KWD']),
('partial repair guard 2', ('buy', '9849', 'USD', 'KWDUSD', '109.5417', '109.5455'), ['89.907', 'KWD']),
('control: bad side', ('hold', '5', 'EUR', 'EURUSD', '1.08', '1.09'), 'ERR:side'),
('control: buy base in base', ('buy', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.50', 'USD']),
('control: sell base in base', ('sell', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.10', 'USD']),
('control: spend quote', ('buy', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.29', 'EUR'])],
[('regression counter-exponent 1', ('sell', '24387', 'KWD', 'USDKWD', '72.1987', '72.2047'), ['337.78', 'USD']),
('regression counter-exponent 2', ('sell', '350.83', 'KWD', 'USDKWD', '107.9091', '107.9159'), ['3.26', 'USD']),
('partial repair guard 1', ('buy', '77666.89', 'JPY', 'USDJPY', '122.1001', '122.1039'), ['636.07', 'USD']),
('partial repair guard 2', ('buy', '51211.50', 'JPY', 'USDJPY', '106.2807', '106.2865'), ['481.82', 'USD']),
('control: spend quote', ('buy', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.29', 'EUR']),
('control: receive quote', ('sell', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.33', 'EUR']),
('control: yen counter', ('buy', '10.01', 'USD', 'USDJPY', '151.20', '151.24'), ['1514', 'JPY']),
('control: locked quote', ('sell', '250', 'GBP', 'GBPUSD', '1.2650', '1.2650'), ['316.25', 'USD'])]]
for label, args, expected in cases[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression counter-exponent 1 | ['1513.92', 'JPY'] | ['1514', 'JPY'] | Failed |
| regression counter-exponent 2 | ['23.92', 'KWD'] | ['23.915', 'KWD'] | Failed |
| partial repair guard 2 | ['822', 'USD'] | ['821.24', 'USD'] | Failed |
| control: buy base in base | ['1083.50', 'USD'] | ['1083.50', 'USD'] | Passed |
| control: sell base in base | ['1083.10', 'USD'] | ['1083.10', 'USD'] | Passed |
| control: spend quote | ['92.29', 'EUR'] | ['92.29', 'EUR'] | Passed |
| control: receive quote | ['92.33', 'EUR'] | ['92.33', 'EUR'] | Passed |
SHA-256 / 7f7c2adb1c08be78b2dba66bdb972195de5d3e2cdfb6d1923baf849bc7a52ac0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from decimal import Decimal, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_FLOOR, ROUND_CEILING, ROUND_DOWN, ROUND_UP, ROUND_HALF_DOWN
N = 1
observations = []
def solve(side, amount, ccy, pair, bid, ask):
exps = {'JPY': 0, 'KWD': 3}
base, quote = pair[:3], pair[3:]
if side not in ('buy', 'sell'): return 'ERR:side'
b, a = Decimal(bid), Decimal(ask)
if b > a: return 'ERR:crossed-quote'
r = a if side == 'buy' else b
x = Decimal(amount)
if ccy == base:
out, oc = x * r, quote
pays = side == 'buy'
elif ccy == quote:
out, oc = x / r, base
pays = side == 'sell'
else:
return 'ERR:currency-not-in-pair'
mode = ROUND_CEILING if pays else ROUND_FLOOR
return [format(out.quantize(Decimal(1).scaleb(-exps.get(quote, 2)), rounding=mode), 'f'), oc]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression counter-exponent 1', ('buy', '10.01', 'USD', 'USDJPY', '151.20', '151.24'), ['1514', 'JPY']),
('regression counter-exponent 2', ('sell', '77.77', 'USD', 'KWDUSD', '3.2520', '3.2561'), ['23.915', 'KWD']),
('partial repair guard 2', ('sell', '50691', 'JPY', 'USDJPY', '61.7254', '61.7302'), ['821.24', 'USD']),
('control: buy base in base', ('buy', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.50', 'USD']),
('control: sell base in base', ('sell', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.10', 'USD']),
('control: spend quote', ('buy', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.29', 'EUR']),
('control: receive quote', ('sell', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.33', 'EUR'])],
[('regression counter-exponent 1', ('sell', '20310', 'EUR', 'EURJPY', '13.3392', '13.3438'), ['270919', 'JPY']),
('regression counter-exponent 2', ('sell', '50691', 'JPY', 'USDJPY', '61.7254', '61.7302'), ['821.24', 'USD']),
('partial repair guard 1', ('sell', '38162.39', 'USD', 'KWDUSD', '111.9590', '111.9634'), ['340.861', 'KWD']),
('partial repair guard 2', ('sell', '24387', 'KWD', 'USDKWD', '72.1987', '72.2047'), ['337.78', 'USD']),
('control: receive quote', ('sell', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.33', 'EUR']),
('control: yen counter', ('buy', '10.01', 'USD', 'USDJPY', '151.20', '151.24'), ['1514', 'JPY']),
('control: locked quote', ('sell', '250', 'GBP', 'GBPUSD', '1.2650', '1.2650'), ['316.25', 'USD']),
('control: crossed quote', ('buy', '5', 'EUR', 'EURUSD', '1.2', '1.1'), 'ERR:crossed-quote')],
[('regression counter-exponent 1', ('sell', '27002', 'KWD', 'KWDUSD', '127.8499', '127.8515'), ['3452202.99', 'USD']),
('regression counter-exponent 2', ('sell', '39619.07', 'USD', 'USDJPY', '122.3532', '122.3540'), ['4847519', 'JPY']),
('partial repair guard 1', ('sell', '350.83', 'KWD', 'USDKWD', '107.9091', '107.9159'), ['3.26', 'USD']),
('partial repair guard 2', ('buy', '34866', 'KWD', 'USDKWD', '148.1320', '148.1390'), ['235.36', 'USD']),
('control: crossed quote', ('buy', '5', 'EUR', 'EURUSD', '1.2', '1.1'), 'ERR:crossed-quote'),
('control: foreign currency', ('buy', '5', 'CHF', 'EURUSD', '1.08', '1.09'), 'ERR:currency-not-in-pair'),
('control: dinar counter', ('sell', '77.77', 'USD', 'KWDUSD', '3.2520', '3.2561'), ['23.915', 'KWD']),
('control: bad side', ('hold', '5', 'EUR', 'EURUSD', '1.08', '1.09'), 'ERR:side')],
[('regression counter-exponent 1', ('sell', '38162.39', 'USD', 'KWDUSD', '111.9590', '111.9634'), ['340.861', 'KWD']),
('regression counter-exponent 2', ('sell', '9400', 'USD', 'USDKWD', '70.9836', '70.9888'), ['667245.840', 'KWD']),
('partial repair guard 1', ('sell', '53319', 'USD', 'KWDUSD', '132.5974', '132.6024'), ['402.112', 'KWD']),
('partial repair guard 2', ('buy', '9849', 'USD', 'KWDUSD', '109.5417', '109.5455'), ['89.907', 'KWD']),
('control: bad side', ('hold', '5', 'EUR', 'EURUSD', '1.08', '1.09'), 'ERR:side'),
('control: buy base in base', ('buy', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.50', 'USD']),
('control: sell base in base', ('sell', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.10', 'USD']),
('control: spend quote', ('buy', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.29', 'EUR'])],
[('regression counter-exponent 1', ('sell', '24387', 'KWD', 'USDKWD', '72.1987', '72.2047'), ['337.78', 'USD']),
('regression counter-exponent 2', ('sell', '350.83', 'KWD', 'USDKWD', '107.9091', '107.9159'), ['3.26', 'USD']),
('partial repair guard 1', ('buy', '77666.89', 'JPY', 'USDJPY', '122.1001', '122.1039'), ['636.07', 'USD']),
('partial repair guard 2', ('buy', '51211.50', 'JPY', 'USDJPY', '106.2807', '106.2865'), ['481.82', 'USD']),
('control: spend quote', ('buy', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.29', 'EUR']),
('control: receive quote', ('sell', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.33', 'EUR']),
('control: yen counter', ('buy', '10.01', 'USD', 'USDJPY', '151.20', '151.24'), ['1514', 'JPY']),
('control: locked quote', ('sell', '250', 'GBP', 'GBPUSD', '1.2650', '1.2650'), ['316.25', 'USD'])]]
for label, args, expected in cases[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression counter-exponent 1 | ['1514', 'JPY'] | ['1514', 'JPY'] | Passed |
| regression counter-exponent 2 | ['23.92', 'KWD'] | ['23.915', 'KWD'] | Failed |
| partial repair guard 2 | ['822', 'USD'] | ['821.24', 'USD'] | Failed |
| control: buy base in base | ['1083.50', 'USD'] | ['1083.50', 'USD'] | Passed |
| control: sell base in base | ['1083.10', 'USD'] | ['1083.10', 'USD'] | Passed |
| control: spend quote | ['92.29', 'EUR'] | ['92.29', 'EUR'] | Passed |
| control: receive quote | ['92.33', 'EUR'] | ['92.33', 'EUR'] | Passed |
SHA-256 / 2afa94253b8dc5727aa564df62c8ac389fb5931106b6e4d67f77b157efc34af7
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from decimal import Decimal, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_FLOOR, ROUND_CEILING, ROUND_DOWN, ROUND_UP, ROUND_HALF_DOWN
N = 1
observations = []
def solve(side, amount, ccy, pair, bid, ask):
exps = {'JPY': 0, 'KWD': 3}
base, quote = pair[:3], pair[3:]
if side not in ('buy', 'sell'): return 'ERR:side'
b, a = Decimal(bid), Decimal(ask)
if b > a: return 'ERR:crossed-quote'
r = a if side == 'buy' else b
x = Decimal(amount)
if ccy == base:
out, oc = x * r, quote
pays = side == 'buy'
elif ccy == quote:
out, oc = x / r, base
pays = side == 'sell'
else:
return 'ERR:currency-not-in-pair'
mode = ROUND_CEILING if pays else ROUND_FLOOR
return [format(out.quantize(Decimal(1).scaleb(-exps.get(oc, 2)), rounding=mode), 'f'), oc]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression counter-exponent 1', ('buy', '10.01', 'USD', 'USDJPY', '151.20', '151.24'), ['1514', 'JPY']),
('regression counter-exponent 2', ('sell', '77.77', 'USD', 'KWDUSD', '3.2520', '3.2561'), ['23.915', 'KWD']),
('partial repair guard 2', ('sell', '50691', 'JPY', 'USDJPY', '61.7254', '61.7302'), ['821.24', 'USD']),
('control: buy base in base', ('buy', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.50', 'USD']),
('control: sell base in base', ('sell', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.10', 'USD']),
('control: spend quote', ('buy', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.29', 'EUR']),
('control: receive quote', ('sell', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.33', 'EUR'])],
[('regression counter-exponent 1', ('sell', '20310', 'EUR', 'EURJPY', '13.3392', '13.3438'), ['270919', 'JPY']),
('regression counter-exponent 2', ('sell', '50691', 'JPY', 'USDJPY', '61.7254', '61.7302'), ['821.24', 'USD']),
('partial repair guard 1', ('sell', '38162.39', 'USD', 'KWDUSD', '111.9590', '111.9634'), ['340.861', 'KWD']),
('partial repair guard 2', ('sell', '24387', 'KWD', 'USDKWD', '72.1987', '72.2047'), ['337.78', 'USD']),
('control: receive quote', ('sell', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.33', 'EUR']),
('control: yen counter', ('buy', '10.01', 'USD', 'USDJPY', '151.20', '151.24'), ['1514', 'JPY']),
('control: locked quote', ('sell', '250', 'GBP', 'GBPUSD', '1.2650', '1.2650'), ['316.25', 'USD']),
('control: crossed quote', ('buy', '5', 'EUR', 'EURUSD', '1.2', '1.1'), 'ERR:crossed-quote')],
[('regression counter-exponent 1', ('sell', '27002', 'KWD', 'KWDUSD', '127.8499', '127.8515'), ['3452202.99', 'USD']),
('regression counter-exponent 2', ('sell', '39619.07', 'USD', 'USDJPY', '122.3532', '122.3540'), ['4847519', 'JPY']),
('partial repair guard 1', ('sell', '350.83', 'KWD', 'USDKWD', '107.9091', '107.9159'), ['3.26', 'USD']),
('partial repair guard 2', ('buy', '34866', 'KWD', 'USDKWD', '148.1320', '148.1390'), ['235.36', 'USD']),
('control: crossed quote', ('buy', '5', 'EUR', 'EURUSD', '1.2', '1.1'), 'ERR:crossed-quote'),
('control: foreign currency', ('buy', '5', 'CHF', 'EURUSD', '1.08', '1.09'), 'ERR:currency-not-in-pair'),
('control: dinar counter', ('sell', '77.77', 'USD', 'KWDUSD', '3.2520', '3.2561'), ['23.915', 'KWD']),
('control: bad side', ('hold', '5', 'EUR', 'EURUSD', '1.08', '1.09'), 'ERR:side')],
[('regression counter-exponent 1', ('sell', '38162.39', 'USD', 'KWDUSD', '111.9590', '111.9634'), ['340.861', 'KWD']),
('regression counter-exponent 2', ('sell', '9400', 'USD', 'USDKWD', '70.9836', '70.9888'), ['667245.840', 'KWD']),
('partial repair guard 1', ('sell', '53319', 'USD', 'KWDUSD', '132.5974', '132.6024'), ['402.112', 'KWD']),
('partial repair guard 2', ('buy', '9849', 'USD', 'KWDUSD', '109.5417', '109.5455'), ['89.907', 'KWD']),
('control: bad side', ('hold', '5', 'EUR', 'EURUSD', '1.08', '1.09'), 'ERR:side'),
('control: buy base in base', ('buy', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.50', 'USD']),
('control: sell base in base', ('sell', '1000', 'EUR', 'EURUSD', '1.0831', '1.0835'), ['1083.10', 'USD']),
('control: spend quote', ('buy', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.29', 'EUR'])],
[('regression counter-exponent 1', ('sell', '24387', 'KWD', 'USDKWD', '72.1987', '72.2047'), ['337.78', 'USD']),
('regression counter-exponent 2', ('sell', '350.83', 'KWD', 'USDKWD', '107.9091', '107.9159'), ['3.26', 'USD']),
('partial repair guard 1', ('buy', '77666.89', 'JPY', 'USDJPY', '122.1001', '122.1039'), ['636.07', 'USD']),
('partial repair guard 2', ('buy', '51211.50', 'JPY', 'USDJPY', '106.2807', '106.2865'), ['481.82', 'USD']),
('control: spend quote', ('buy', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.29', 'EUR']),
('control: receive quote', ('sell', '100', 'USD', 'EURUSD', '1.0831', '1.0835'), ['92.33', 'EUR']),
('control: yen counter', ('buy', '10.01', 'USD', 'USDJPY', '151.20', '151.24'), ['1514', 'JPY']),
('control: locked quote', ('sell', '250', 'GBP', 'GBPUSD', '1.2650', '1.2650'), ['316.25', 'USD'])]]
for label, args, expected in cases[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression counter-exponent 1 | ['1514', 'JPY'] | ['1514', 'JPY'] | Passed |
| regression counter-exponent 2 | ['23.915', 'KWD'] | ['23.915', 'KWD'] | Passed |
| partial repair guard 2 | ['821.24', 'USD'] | ['821.24', 'USD'] | Passed |
| control: buy base in base | ['1083.50', 'USD'] | ['1083.50', 'USD'] | Passed |
| control: sell base in base | ['1083.10', 'USD'] | ['1083.10', 'USD'] | Passed |
| control: spend quote | ['92.29', 'EUR'] | ['92.29', 'EUR'] | Passed |
| control: receive quote | ['92.33', 'EUR'] | ['92.33', 'EUR'] | Passed |
SHA-256 / cc88c4ec5622e7ab64481d7f7dfc6f5d43220e0963c4c4702ae2099f252db364
Verification & scope
A deterministic, bounded teaching model with a stipulated toy contract; it makes no claim of conformance to any real regulation, standard, or institution's rules. 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:46:59.708493+00:00.
Case digest / c8a0905c5b465aedad37d19c10d7e8e9e2e3ac6a9f883ec4de1598a468519f9d