FAILURE MAP
← Case archive

FA-66701 / Airline fare rule evaluation / Open access

Only the first two components checked for tariff compatibility · case 01

A third component from a negotiated tariff is combined with public fares.

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

ROOT CAUSE

The tariff set is built from the first two components only.

VERIFIED REPAIR

Check the tariff of every component.

Unsuccessful approach: Checking the last two components misses mismatches earlier in the journey.

Case contract

Input {'components':[[RT amount, carrier, tariff]],'interline_ok'}. Each component contributes half its RT amount rounded up to a whole unit. All components must share one tariff ('ERR_TARIFF', checked first); multiple carriers require interline_ok ('ERR_CARRIER'). Return the summed halves.

Why this case matters

Open-jaw and end-on-end pricing combines half round-trip fares, subject to combinability conditions and per-component rounding.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    halves = []
    for amt, carrier, tariff in x['components']:
        halves.append(math.ceil(amt / 2))
    tariffs = {c[2] for c in x['components'][:2]}
    carriers = {c[1] for c in x['components']}
    if len(tariffs) > 1: return 'ERR_TARIFF'
    if len(carriers) > 1 and not x['interline_ok']: return 'ERR_CARRIER'
    return sum(halves)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [659, 'AA', 'PUB']], 'interline_ok': False}, 731], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [601, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1202, 'LH', 'NEG']], 'interline_ok': False}, 601], ['sampled case 1', {'components': [[1106, 'AA', 'PUB'], [904, 'AA', 'PUB'], [1089, 'AA', 'PUB'], [355, 'LH', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['sampled case 2', {'components': [[898, 'AA', 'PUB'], [1009, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['sampled case 3', {'components': [[350, 'AA', 'NEG'], [1535, 'BA', 'NEG'], [587, 'BA', 'PUB'], [220, 'AA', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['regression: tariff combinability scope', {'components': [[302, 'AA', 'NEG'], [903, 'AA', 'PUB'], [781, 'BA', 'NEG'], [486, 'AA', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF']], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [661, 'AA', 'PUB']], 'interline_ok': False}, 732], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1002, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [602, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1204, 'LH', 'NEG']], 'interline_ok': False}, 602], ['sampled case 1', {'components': [[1455, 'LH', 'NEG'], [1654, 'AA', 'NEG'], [1091, 'BA', 'NEG'], [1846, 'LH', 'NEG']], 'interline_ok': True}, 3024], ['sampled case 2', {'components': [[887, 'LH', 'NEG']], 'interline_ok': False}, 444], ['sampled case 3', {'components': [[600, 'BA', 'PUB']], 'interline_ok': False}, 300], ['regression: tariff combinability scope', {'components': [[1307, 'BA', 'PUB'], [613, 'LH', 'NEG'], [1054, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF']], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [663, 'AA', 'PUB']], 'interline_ok': False}, 733], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1003, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [603, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1206, 'LH', 'NEG']], 'interline_ok': False}, 603], ['sampled case 1', {'components': [[1872, 'AA', 'NEG'], [1205, 'AA', 'NEG'], [851, 'AA', 'NEG'], [434, 'LH', 'NEG']], 'interline_ok': True}, 2182], ['sampled case 2', {'components': [[1006, 'AA', 'NEG'], [1939, 'BA', 'PUB'], [850, 'AA', 'PUB'], [1563, 'AA', 'PUB']], 'interline_ok': False}, 'ERR_TARIFF'], ['sampled case 3', {'components': [[305, 'BA', 'PUB']], 'interline_ok': False}, 153]], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [665, 'AA', 'PUB']], 'interline_ok': False}, 734], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1004, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [604, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1208, 'LH', 'NEG']], 'interline_ok': False}, 604], ['sampled case 1', {'components': [[873, 'AA', 'PUB'], [230, 'BA', 'PUB']], 'interline_ok': True}, 552], ['sampled case 2', {'components': [[1819, 'AA', 'NEG'], [1744, 'AA', 'NEG'], [1758, 'BA', 'NEG']], 'interline_ok': False}, 'ERR_CARRIER'], ['sampled case 3', {'components': [[818, 'LH', 'NEG'], [1794, 'AA', 'NEG'], [1837, 'AA', 'NEG'], [631, 'AA', 'NEG']], 'interline_ok': True}, 2541], ['regression: tariff combinability scope', {'components': [[1279, 'AA', 'NEG'], [1421, 'BA', 'PUB'], [491, 'AA', 'PUB']], 'interline_ok': False}, 'ERR_TARIFF']], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [667, 'AA', 'PUB']], 'interline_ok': False}, 735], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1005, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [605, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1210, 'LH', 'NEG']], 'interline_ok': False}, 605], ['sampled case 1', {'components': [[1193, 'BA', 'NEG'], [1868, 'AA', 'PUB']], 'interline_ok': False}, 'ERR_TARIFF'], ['sampled case 2', {'components': [[1981, 'AA', 'NEG']], 'interline_ok': True}, 991], ['sampled case 3', {'components': [[1746, 'LH', 'NEG'], [1675, 'LH', 'NEG'], [1321, 'AA', 'PUB']], 'interline_ok': True}, 'ERR_TARIFF'], ['regression: tariff combinability scope', {'components': [[506, 'LH', 'PUB'], [670, 'LH', 'NEG'], [528, 'LH', 'NEG'], [1019, 'AA', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF']]]
for label, args, expected in fixtures[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 fixtureActualExpectedOutcome
odd RT fares open jaw731731Passed
interline allowed951951Passed
interline forbiddenERR_CARRIERERR_CARRIERPassed
third component other tariff903ERR_TARIFFFailed
tariff and carrier both differERR_TARIFFERR_TARIFFPassed
single even component601601Passed
sampled case 11728ERR_TARIFFFailed
sampled case 2ERR_TARIFFERR_TARIFFPassed
sampled case 3ERR_CARRIERERR_TARIFFFailed
regression: tariff combinability scopeERR_TARIFFERR_TARIFFPassed

SHA-256 / e3388fe8492f896bce4e2de71ff9e64fb0616c00deab95fa30cda8fbd8f1512d

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    halves = []
    for amt, carrier, tariff in x['components']:
        halves.append(math.ceil(amt / 2))
    tariffs = {c[2] for c in x['components'][-2:]}
    carriers = {c[1] for c in x['components']}
    if len(tariffs) > 1: return 'ERR_TARIFF'
    if len(carriers) > 1 and not x['interline_ok']: return 'ERR_CARRIER'
    return sum(halves)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [659, 'AA', 'PUB']], 'interline_ok': False}, 731], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [601, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1202, 'LH', 'NEG']], 'interline_ok': False}, 601], ['sampled case 1', {'components': [[1106, 'AA', 'PUB'], [904, 'AA', 'PUB'], [1089, 'AA', 'PUB'], [355, 'LH', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['sampled case 2', {'components': [[898, 'AA', 'PUB'], [1009, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['sampled case 3', {'components': [[350, 'AA', 'NEG'], [1535, 'BA', 'NEG'], [587, 'BA', 'PUB'], [220, 'AA', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['regression: tariff combinability scope', {'components': [[302, 'AA', 'NEG'], [903, 'AA', 'PUB'], [781, 'BA', 'NEG'], [486, 'AA', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF']], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [661, 'AA', 'PUB']], 'interline_ok': False}, 732], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1002, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [602, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1204, 'LH', 'NEG']], 'interline_ok': False}, 602], ['sampled case 1', {'components': [[1455, 'LH', 'NEG'], [1654, 'AA', 'NEG'], [1091, 'BA', 'NEG'], [1846, 'LH', 'NEG']], 'interline_ok': True}, 3024], ['sampled case 2', {'components': [[887, 'LH', 'NEG']], 'interline_ok': False}, 444], ['sampled case 3', {'components': [[600, 'BA', 'PUB']], 'interline_ok': False}, 300], ['regression: tariff combinability scope', {'components': [[1307, 'BA', 'PUB'], [613, 'LH', 'NEG'], [1054, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF']], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [663, 'AA', 'PUB']], 'interline_ok': False}, 733], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1003, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [603, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1206, 'LH', 'NEG']], 'interline_ok': False}, 603], ['sampled case 1', {'components': [[1872, 'AA', 'NEG'], [1205, 'AA', 'NEG'], [851, 'AA', 'NEG'], [434, 'LH', 'NEG']], 'interline_ok': True}, 2182], ['sampled case 2', {'components': [[1006, 'AA', 'NEG'], [1939, 'BA', 'PUB'], [850, 'AA', 'PUB'], [1563, 'AA', 'PUB']], 'interline_ok': False}, 'ERR_TARIFF'], ['sampled case 3', {'components': [[305, 'BA', 'PUB']], 'interline_ok': False}, 153]], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [665, 'AA', 'PUB']], 'interline_ok': False}, 734], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1004, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [604, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1208, 'LH', 'NEG']], 'interline_ok': False}, 604], ['sampled case 1', {'components': [[873, 'AA', 'PUB'], [230, 'BA', 'PUB']], 'interline_ok': True}, 552], ['sampled case 2', {'components': [[1819, 'AA', 'NEG'], [1744, 'AA', 'NEG'], [1758, 'BA', 'NEG']], 'interline_ok': False}, 'ERR_CARRIER'], ['sampled case 3', {'components': [[818, 'LH', 'NEG'], [1794, 'AA', 'NEG'], [1837, 'AA', 'NEG'], [631, 'AA', 'NEG']], 'interline_ok': True}, 2541], ['regression: tariff combinability scope', {'components': [[1279, 'AA', 'NEG'], [1421, 'BA', 'PUB'], [491, 'AA', 'PUB']], 'interline_ok': False}, 'ERR_TARIFF']], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [667, 'AA', 'PUB']], 'interline_ok': False}, 735], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1005, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [605, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1210, 'LH', 'NEG']], 'interline_ok': False}, 605], ['sampled case 1', {'components': [[1193, 'BA', 'NEG'], [1868, 'AA', 'PUB']], 'interline_ok': False}, 'ERR_TARIFF'], ['sampled case 2', {'components': [[1981, 'AA', 'NEG']], 'interline_ok': True}, 991], ['sampled case 3', {'components': [[1746, 'LH', 'NEG'], [1675, 'LH', 'NEG'], [1321, 'AA', 'PUB']], 'interline_ok': True}, 'ERR_TARIFF'], ['regression: tariff combinability scope', {'components': [[506, 'LH', 'PUB'], [670, 'LH', 'NEG'], [528, 'LH', 'NEG'], [1019, 'AA', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF']]]
for label, args, expected in fixtures[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 fixtureActualExpectedOutcome
odd RT fares open jaw731731Passed
interline allowed951951Passed
interline forbiddenERR_CARRIERERR_CARRIERPassed
third component other tariffERR_TARIFFERR_TARIFFPassed
tariff and carrier both differERR_TARIFFERR_TARIFFPassed
single even component601601Passed
sampled case 1ERR_TARIFFERR_TARIFFPassed
sampled case 2ERR_TARIFFERR_TARIFFPassed
sampled case 3ERR_TARIFFERR_TARIFFPassed
regression: tariff combinability scopeERR_CARRIERERR_TARIFFFailed

SHA-256 / 3329e2c08ca593de890558568cb17cc159e70ed480483c42d0a0b06d755cdc10

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    halves = []
    for amt, carrier, tariff in x['components']:
        halves.append(math.ceil(amt / 2))
    tariffs = {c[2] for c in x['components']}
    carriers = {c[1] for c in x['components']}
    if len(tariffs) > 1: return 'ERR_TARIFF'
    if len(carriers) > 1 and not x['interline_ok']: return 'ERR_CARRIER'
    return sum(halves)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [659, 'AA', 'PUB']], 'interline_ok': False}, 731], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [601, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1202, 'LH', 'NEG']], 'interline_ok': False}, 601], ['sampled case 1', {'components': [[1106, 'AA', 'PUB'], [904, 'AA', 'PUB'], [1089, 'AA', 'PUB'], [355, 'LH', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['sampled case 2', {'components': [[898, 'AA', 'PUB'], [1009, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['sampled case 3', {'components': [[350, 'AA', 'NEG'], [1535, 'BA', 'NEG'], [587, 'BA', 'PUB'], [220, 'AA', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['regression: tariff combinability scope', {'components': [[302, 'AA', 'NEG'], [903, 'AA', 'PUB'], [781, 'BA', 'NEG'], [486, 'AA', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF']], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [661, 'AA', 'PUB']], 'interline_ok': False}, 732], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1002, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [602, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1204, 'LH', 'NEG']], 'interline_ok': False}, 602], ['sampled case 1', {'components': [[1455, 'LH', 'NEG'], [1654, 'AA', 'NEG'], [1091, 'BA', 'NEG'], [1846, 'LH', 'NEG']], 'interline_ok': True}, 3024], ['sampled case 2', {'components': [[887, 'LH', 'NEG']], 'interline_ok': False}, 444], ['sampled case 3', {'components': [[600, 'BA', 'PUB']], 'interline_ok': False}, 300], ['regression: tariff combinability scope', {'components': [[1307, 'BA', 'PUB'], [613, 'LH', 'NEG'], [1054, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF']], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [663, 'AA', 'PUB']], 'interline_ok': False}, 733], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1003, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [603, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1206, 'LH', 'NEG']], 'interline_ok': False}, 603], ['sampled case 1', {'components': [[1872, 'AA', 'NEG'], [1205, 'AA', 'NEG'], [851, 'AA', 'NEG'], [434, 'LH', 'NEG']], 'interline_ok': True}, 2182], ['sampled case 2', {'components': [[1006, 'AA', 'NEG'], [1939, 'BA', 'PUB'], [850, 'AA', 'PUB'], [1563, 'AA', 'PUB']], 'interline_ok': False}, 'ERR_TARIFF'], ['sampled case 3', {'components': [[305, 'BA', 'PUB']], 'interline_ok': False}, 153]], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [665, 'AA', 'PUB']], 'interline_ok': False}, 734], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1004, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [604, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1208, 'LH', 'NEG']], 'interline_ok': False}, 604], ['sampled case 1', {'components': [[873, 'AA', 'PUB'], [230, 'BA', 'PUB']], 'interline_ok': True}, 552], ['sampled case 2', {'components': [[1819, 'AA', 'NEG'], [1744, 'AA', 'NEG'], [1758, 'BA', 'NEG']], 'interline_ok': False}, 'ERR_CARRIER'], ['sampled case 3', {'components': [[818, 'LH', 'NEG'], [1794, 'AA', 'NEG'], [1837, 'AA', 'NEG'], [631, 'AA', 'NEG']], 'interline_ok': True}, 2541], ['regression: tariff combinability scope', {'components': [[1279, 'AA', 'NEG'], [1421, 'BA', 'PUB'], [491, 'AA', 'PUB']], 'interline_ok': False}, 'ERR_TARIFF']], [['odd RT fares open jaw', {'components': [[801, 'AA', 'PUB'], [667, 'AA', 'PUB']], 'interline_ok': False}, 735], ['interline allowed', {'components': [[900, 'AA', 'PUB'], [1001, 'BA', 'PUB']], 'interline_ok': True}, 951], ['interline forbidden', {'components': [[900, 'AA', 'PUB'], [1005, 'BA', 'PUB']], 'interline_ok': False}, 'ERR_CARRIER'], ['third component other tariff', {'components': [[500, 'AA', 'PUB'], [601, 'AA', 'PUB'], [703, 'AA', 'NEG']], 'interline_ok': True}, 'ERR_TARIFF'], ['tariff and carrier both differ', {'components': [[500, 'AA', 'PUB'], [605, 'LH', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF'], ['single even component', {'components': [[1210, 'LH', 'NEG']], 'interline_ok': False}, 605], ['sampled case 1', {'components': [[1193, 'BA', 'NEG'], [1868, 'AA', 'PUB']], 'interline_ok': False}, 'ERR_TARIFF'], ['sampled case 2', {'components': [[1981, 'AA', 'NEG']], 'interline_ok': True}, 991], ['sampled case 3', {'components': [[1746, 'LH', 'NEG'], [1675, 'LH', 'NEG'], [1321, 'AA', 'PUB']], 'interline_ok': True}, 'ERR_TARIFF'], ['regression: tariff combinability scope', {'components': [[506, 'LH', 'PUB'], [670, 'LH', 'NEG'], [528, 'LH', 'NEG'], [1019, 'AA', 'NEG']], 'interline_ok': False}, 'ERR_TARIFF']]]
for label, args, expected in fixtures[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 fixtureActualExpectedOutcome
odd RT fares open jaw731731Passed
interline allowed951951Passed
interline forbiddenERR_CARRIERERR_CARRIERPassed
third component other tariffERR_TARIFFERR_TARIFFPassed
tariff and carrier both differERR_TARIFFERR_TARIFFPassed
single even component601601Passed
sampled case 1ERR_TARIFFERR_TARIFFPassed
sampled case 2ERR_TARIFFERR_TARIFFPassed
sampled case 3ERR_TARIFFERR_TARIFFPassed
regression: tariff combinability scopeERR_TARIFFERR_TARIFFPassed

SHA-256 / dae335156a6a30e12852010392b2521a249d194290fdaa86d3c4dd74e64fe0c3

Verification & scope

A stipulated toy fare-rule contract with invented constants; it is not an ATPCO or carrier tariff implementation and makes no claim of industry-standard conformance. 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:47:46.181779+00:00.

Case digest / f982b0ce8914101bb4c784229b91238ee6017189ede2c80fcd9ec4e9eb6c6b44