FA-66036 / Aviation weight and balance / Open access
Row errors reported with zero-based row numbers · case 01
The cabin crew are told to fix row 0, or the row in front of the actual problem row.
ROOT CAUSE
Rows are enumerated from zero while the contract numbers rows from one.
THE FAILURE
Rows are enumerated from zero while the contract numbers rows from one.
Unsuccessful approach: Adjusting only the seat error message leaves infant errors pointing at the previous row.
Case contract
Input {'season','rows':[[arm, adults, children, lap infants]],'bags':[[arm,count]]}. Standard weights: adult 190/195, child 82/87 (summer/winter); lap infants weigh 0 (included with the adult); bags 28 lb. Rows are numbered from 1; more than 3 seated (adults+children) -> 'ERR_ROW_<n>_SEATS'; more infants than adults -> 'ERR_ROW_<n>_INFANTS'. Return [weight, moment r1].
Why this case matters
Standard passenger weights vary by season and passenger type; lap infants do not occupy seats but require an accompanying adult.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
std = {'summer': (190, 82), 'winter': (195, 87)}
aw, cw = std[x['season']]
w = 0
m = 0.0
for i, (arm, ad, ch, inf) in enumerate(x['rows']):
if ad + ch > 3: return 'ERR_ROW_%d_SEATS' % i
if inf > ad: return 'ERR_ROW_%d_INFANTS' % i
rw = ad * aw + ch * cw
w += rw
m += rw * arm
for arm, count in x['bags']:
w += count * 28
m += count * 28 * arm
return [w, round(m, 1)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['summer mixed cabin', {'season': 'summer', 'rows': [[120.0, 2, 1, 0], [150.0, 3, 0, 1], [180.0, 1, 2, 1]], 'bags': [[300.0, 5]]}, [1526, 246660.0]], ['winter family rows', {'season': 'winter', 'rows': [[120.0, 2, 1, 2], [150.0, 1, 2, 1]], 'bags': [[300.0, 3], [60.0, 1]]}, [958, 139470.0]], ['row full of seats', {'season': 'summer', 'rows': [[120.0, 2, 2, 0], [150.0, 1, 0, 0]], 'bags': []}, 'ERR_ROW_1_SEATS'], ['two lap infants one adult', {'season': 'winter', 'rows': [[120.0, 1, 1, 0], [150.0, 1, 1, 2]], 'bags': [[300.0, 1]]}, 'ERR_ROW_2_INFANTS'], ['three adults three infants', {'season': 'summer', 'rows': [[131.0, 3, 0, 3]], 'bags': [[300.0, 2]]}, [626, 91470.0]], ['empty cabin bags only', {'season': 'winter', 'rows': [], 'bags': [[280.0, 10]]}, [280, 78400.0]], ['sampled case 1', {'season': 'winter', 'rows': [[123.2, 3, 0, 2], [224.7, 2, 0, 1], [209.0, 3, 0, 3], [101.5, 0, 3, 0], [123.7, 3, 0, 1]], 'bags': [[76.1, 1], [114.8, 0]]}, [2434, 382956.8]], ['sampled case 2', {'season': 'winter', 'rows': [[232.3, 0, 3, 0], [166.7, 1, 2, 1], [113.6, 2, 0, 0], [181.7, 2, 1, 0]], 'bags': []}, [1497, 253117.5]], ['sampled case 3', {'season': 'winter', 'rows': [[190.7, 1, 2, 1], [134.2, 1, 1, 0]], 'bags': []}, [651, 108212.7]]], [['summer mixed cabin', {'season': 'summer', 'rows': [[120.0, 2, 1, 0], [150.0, 3, 0, 1], [180.0, 1, 1, 1]], 'bags': [[300.0, 6]]}, [1472, 240300.0]], ['winter family rows', {'season': 'winter', 'rows': [[120.0, 2, 1, 2], [150.0, 1, 2, 1]], 'bags': [[300.0, 3], [60.0, 1]]}, [958, 139470.0]], ['row full of seats', {'season': 'summer', 'rows': [[120.0, 2, 2, 0], [150.0, 1, 0, 0]], 'bags': []}, 'ERR_ROW_1_SEATS'], ['two lap infants one adult', {'season': 'winter', 'rows': [[120.0, 1, 1, 0], [150.0, 1, 1, 2]], 'bags': [[300.0, 2]]}, 'ERR_ROW_2_INFANTS'], ['three adults three infants', {'season': 'summer', 'rows': [[132.0, 3, 0, 3]], 'bags': [[300.0, 2]]}, [626, 92040.0]], ['empty cabin bags only', {'season': 'winter', 'rows': [], 'bags': [[280.0, 20]]}, [560, 156800.0]], ['sampled case 1', {'season': 'winter', 'rows': [[207.9, 3, 3, 2], [166.6, 2, 1, 1], [191.5, 2, 1, 3]], 'bags': [[191.7, 3]]}, 'ERR_ROW_1_SEATS'], ['sampled case 2', {'season': 'summer', 'rows': [[239.0, 3, 0, 3], [126.1, 3, 0, 0], [248.5, 0, 3, 0], [203.8, 0, 1, 0]], 'bags': []}, [1468, 285949.6]], ['sampled case 3', {'season': 'summer', 'rows': [[112.7, 1, 0, 2], [246.6, 1, 1, 0]], 'bags': []}, 'ERR_ROW_1_INFANTS']], [['summer mixed cabin', {'season': 'summer', 'rows': [[120.0, 2, 1, 0], [150.0, 3, 0, 1], [180.0, 1, 2, 1]], 'bags': [[300.0, 7]]}, [1582, 263460.0]], ['winter family rows', {'season': 'winter', 'rows': [[120.0, 2, 1, 2], [150.0, 1, 2, 1]], 'bags': [[300.0, 3], [60.0, 1]]}, [958, 139470.0]], ['row full of seats', {'season': 'summer', 'rows': [[120.0, 2, 2, 0], [150.0, 1, 0, 0]], 'bags': []}, 'ERR_ROW_1_SEATS'], ['two lap infants one adult', {'season': 'winter', 'rows': [[120.0, 1, 1, 0], [150.0, 1, 1, 2]], 'bags': [[300.0, 3]]}, 'ERR_ROW_2_INFANTS'], ['three adults three infants', {'season': 'summer', 'rows': [[133.0, 3, 0, 3]], 'bags': [[300.0, 2]]}, [626, 92610.0]], ['empty cabin bags only', {'season': 'winter', 'rows': [], 'bags': [[280.0, 30]]}, [840, 235200.0]], ['sampled case 1', {'season': 'winter', 'rows': [[247.7, 2, 3, 0]], 'bags': [[219.7, 7]]}, 'ERR_ROW_1_SEATS'], ['sampled case 2', {'season': 'winter', 'rows': [[186.6, 3, 0, 2]], 'bags': [[127.2, 7]]}, [781, 134092.2]], ['sampled case 3', {'season': 'winter', 'rows': [[112.7, 0, 3, 0], [159.8, 1, 0, 1], [131.3, 2, 1, 2], [112.7, 3, 0, 0]], 'bags': []}, [1518, 189135.3]]], [['summer mixed cabin', {'season': 'summer', 'rows': [[120.0, 2, 1, 0], [150.0, 3, 0, 1], [180.0, 1, 1, 1]], 'bags': [[300.0, 8]]}, [1528, 257100.0]], ['winter family rows', {'season': 'winter', 'rows': [[120.0, 2, 1, 2], [150.0, 1, 2, 1]], 'bags': [[300.0, 3], [60.0, 1]]}, [958, 139470.0]], ['row full of seats', {'season': 'summer', 'rows': [[120.0, 2, 2, 0], [150.0, 1, 0, 0]], 'bags': []}, 'ERR_ROW_1_SEATS'], ['two lap infants one adult', {'season': 'winter', 'rows': [[120.0, 1, 1, 0], [150.0, 1, 1, 2]], 'bags': [[300.0, 4]]}, 'ERR_ROW_2_INFANTS'], ['three adults three infants', {'season': 'summer', 'rows': [[134.0, 3, 0, 3]], 'bags': [[300.0, 2]]}, [626, 93180.0]], ['empty cabin bags only', {'season': 'winter', 'rows': [], 'bags': [[280.0, 40]]}, [1120, 313600.0]], ['sampled case 1', {'season': 'winter', 'rows': [[121.9, 2, 0, 0], [208.1, 0, 0, 0]], 'bags': [[285.3, 11]]}, [698, 135413.4]], ['sampled case 2', {'season': 'summer', 'rows': [[192.5, 1, 2, 1], [210.4, 0, 1, 0], [164.1, 3, 0, 3], [177.2, 1, 1, 1]], 'bags': []}, [1278, 227133.2]], ['sampled case 3', {'season': 'summer', 'rows': [[129.9, 2, 1, 0], [217.8, 2, 0, 1], [102.4, 0, 1, 0], [102.1, 2, 0, 0], [219.8, 2, 1, 2]], 'bags': []}, [1766, 291520.2]]], [['summer mixed cabin', {'season': 'summer', 'rows': [[120.0, 2, 1, 0], [150.0, 3, 0, 1], [180.0, 1, 2, 1]], 'bags': [[300.0, 9]]}, [1638, 280260.0]], ['winter family rows', {'season': 'winter', 'rows': [[120.0, 2, 1, 2], [150.0, 1, 2, 1]], 'bags': [[300.0, 3], [60.0, 1]]}, [958, 139470.0]], ['row full of seats', {'season': 'summer', 'rows': [[120.0, 2, 2, 0], [150.0, 1, 0, 0]], 'bags': []}, 'ERR_ROW_1_SEATS'], ['two lap infants one adult', {'season': 'winter', 'rows': [[120.0, 1, 1, 0], [150.0, 1, 1, 2]], 'bags': [[300.0, 5]]}, 'ERR_ROW_2_INFANTS'], ['three adults three infants', {'season': 'summer', 'rows': [[135.0, 3, 0, 3]], 'bags': [[300.0, 2]]}, [626, 93750.0]], ['empty cabin bags only', {'season': 'winter', 'rows': [], 'bags': [[280.0, 50]]}, [1400, 392000.0]], ['sampled case 1', {'season': 'summer', 'rows': [[127.4, 1, 0, 1], [239.5, 1, 2, 1], [187.1, 3, 3, 3]], 'bags': [[167.2, 12], [227.4, 2]]}, 'ERR_ROW_3_SEATS'], ['sampled case 2', {'season': 'summer', 'rows': [[134.7, 0, 2, 0], [113.2, 2, 1, 1], [126.4, 0, 0, 3], [248.9, 2, 1, 1], [227.0, 1, 1, 1]], 'bags': []}, 'ERR_ROW_3_INFANTS'], ['sampled case 3', {'season': 'summer', 'rows': [[227.7, 2, 0, 2], [101.0, 1, 2, 0], [158.6, 3, 0, 3], [211.0, 1, 0, 1]], 'bags': [[271.3, 10]]}, [1774, 328736.0]]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| summer mixed cabin | [1526, 246660.0] | [1526, 246660.0] | Passed |
| winter family rows | [958, 139470.0] | [958, 139470.0] | Passed |
| row full of seats | ERR_ROW_0_SEATS | ERR_ROW_1_SEATS | Failed |
| two lap infants one adult | ERR_ROW_1_INFANTS | ERR_ROW_2_INFANTS | Failed |
| three adults three infants | [626, 91470.0] | [626, 91470.0] | Passed |
| empty cabin bags only | [280, 78400.0] | [280, 78400.0] | Passed |
| sampled case 1 | [2434, 382956.8] | [2434, 382956.8] | Passed |
| sampled case 2 | [1497, 253117.5] | [1497, 253117.5] | Passed |
| sampled case 3 | [651, 108212.7] | [651, 108212.7] | Passed |
SHA-256 / b4cd811052676984ea40dfa9d4a8ec5ac522a4d0fc886f538888724a13b4cf46
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
std = {'summer': (190, 82), 'winter': (195, 87)}
aw, cw = std[x['season']]
w = 0
m = 0.0
for i, (arm, ad, ch, inf) in enumerate(x['rows']):
if ad + ch > 3: return 'ERR_ROW_%d_SEATS' % (i + 1)
if inf > ad: return 'ERR_ROW_%d_INFANTS' % i
rw = ad * aw + ch * cw
w += rw
m += rw * arm
for arm, count in x['bags']:
w += count * 28
m += count * 28 * arm
return [w, round(m, 1)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['summer mixed cabin', {'season': 'summer', 'rows': [[120.0, 2, 1, 0], [150.0, 3, 0, 1], [180.0, 1, 2, 1]], 'bags': [[300.0, 5]]}, [1526, 246660.0]], ['winter family rows', {'season': 'winter', 'rows': [[120.0, 2, 1, 2], [150.0, 1, 2, 1]], 'bags': [[300.0, 3], [60.0, 1]]}, [958, 139470.0]], ['row full of seats', {'season': 'summer', 'rows': [[120.0, 2, 2, 0], [150.0, 1, 0, 0]], 'bags': []}, 'ERR_ROW_1_SEATS'], ['two lap infants one adult', {'season': 'winter', 'rows': [[120.0, 1, 1, 0], [150.0, 1, 1, 2]], 'bags': [[300.0, 1]]}, 'ERR_ROW_2_INFANTS'], ['three adults three infants', {'season': 'summer', 'rows': [[131.0, 3, 0, 3]], 'bags': [[300.0, 2]]}, [626, 91470.0]], ['empty cabin bags only', {'season': 'winter', 'rows': [], 'bags': [[280.0, 10]]}, [280, 78400.0]], ['sampled case 1', {'season': 'winter', 'rows': [[123.2, 3, 0, 2], [224.7, 2, 0, 1], [209.0, 3, 0, 3], [101.5, 0, 3, 0], [123.7, 3, 0, 1]], 'bags': [[76.1, 1], [114.8, 0]]}, [2434, 382956.8]], ['sampled case 2', {'season': 'winter', 'rows': [[232.3, 0, 3, 0], [166.7, 1, 2, 1], [113.6, 2, 0, 0], [181.7, 2, 1, 0]], 'bags': []}, [1497, 253117.5]], ['sampled case 3', {'season': 'winter', 'rows': [[190.7, 1, 2, 1], [134.2, 1, 1, 0]], 'bags': []}, [651, 108212.7]]], [['summer mixed cabin', {'season': 'summer', 'rows': [[120.0, 2, 1, 0], [150.0, 3, 0, 1], [180.0, 1, 1, 1]], 'bags': [[300.0, 6]]}, [1472, 240300.0]], ['winter family rows', {'season': 'winter', 'rows': [[120.0, 2, 1, 2], [150.0, 1, 2, 1]], 'bags': [[300.0, 3], [60.0, 1]]}, [958, 139470.0]], ['row full of seats', {'season': 'summer', 'rows': [[120.0, 2, 2, 0], [150.0, 1, 0, 0]], 'bags': []}, 'ERR_ROW_1_SEATS'], ['two lap infants one adult', {'season': 'winter', 'rows': [[120.0, 1, 1, 0], [150.0, 1, 1, 2]], 'bags': [[300.0, 2]]}, 'ERR_ROW_2_INFANTS'], ['three adults three infants', {'season': 'summer', 'rows': [[132.0, 3, 0, 3]], 'bags': [[300.0, 2]]}, [626, 92040.0]], ['empty cabin bags only', {'season': 'winter', 'rows': [], 'bags': [[280.0, 20]]}, [560, 156800.0]], ['sampled case 1', {'season': 'winter', 'rows': [[207.9, 3, 3, 2], [166.6, 2, 1, 1], [191.5, 2, 1, 3]], 'bags': [[191.7, 3]]}, 'ERR_ROW_1_SEATS'], ['sampled case 2', {'season': 'summer', 'rows': [[239.0, 3, 0, 3], [126.1, 3, 0, 0], [248.5, 0, 3, 0], [203.8, 0, 1, 0]], 'bags': []}, [1468, 285949.6]], ['sampled case 3', {'season': 'summer', 'rows': [[112.7, 1, 0, 2], [246.6, 1, 1, 0]], 'bags': []}, 'ERR_ROW_1_INFANTS']], [['summer mixed cabin', {'season': 'summer', 'rows': [[120.0, 2, 1, 0], [150.0, 3, 0, 1], [180.0, 1, 2, 1]], 'bags': [[300.0, 7]]}, [1582, 263460.0]], ['winter family rows', {'season': 'winter', 'rows': [[120.0, 2, 1, 2], [150.0, 1, 2, 1]], 'bags': [[300.0, 3], [60.0, 1]]}, [958, 139470.0]], ['row full of seats', {'season': 'summer', 'rows': [[120.0, 2, 2, 0], [150.0, 1, 0, 0]], 'bags': []}, 'ERR_ROW_1_SEATS'], ['two lap infants one adult', {'season': 'winter', 'rows': [[120.0, 1, 1, 0], [150.0, 1, 1, 2]], 'bags': [[300.0, 3]]}, 'ERR_ROW_2_INFANTS'], ['three adults three infants', {'season': 'summer', 'rows': [[133.0, 3, 0, 3]], 'bags': [[300.0, 2]]}, [626, 92610.0]], ['empty cabin bags only', {'season': 'winter', 'rows': [], 'bags': [[280.0, 30]]}, [840, 235200.0]], ['sampled case 1', {'season': 'winter', 'rows': [[247.7, 2, 3, 0]], 'bags': [[219.7, 7]]}, 'ERR_ROW_1_SEATS'], ['sampled case 2', {'season': 'winter', 'rows': [[186.6, 3, 0, 2]], 'bags': [[127.2, 7]]}, [781, 134092.2]], ['sampled case 3', {'season': 'winter', 'rows': [[112.7, 0, 3, 0], [159.8, 1, 0, 1], [131.3, 2, 1, 2], [112.7, 3, 0, 0]], 'bags': []}, [1518, 189135.3]]], [['summer mixed cabin', {'season': 'summer', 'rows': [[120.0, 2, 1, 0], [150.0, 3, 0, 1], [180.0, 1, 1, 1]], 'bags': [[300.0, 8]]}, [1528, 257100.0]], ['winter family rows', {'season': 'winter', 'rows': [[120.0, 2, 1, 2], [150.0, 1, 2, 1]], 'bags': [[300.0, 3], [60.0, 1]]}, [958, 139470.0]], ['row full of seats', {'season': 'summer', 'rows': [[120.0, 2, 2, 0], [150.0, 1, 0, 0]], 'bags': []}, 'ERR_ROW_1_SEATS'], ['two lap infants one adult', {'season': 'winter', 'rows': [[120.0, 1, 1, 0], [150.0, 1, 1, 2]], 'bags': [[300.0, 4]]}, 'ERR_ROW_2_INFANTS'], ['three adults three infants', {'season': 'summer', 'rows': [[134.0, 3, 0, 3]], 'bags': [[300.0, 2]]}, [626, 93180.0]], ['empty cabin bags only', {'season': 'winter', 'rows': [], 'bags': [[280.0, 40]]}, [1120, 313600.0]], ['sampled case 1', {'season': 'winter', 'rows': [[121.9, 2, 0, 0], [208.1, 0, 0, 0]], 'bags': [[285.3, 11]]}, [698, 135413.4]], ['sampled case 2', {'season': 'summer', 'rows': [[192.5, 1, 2, 1], [210.4, 0, 1, 0], [164.1, 3, 0, 3], [177.2, 1, 1, 1]], 'bags': []}, [1278, 227133.2]], ['sampled case 3', {'season': 'summer', 'rows': [[129.9, 2, 1, 0], [217.8, 2, 0, 1], [102.4, 0, 1, 0], [102.1, 2, 0, 0], [219.8, 2, 1, 2]], 'bags': []}, [1766, 291520.2]]], [['summer mixed cabin', {'season': 'summer', 'rows': [[120.0, 2, 1, 0], [150.0, 3, 0, 1], [180.0, 1, 2, 1]], 'bags': [[300.0, 9]]}, [1638, 280260.0]], ['winter family rows', {'season': 'winter', 'rows': [[120.0, 2, 1, 2], [150.0, 1, 2, 1]], 'bags': [[300.0, 3], [60.0, 1]]}, [958, 139470.0]], ['row full of seats', {'season': 'summer', 'rows': [[120.0, 2, 2, 0], [150.0, 1, 0, 0]], 'bags': []}, 'ERR_ROW_1_SEATS'], ['two lap infants one adult', {'season': 'winter', 'rows': [[120.0, 1, 1, 0], [150.0, 1, 1, 2]], 'bags': [[300.0, 5]]}, 'ERR_ROW_2_INFANTS'], ['three adults three infants', {'season': 'summer', 'rows': [[135.0, 3, 0, 3]], 'bags': [[300.0, 2]]}, [626, 93750.0]], ['empty cabin bags only', {'season': 'winter', 'rows': [], 'bags': [[280.0, 50]]}, [1400, 392000.0]], ['sampled case 1', {'season': 'summer', 'rows': [[127.4, 1, 0, 1], [239.5, 1, 2, 1], [187.1, 3, 3, 3]], 'bags': [[167.2, 12], [227.4, 2]]}, 'ERR_ROW_3_SEATS'], ['sampled case 2', {'season': 'summer', 'rows': [[134.7, 0, 2, 0], [113.2, 2, 1, 1], [126.4, 0, 0, 3], [248.9, 2, 1, 1], [227.0, 1, 1, 1]], 'bags': []}, 'ERR_ROW_3_INFANTS'], ['sampled case 3', {'season': 'summer', 'rows': [[227.7, 2, 0, 2], [101.0, 1, 2, 0], [158.6, 3, 0, 3], [211.0, 1, 0, 1]], 'bags': [[271.3, 10]]}, [1774, 328736.0]]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| summer mixed cabin | [1526, 246660.0] | [1526, 246660.0] | Passed |
| winter family rows | [958, 139470.0] | [958, 139470.0] | Passed |
| row full of seats | ERR_ROW_1_SEATS | ERR_ROW_1_SEATS | Passed |
| two lap infants one adult | ERR_ROW_1_INFANTS | ERR_ROW_2_INFANTS | Failed |
| three adults three infants | [626, 91470.0] | [626, 91470.0] | Passed |
| empty cabin bags only | [280, 78400.0] | [280, 78400.0] | Passed |
| sampled case 1 | [2434, 382956.8] | [2434, 382956.8] | Passed |
| sampled case 2 | [1497, 253117.5] | [1497, 253117.5] | Passed |
| sampled case 3 | [651, 108212.7] | [651, 108212.7] | Passed |
SHA-256 / 3798d61ebcc40dc370621dc5ad0eee0eec0362f27e4a28d421fddd988e137834
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 9 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
A deterministic toy loading model with stipulated constants; it is not an approved aircraft flight manual procedure and makes no claim of regulatory 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:39.547124+00:00.
Case digest / ddf58f54b6e93849ab55ac8bfada554e12b4e6c21ff226d5a0f84906fb3c76d9