FAILURE MAP
← Case archive

FA-52301 / Raster memory layout / Open access

Field Separated Scanlines: Scanline parity is replaced by field-local index or inverted · case 01

The returned physical layout descriptor disagrees with the declared buffer mapping at field.

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

ROOT CAUSE

Scanline parity is replaced by field-local index or inverted The faulty expression is p["y"]//2.

VERIFIED REPAIR

Apply the stipulated layout rule at field: p["y"]%2.

Unsuccessful approach: The attempted repair uses 1-p["y"]%2 and still violates the layout contract.

Case contract

Even scanlines precede odd scanlines in two separately tagged fields. Each field starts with its own three-byte tag. Field rows use a two-byte guard and store x-fastest pixels. Return the named intermediate layout descriptor and final address fields; all quantities are integer byte offsets unless explicitly stated.

Why this case matters

Offline raster resource, upload, readback, and storage-layout regression model.

1 / The failure

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

N = 1
observations = []
def solve(p):
    p = dict(p)
    even_rows = (p["h"]+1)//2
    odd_rows = p["h"]//2
    field = p["y"]//2
    field_row = p["y"]//2
    row_pitch = p["w"]*p["b"]+2
    odd_start = p["base"]+3+even_rows*row_pitch
    field_start = p["base"] if field==0 else odd_start
    row_origin = field_start+3+field_row*row_pitch
    address = row_origin+p["x"]*p["b"]
    allocation_end = odd_start+3+odd_rows*row_pitch
    return {'even_rows': even_rows, 'odd_rows': odd_rows, 'field': field, 'field_row': field_row, 'row_pitch': row_pitch, 'odd_start': odd_start, 'field_start': field_start, 'row_origin': row_origin, 'address': address, 'allocation_end': allocation_end}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 2, 'base': 11}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 4, 'odd_start': 18, 'field_start': 11, 'row_origin': 14, 'address': 14, 'allocation_end': 21}), ({'w': 6, 'h': 4, 'x': 1, 'y': 2, 'b': 2, 'base': 11}, {'even_rows': 2, 'odd_rows': 2, 'field': 0, 'field_row': 1, 'row_pitch': 14, 'odd_start': 42, 'field_start': 11, 'row_origin': 28, 'address': 30, 'allocation_end': 73}), ({'w': 10, 'h': 8, 'x': 8, 'y': 6, 'b': 2, 'base': 11}, {'even_rows': 4, 'odd_rows': 4, 'field': 0, 'field_row': 3, 'row_pitch': 22, 'odd_start': 102, 'field_start': 11, 'row_origin': 80, 'address': 96, 'allocation_end': 193}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 2, 'base': 11}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 34, 'odd_start': 150, 'field_start': 150, 'row_origin': 255, 'address': 285, 'allocation_end': 289}), ({'w': 18, 'h': 10, 'x': 16, 'y': 8, 'b': 2, 'base': 11}, {'even_rows': 5, 'odd_rows': 5, 'field': 0, 'field_row': 4, 'row_pitch': 38, 'odd_start': 204, 'field_start': 11, 'row_origin': 166, 'address': 198, 'allocation_end': 397}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 2, 'base': 11}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 16, 'odd_start': 126, 'field_start': 11, 'row_origin': 110, 'address': 116, 'allocation_end': 225})], 2: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 3, 'base': 22}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 5, 'odd_start': 30, 'field_start': 22, 'row_origin': 25, 'address': 25, 'allocation_end': 33}), ({'w': 7, 'h': 5, 'x': 1, 'y': 2, 'b': 3, 'base': 22}, {'even_rows': 3, 'odd_rows': 2, 'field': 0, 'field_row': 1, 'row_pitch': 23, 'odd_start': 94, 'field_start': 22, 'row_origin': 48, 'address': 51, 'allocation_end': 143}), ({'w': 11, 'h': 9, 'x': 8, 'y': 6, 'b': 3, 'base': 22}, {'even_rows': 5, 'odd_rows': 4, 'field': 0, 'field_row': 3, 'row_pitch': 35, 'odd_start': 200, 'field_start': 22, 'row_origin': 130, 'address': 154, 'allocation_end': 343}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 3, 'base': 22}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 50, 'odd_start': 225, 'field_start': 225, 'row_origin': 378, 'address': 423, 'allocation_end': 428}), ({'w': 19, 'h': 11, 'x': 16, 'y': 8, 'b': 3, 'base': 22}, {'even_rows': 6, 'odd_rows': 5, 'field': 0, 'field_row': 4, 'row_pitch': 59, 'odd_start': 379, 'field_start': 22, 'row_origin': 261, 'address': 309, 'allocation_end': 677}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 3, 'base': 22}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 23, 'odd_start': 186, 'field_start': 22, 'row_origin': 163, 'address': 172, 'allocation_end': 327})], 3: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 4, 'base': 33}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 6, 'odd_start': 42, 'field_start': 33, 'row_origin': 36, 'address': 36, 'allocation_end': 45}), ({'w': 8, 'h': 6, 'x': 1, 'y': 2, 'b': 4, 'base': 33}, {'even_rows': 3, 'odd_rows': 3, 'field': 0, 'field_row': 1, 'row_pitch': 34, 'odd_start': 138, 'field_start': 33, 'row_origin': 70, 'address': 74, 'allocation_end': 243}), ({'w': 12, 'h': 10, 'x': 8, 'y': 6, 'b': 4, 'base': 33}, {'even_rows': 5, 'odd_rows': 5, 'field': 0, 'field_row': 3, 'row_pitch': 50, 'odd_start': 286, 'field_start': 33, 'row_origin': 186, 'address': 218, 'allocation_end': 539}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 4, 'base': 33}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 66, 'odd_start': 300, 'field_start': 300, 'row_origin': 501, 'address': 561, 'allocation_end': 567}), ({'w': 20, 'h': 12, 'x': 16, 'y': 8, 'b': 4, 'base': 33}, {'even_rows': 6, 'odd_rows': 6, 'field': 0, 'field_row': 4, 'row_pitch': 82, 'odd_start': 528, 'field_start': 33, 'row_origin': 364, 'address': 428, 'allocation_end': 1023}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 4, 'base': 33}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 30, 'odd_start': 246, 'field_start': 33, 'row_origin': 216, 'address': 228, 'allocation_end': 429})], 4: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 5, 'base': 44}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 7, 'odd_start': 54, 'field_start': 44, 'row_origin': 47, 'address': 47, 'allocation_end': 57}), ({'w': 9, 'h': 7, 'x': 1, 'y': 2, 'b': 5, 'base': 44}, {'even_rows': 4, 'odd_rows': 3, 'field': 0, 'field_row': 1, 'row_pitch': 47, 'odd_start': 235, 'field_start': 44, 'row_origin': 94, 'address': 99, 'allocation_end': 379}), ({'w': 13, 'h': 11, 'x': 8, 'y': 6, 'b': 5, 'base': 44}, {'even_rows': 6, 'odd_rows': 5, 'field': 0, 'field_row': 3, 'row_pitch': 67, 'odd_start': 449, 'field_start': 44, 'row_origin': 248, 'address': 288, 'allocation_end': 787}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 5, 'base': 44}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 82, 'odd_start': 375, 'field_start': 375, 'row_origin': 624, 'address': 699, 'allocation_end': 706}), ({'w': 21, 'h': 13, 'x': 16, 'y': 8, 'b': 5, 'base': 44}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 4, 'row_pitch': 107, 'odd_start': 796, 'field_start': 44, 'row_origin': 475, 'address': 555, 'allocation_end': 1441}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 5, 'base': 44}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 37, 'odd_start': 306, 'field_start': 44, 'row_origin': 269, 'address': 284, 'allocation_end': 531})], 5: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 6, 'base': 55}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 8, 'odd_start': 66, 'field_start': 55, 'row_origin': 58, 'address': 58, 'allocation_end': 69}), ({'w': 10, 'h': 8, 'x': 1, 'y': 2, 'b': 6, 'base': 55}, {'even_rows': 4, 'odd_rows': 4, 'field': 0, 'field_row': 1, 'row_pitch': 62, 'odd_start': 306, 'field_start': 55, 'row_origin': 120, 'address': 126, 'allocation_end': 557}), ({'w': 14, 'h': 12, 'x': 8, 'y': 6, 'b': 6, 'base': 55}, {'even_rows': 6, 'odd_rows': 6, 'field': 0, 'field_row': 3, 'row_pitch': 86, 'odd_start': 574, 'field_start': 55, 'row_origin': 316, 'address': 364, 'allocation_end': 1093}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 6, 'base': 55}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 98, 'odd_start': 450, 'field_start': 450, 'row_origin': 747, 'address': 837, 'allocation_end': 845}), ({'w': 22, 'h': 14, 'x': 16, 'y': 8, 'b': 6, 'base': 55}, {'even_rows': 7, 'odd_rows': 7, 'field': 0, 'field_row': 4, 'row_pitch': 134, 'odd_start': 996, 'field_start': 55, 'row_origin': 594, 'address': 690, 'allocation_end': 1937}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 6, 'base': 55}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 44, 'odd_start': 366, 'field_start': 55, 'row_origin': 322, 'address': 340, 'allocation_end': 633})]}
for i, (p, expected) in enumerate(cases[N]):
    check("layout fixture " + str(i + 1), solve(p), 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
layout fixture 1{'address': 14, 'allocation_end': 21, 'even_rows': 1, 'field': 0, 'field_row': 0, 'field_start': 11, 'odd_rows': 0, 'odd_start': 18, 'row_origin': 14, 'row_pitch': 4}{'address': 14, 'allocation_end': 21, 'even_rows': 1, 'field': 0, 'field_row': 0, 'field_start': 11, 'odd_rows': 0, 'odd_start': 18, 'row_origin': 14, 'row_pitch': 4}Passed
layout fixture 2{'address': 61, 'allocation_end': 73, 'even_rows': 2, 'field': 1, 'field_row': 1, 'field_start': 42, 'odd_rows': 2, 'odd_start': 42, 'row_origin': 59, 'row_pitch': 14}{'address': 30, 'allocation_end': 73, 'even_rows': 2, 'field': 0, 'field_row': 1, 'field_start': 11, 'odd_rows': 2, 'odd_start': 42, 'row_origin': 28, 'row_pitch': 14}Failed
layout fixture 3{'address': 187, 'allocation_end': 193, 'even_rows': 4, 'field': 3, 'field_row': 3, 'field_start': 102, 'odd_rows': 4, 'odd_start': 102, 'row_origin': 171, 'row_pitch': 22}{'address': 96, 'allocation_end': 193, 'even_rows': 4, 'field': 0, 'field_row': 3, 'field_start': 11, 'odd_rows': 4, 'odd_start': 102, 'row_origin': 80, 'row_pitch': 22}Failed
layout fixture 4{'address': 285, 'allocation_end': 289, 'even_rows': 4, 'field': 3, 'field_row': 3, 'field_start': 150, 'odd_rows': 4, 'odd_start': 150, 'row_origin': 255, 'row_pitch': 34}{'address': 285, 'allocation_end': 289, 'even_rows': 4, 'field': 1, 'field_row': 3, 'field_start': 150, 'odd_rows': 4, 'odd_start': 150, 'row_origin': 255, 'row_pitch': 34}Failed
layout fixture 5{'address': 391, 'allocation_end': 397, 'even_rows': 5, 'field': 4, 'field_row': 4, 'field_start': 204, 'odd_rows': 5, 'odd_start': 204, 'row_origin': 359, 'row_pitch': 38}{'address': 198, 'allocation_end': 397, 'even_rows': 5, 'field': 0, 'field_row': 4, 'field_start': 11, 'odd_rows': 5, 'odd_start': 204, 'row_origin': 166, 'row_pitch': 38}Failed
layout fixture 6{'address': 231, 'allocation_end': 225, 'even_rows': 7, 'field': 6, 'field_row': 6, 'field_start': 126, 'odd_rows': 6, 'odd_start': 126, 'row_origin': 225, 'row_pitch': 16}{'address': 116, 'allocation_end': 225, 'even_rows': 7, 'field': 0, 'field_row': 6, 'field_start': 11, 'odd_rows': 6, 'odd_start': 126, 'row_origin': 110, 'row_pitch': 16}Failed

SHA-256 / b4deb0c5f231b6e4964ac97b998db589556d0b1e357566aed4d20e7a4c8c71c8

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(p):
    p = dict(p)
    even_rows = (p["h"]+1)//2
    odd_rows = p["h"]//2
    field = 1-p["y"]%2
    field_row = p["y"]//2
    row_pitch = p["w"]*p["b"]+2
    odd_start = p["base"]+3+even_rows*row_pitch
    field_start = p["base"] if field==0 else odd_start
    row_origin = field_start+3+field_row*row_pitch
    address = row_origin+p["x"]*p["b"]
    allocation_end = odd_start+3+odd_rows*row_pitch
    return {'even_rows': even_rows, 'odd_rows': odd_rows, 'field': field, 'field_row': field_row, 'row_pitch': row_pitch, 'odd_start': odd_start, 'field_start': field_start, 'row_origin': row_origin, 'address': address, 'allocation_end': allocation_end}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 2, 'base': 11}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 4, 'odd_start': 18, 'field_start': 11, 'row_origin': 14, 'address': 14, 'allocation_end': 21}), ({'w': 6, 'h': 4, 'x': 1, 'y': 2, 'b': 2, 'base': 11}, {'even_rows': 2, 'odd_rows': 2, 'field': 0, 'field_row': 1, 'row_pitch': 14, 'odd_start': 42, 'field_start': 11, 'row_origin': 28, 'address': 30, 'allocation_end': 73}), ({'w': 10, 'h': 8, 'x': 8, 'y': 6, 'b': 2, 'base': 11}, {'even_rows': 4, 'odd_rows': 4, 'field': 0, 'field_row': 3, 'row_pitch': 22, 'odd_start': 102, 'field_start': 11, 'row_origin': 80, 'address': 96, 'allocation_end': 193}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 2, 'base': 11}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 34, 'odd_start': 150, 'field_start': 150, 'row_origin': 255, 'address': 285, 'allocation_end': 289}), ({'w': 18, 'h': 10, 'x': 16, 'y': 8, 'b': 2, 'base': 11}, {'even_rows': 5, 'odd_rows': 5, 'field': 0, 'field_row': 4, 'row_pitch': 38, 'odd_start': 204, 'field_start': 11, 'row_origin': 166, 'address': 198, 'allocation_end': 397}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 2, 'base': 11}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 16, 'odd_start': 126, 'field_start': 11, 'row_origin': 110, 'address': 116, 'allocation_end': 225})], 2: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 3, 'base': 22}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 5, 'odd_start': 30, 'field_start': 22, 'row_origin': 25, 'address': 25, 'allocation_end': 33}), ({'w': 7, 'h': 5, 'x': 1, 'y': 2, 'b': 3, 'base': 22}, {'even_rows': 3, 'odd_rows': 2, 'field': 0, 'field_row': 1, 'row_pitch': 23, 'odd_start': 94, 'field_start': 22, 'row_origin': 48, 'address': 51, 'allocation_end': 143}), ({'w': 11, 'h': 9, 'x': 8, 'y': 6, 'b': 3, 'base': 22}, {'even_rows': 5, 'odd_rows': 4, 'field': 0, 'field_row': 3, 'row_pitch': 35, 'odd_start': 200, 'field_start': 22, 'row_origin': 130, 'address': 154, 'allocation_end': 343}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 3, 'base': 22}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 50, 'odd_start': 225, 'field_start': 225, 'row_origin': 378, 'address': 423, 'allocation_end': 428}), ({'w': 19, 'h': 11, 'x': 16, 'y': 8, 'b': 3, 'base': 22}, {'even_rows': 6, 'odd_rows': 5, 'field': 0, 'field_row': 4, 'row_pitch': 59, 'odd_start': 379, 'field_start': 22, 'row_origin': 261, 'address': 309, 'allocation_end': 677}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 3, 'base': 22}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 23, 'odd_start': 186, 'field_start': 22, 'row_origin': 163, 'address': 172, 'allocation_end': 327})], 3: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 4, 'base': 33}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 6, 'odd_start': 42, 'field_start': 33, 'row_origin': 36, 'address': 36, 'allocation_end': 45}), ({'w': 8, 'h': 6, 'x': 1, 'y': 2, 'b': 4, 'base': 33}, {'even_rows': 3, 'odd_rows': 3, 'field': 0, 'field_row': 1, 'row_pitch': 34, 'odd_start': 138, 'field_start': 33, 'row_origin': 70, 'address': 74, 'allocation_end': 243}), ({'w': 12, 'h': 10, 'x': 8, 'y': 6, 'b': 4, 'base': 33}, {'even_rows': 5, 'odd_rows': 5, 'field': 0, 'field_row': 3, 'row_pitch': 50, 'odd_start': 286, 'field_start': 33, 'row_origin': 186, 'address': 218, 'allocation_end': 539}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 4, 'base': 33}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 66, 'odd_start': 300, 'field_start': 300, 'row_origin': 501, 'address': 561, 'allocation_end': 567}), ({'w': 20, 'h': 12, 'x': 16, 'y': 8, 'b': 4, 'base': 33}, {'even_rows': 6, 'odd_rows': 6, 'field': 0, 'field_row': 4, 'row_pitch': 82, 'odd_start': 528, 'field_start': 33, 'row_origin': 364, 'address': 428, 'allocation_end': 1023}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 4, 'base': 33}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 30, 'odd_start': 246, 'field_start': 33, 'row_origin': 216, 'address': 228, 'allocation_end': 429})], 4: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 5, 'base': 44}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 7, 'odd_start': 54, 'field_start': 44, 'row_origin': 47, 'address': 47, 'allocation_end': 57}), ({'w': 9, 'h': 7, 'x': 1, 'y': 2, 'b': 5, 'base': 44}, {'even_rows': 4, 'odd_rows': 3, 'field': 0, 'field_row': 1, 'row_pitch': 47, 'odd_start': 235, 'field_start': 44, 'row_origin': 94, 'address': 99, 'allocation_end': 379}), ({'w': 13, 'h': 11, 'x': 8, 'y': 6, 'b': 5, 'base': 44}, {'even_rows': 6, 'odd_rows': 5, 'field': 0, 'field_row': 3, 'row_pitch': 67, 'odd_start': 449, 'field_start': 44, 'row_origin': 248, 'address': 288, 'allocation_end': 787}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 5, 'base': 44}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 82, 'odd_start': 375, 'field_start': 375, 'row_origin': 624, 'address': 699, 'allocation_end': 706}), ({'w': 21, 'h': 13, 'x': 16, 'y': 8, 'b': 5, 'base': 44}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 4, 'row_pitch': 107, 'odd_start': 796, 'field_start': 44, 'row_origin': 475, 'address': 555, 'allocation_end': 1441}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 5, 'base': 44}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 37, 'odd_start': 306, 'field_start': 44, 'row_origin': 269, 'address': 284, 'allocation_end': 531})], 5: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 6, 'base': 55}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 8, 'odd_start': 66, 'field_start': 55, 'row_origin': 58, 'address': 58, 'allocation_end': 69}), ({'w': 10, 'h': 8, 'x': 1, 'y': 2, 'b': 6, 'base': 55}, {'even_rows': 4, 'odd_rows': 4, 'field': 0, 'field_row': 1, 'row_pitch': 62, 'odd_start': 306, 'field_start': 55, 'row_origin': 120, 'address': 126, 'allocation_end': 557}), ({'w': 14, 'h': 12, 'x': 8, 'y': 6, 'b': 6, 'base': 55}, {'even_rows': 6, 'odd_rows': 6, 'field': 0, 'field_row': 3, 'row_pitch': 86, 'odd_start': 574, 'field_start': 55, 'row_origin': 316, 'address': 364, 'allocation_end': 1093}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 6, 'base': 55}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 98, 'odd_start': 450, 'field_start': 450, 'row_origin': 747, 'address': 837, 'allocation_end': 845}), ({'w': 22, 'h': 14, 'x': 16, 'y': 8, 'b': 6, 'base': 55}, {'even_rows': 7, 'odd_rows': 7, 'field': 0, 'field_row': 4, 'row_pitch': 134, 'odd_start': 996, 'field_start': 55, 'row_origin': 594, 'address': 690, 'allocation_end': 1937}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 6, 'base': 55}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 44, 'odd_start': 366, 'field_start': 55, 'row_origin': 322, 'address': 340, 'allocation_end': 633})]}
for i, (p, expected) in enumerate(cases[N]):
    check("layout fixture " + str(i + 1), solve(p), 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
layout fixture 1{'address': 21, 'allocation_end': 21, 'even_rows': 1, 'field': 1, 'field_row': 0, 'field_start': 18, 'odd_rows': 0, 'odd_start': 18, 'row_origin': 21, 'row_pitch': 4}{'address': 14, 'allocation_end': 21, 'even_rows': 1, 'field': 0, 'field_row': 0, 'field_start': 11, 'odd_rows': 0, 'odd_start': 18, 'row_origin': 14, 'row_pitch': 4}Failed
layout fixture 2{'address': 61, 'allocation_end': 73, 'even_rows': 2, 'field': 1, 'field_row': 1, 'field_start': 42, 'odd_rows': 2, 'odd_start': 42, 'row_origin': 59, 'row_pitch': 14}{'address': 30, 'allocation_end': 73, 'even_rows': 2, 'field': 0, 'field_row': 1, 'field_start': 11, 'odd_rows': 2, 'odd_start': 42, 'row_origin': 28, 'row_pitch': 14}Failed
layout fixture 3{'address': 187, 'allocation_end': 193, 'even_rows': 4, 'field': 1, 'field_row': 3, 'field_start': 102, 'odd_rows': 4, 'odd_start': 102, 'row_origin': 171, 'row_pitch': 22}{'address': 96, 'allocation_end': 193, 'even_rows': 4, 'field': 0, 'field_row': 3, 'field_start': 11, 'odd_rows': 4, 'odd_start': 102, 'row_origin': 80, 'row_pitch': 22}Failed
layout fixture 4{'address': 146, 'allocation_end': 289, 'even_rows': 4, 'field': 0, 'field_row': 3, 'field_start': 11, 'odd_rows': 4, 'odd_start': 150, 'row_origin': 116, 'row_pitch': 34}{'address': 285, 'allocation_end': 289, 'even_rows': 4, 'field': 1, 'field_row': 3, 'field_start': 150, 'odd_rows': 4, 'odd_start': 150, 'row_origin': 255, 'row_pitch': 34}Failed
layout fixture 5{'address': 391, 'allocation_end': 397, 'even_rows': 5, 'field': 1, 'field_row': 4, 'field_start': 204, 'odd_rows': 5, 'odd_start': 204, 'row_origin': 359, 'row_pitch': 38}{'address': 198, 'allocation_end': 397, 'even_rows': 5, 'field': 0, 'field_row': 4, 'field_start': 11, 'odd_rows': 5, 'odd_start': 204, 'row_origin': 166, 'row_pitch': 38}Failed
layout fixture 6{'address': 231, 'allocation_end': 225, 'even_rows': 7, 'field': 1, 'field_row': 6, 'field_start': 126, 'odd_rows': 6, 'odd_start': 126, 'row_origin': 225, 'row_pitch': 16}{'address': 116, 'allocation_end': 225, 'even_rows': 7, 'field': 0, 'field_row': 6, 'field_start': 11, 'odd_rows': 6, 'odd_start': 126, 'row_origin': 110, 'row_pitch': 16}Failed

SHA-256 / 51e8cc7aa60ed4690f1b3bc1979ca633bb81b2992bb783bbbf6ef727ab1859e2

3 / The verified repair

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

N = 1
observations = []
def solve(p):
    p = dict(p)
    even_rows = (p["h"]+1)//2
    odd_rows = p["h"]//2
    field = p["y"]%2
    field_row = p["y"]//2
    row_pitch = p["w"]*p["b"]+2
    odd_start = p["base"]+3+even_rows*row_pitch
    field_start = p["base"] if field==0 else odd_start
    row_origin = field_start+3+field_row*row_pitch
    address = row_origin+p["x"]*p["b"]
    allocation_end = odd_start+3+odd_rows*row_pitch
    return {'even_rows': even_rows, 'odd_rows': odd_rows, 'field': field, 'field_row': field_row, 'row_pitch': row_pitch, 'odd_start': odd_start, 'field_start': field_start, 'row_origin': row_origin, 'address': address, 'allocation_end': allocation_end}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 2, 'base': 11}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 4, 'odd_start': 18, 'field_start': 11, 'row_origin': 14, 'address': 14, 'allocation_end': 21}), ({'w': 6, 'h': 4, 'x': 1, 'y': 2, 'b': 2, 'base': 11}, {'even_rows': 2, 'odd_rows': 2, 'field': 0, 'field_row': 1, 'row_pitch': 14, 'odd_start': 42, 'field_start': 11, 'row_origin': 28, 'address': 30, 'allocation_end': 73}), ({'w': 10, 'h': 8, 'x': 8, 'y': 6, 'b': 2, 'base': 11}, {'even_rows': 4, 'odd_rows': 4, 'field': 0, 'field_row': 3, 'row_pitch': 22, 'odd_start': 102, 'field_start': 11, 'row_origin': 80, 'address': 96, 'allocation_end': 193}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 2, 'base': 11}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 34, 'odd_start': 150, 'field_start': 150, 'row_origin': 255, 'address': 285, 'allocation_end': 289}), ({'w': 18, 'h': 10, 'x': 16, 'y': 8, 'b': 2, 'base': 11}, {'even_rows': 5, 'odd_rows': 5, 'field': 0, 'field_row': 4, 'row_pitch': 38, 'odd_start': 204, 'field_start': 11, 'row_origin': 166, 'address': 198, 'allocation_end': 397}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 2, 'base': 11}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 16, 'odd_start': 126, 'field_start': 11, 'row_origin': 110, 'address': 116, 'allocation_end': 225})], 2: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 3, 'base': 22}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 5, 'odd_start': 30, 'field_start': 22, 'row_origin': 25, 'address': 25, 'allocation_end': 33}), ({'w': 7, 'h': 5, 'x': 1, 'y': 2, 'b': 3, 'base': 22}, {'even_rows': 3, 'odd_rows': 2, 'field': 0, 'field_row': 1, 'row_pitch': 23, 'odd_start': 94, 'field_start': 22, 'row_origin': 48, 'address': 51, 'allocation_end': 143}), ({'w': 11, 'h': 9, 'x': 8, 'y': 6, 'b': 3, 'base': 22}, {'even_rows': 5, 'odd_rows': 4, 'field': 0, 'field_row': 3, 'row_pitch': 35, 'odd_start': 200, 'field_start': 22, 'row_origin': 130, 'address': 154, 'allocation_end': 343}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 3, 'base': 22}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 50, 'odd_start': 225, 'field_start': 225, 'row_origin': 378, 'address': 423, 'allocation_end': 428}), ({'w': 19, 'h': 11, 'x': 16, 'y': 8, 'b': 3, 'base': 22}, {'even_rows': 6, 'odd_rows': 5, 'field': 0, 'field_row': 4, 'row_pitch': 59, 'odd_start': 379, 'field_start': 22, 'row_origin': 261, 'address': 309, 'allocation_end': 677}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 3, 'base': 22}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 23, 'odd_start': 186, 'field_start': 22, 'row_origin': 163, 'address': 172, 'allocation_end': 327})], 3: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 4, 'base': 33}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 6, 'odd_start': 42, 'field_start': 33, 'row_origin': 36, 'address': 36, 'allocation_end': 45}), ({'w': 8, 'h': 6, 'x': 1, 'y': 2, 'b': 4, 'base': 33}, {'even_rows': 3, 'odd_rows': 3, 'field': 0, 'field_row': 1, 'row_pitch': 34, 'odd_start': 138, 'field_start': 33, 'row_origin': 70, 'address': 74, 'allocation_end': 243}), ({'w': 12, 'h': 10, 'x': 8, 'y': 6, 'b': 4, 'base': 33}, {'even_rows': 5, 'odd_rows': 5, 'field': 0, 'field_row': 3, 'row_pitch': 50, 'odd_start': 286, 'field_start': 33, 'row_origin': 186, 'address': 218, 'allocation_end': 539}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 4, 'base': 33}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 66, 'odd_start': 300, 'field_start': 300, 'row_origin': 501, 'address': 561, 'allocation_end': 567}), ({'w': 20, 'h': 12, 'x': 16, 'y': 8, 'b': 4, 'base': 33}, {'even_rows': 6, 'odd_rows': 6, 'field': 0, 'field_row': 4, 'row_pitch': 82, 'odd_start': 528, 'field_start': 33, 'row_origin': 364, 'address': 428, 'allocation_end': 1023}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 4, 'base': 33}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 30, 'odd_start': 246, 'field_start': 33, 'row_origin': 216, 'address': 228, 'allocation_end': 429})], 4: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 5, 'base': 44}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 7, 'odd_start': 54, 'field_start': 44, 'row_origin': 47, 'address': 47, 'allocation_end': 57}), ({'w': 9, 'h': 7, 'x': 1, 'y': 2, 'b': 5, 'base': 44}, {'even_rows': 4, 'odd_rows': 3, 'field': 0, 'field_row': 1, 'row_pitch': 47, 'odd_start': 235, 'field_start': 44, 'row_origin': 94, 'address': 99, 'allocation_end': 379}), ({'w': 13, 'h': 11, 'x': 8, 'y': 6, 'b': 5, 'base': 44}, {'even_rows': 6, 'odd_rows': 5, 'field': 0, 'field_row': 3, 'row_pitch': 67, 'odd_start': 449, 'field_start': 44, 'row_origin': 248, 'address': 288, 'allocation_end': 787}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 5, 'base': 44}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 82, 'odd_start': 375, 'field_start': 375, 'row_origin': 624, 'address': 699, 'allocation_end': 706}), ({'w': 21, 'h': 13, 'x': 16, 'y': 8, 'b': 5, 'base': 44}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 4, 'row_pitch': 107, 'odd_start': 796, 'field_start': 44, 'row_origin': 475, 'address': 555, 'allocation_end': 1441}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 5, 'base': 44}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 37, 'odd_start': 306, 'field_start': 44, 'row_origin': 269, 'address': 284, 'allocation_end': 531})], 5: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 6, 'base': 55}, {'even_rows': 1, 'odd_rows': 0, 'field': 0, 'field_row': 0, 'row_pitch': 8, 'odd_start': 66, 'field_start': 55, 'row_origin': 58, 'address': 58, 'allocation_end': 69}), ({'w': 10, 'h': 8, 'x': 1, 'y': 2, 'b': 6, 'base': 55}, {'even_rows': 4, 'odd_rows': 4, 'field': 0, 'field_row': 1, 'row_pitch': 62, 'odd_start': 306, 'field_start': 55, 'row_origin': 120, 'address': 126, 'allocation_end': 557}), ({'w': 14, 'h': 12, 'x': 8, 'y': 6, 'b': 6, 'base': 55}, {'even_rows': 6, 'odd_rows': 6, 'field': 0, 'field_row': 3, 'row_pitch': 86, 'odd_start': 574, 'field_start': 55, 'row_origin': 316, 'address': 364, 'allocation_end': 1093}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 6, 'base': 55}, {'even_rows': 4, 'odd_rows': 4, 'field': 1, 'field_row': 3, 'row_pitch': 98, 'odd_start': 450, 'field_start': 450, 'row_origin': 747, 'address': 837, 'allocation_end': 845}), ({'w': 22, 'h': 14, 'x': 16, 'y': 8, 'b': 6, 'base': 55}, {'even_rows': 7, 'odd_rows': 7, 'field': 0, 'field_row': 4, 'row_pitch': 134, 'odd_start': 996, 'field_start': 55, 'row_origin': 594, 'address': 690, 'allocation_end': 1937}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 6, 'base': 55}, {'even_rows': 7, 'odd_rows': 6, 'field': 0, 'field_row': 6, 'row_pitch': 44, 'odd_start': 366, 'field_start': 55, 'row_origin': 322, 'address': 340, 'allocation_end': 633})]}
for i, (p, expected) in enumerate(cases[N]):
    check("layout fixture " + str(i + 1), solve(p), 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
layout fixture 1{'address': 14, 'allocation_end': 21, 'even_rows': 1, 'field': 0, 'field_row': 0, 'field_start': 11, 'odd_rows': 0, 'odd_start': 18, 'row_origin': 14, 'row_pitch': 4}{'address': 14, 'allocation_end': 21, 'even_rows': 1, 'field': 0, 'field_row': 0, 'field_start': 11, 'odd_rows': 0, 'odd_start': 18, 'row_origin': 14, 'row_pitch': 4}Passed
layout fixture 2{'address': 30, 'allocation_end': 73, 'even_rows': 2, 'field': 0, 'field_row': 1, 'field_start': 11, 'odd_rows': 2, 'odd_start': 42, 'row_origin': 28, 'row_pitch': 14}{'address': 30, 'allocation_end': 73, 'even_rows': 2, 'field': 0, 'field_row': 1, 'field_start': 11, 'odd_rows': 2, 'odd_start': 42, 'row_origin': 28, 'row_pitch': 14}Passed
layout fixture 3{'address': 96, 'allocation_end': 193, 'even_rows': 4, 'field': 0, 'field_row': 3, 'field_start': 11, 'odd_rows': 4, 'odd_start': 102, 'row_origin': 80, 'row_pitch': 22}{'address': 96, 'allocation_end': 193, 'even_rows': 4, 'field': 0, 'field_row': 3, 'field_start': 11, 'odd_rows': 4, 'odd_start': 102, 'row_origin': 80, 'row_pitch': 22}Passed
layout fixture 4{'address': 285, 'allocation_end': 289, 'even_rows': 4, 'field': 1, 'field_row': 3, 'field_start': 150, 'odd_rows': 4, 'odd_start': 150, 'row_origin': 255, 'row_pitch': 34}{'address': 285, 'allocation_end': 289, 'even_rows': 4, 'field': 1, 'field_row': 3, 'field_start': 150, 'odd_rows': 4, 'odd_start': 150, 'row_origin': 255, 'row_pitch': 34}Passed
layout fixture 5{'address': 198, 'allocation_end': 397, 'even_rows': 5, 'field': 0, 'field_row': 4, 'field_start': 11, 'odd_rows': 5, 'odd_start': 204, 'row_origin': 166, 'row_pitch': 38}{'address': 198, 'allocation_end': 397, 'even_rows': 5, 'field': 0, 'field_row': 4, 'field_start': 11, 'odd_rows': 5, 'odd_start': 204, 'row_origin': 166, 'row_pitch': 38}Passed
layout fixture 6{'address': 116, 'allocation_end': 225, 'even_rows': 7, 'field': 0, 'field_row': 6, 'field_start': 11, 'odd_rows': 6, 'odd_start': 126, 'row_origin': 110, 'row_pitch': 16}{'address': 116, 'allocation_end': 225, 'even_rows': 7, 'field': 0, 'field_row': 6, 'field_start': 11, 'odd_rows': 6, 'odd_start': 126, 'row_origin': 110, 'row_pitch': 16}Passed

SHA-256 / 97170ce3fc694bb334603750d879ceb4f3fc8b4e8f5279807667adb3a7181da9

Verification & scope

Stipulated deterministic toy buffer layout; not a graphics API, codec, GPU vendor tiling specification, or hardware-conformance claim. Inputs satisfy the dimensions and bounds stated by the model. 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:45:27.555710+00:00.

Case digest / 83a62e14eed53b72e34a2b6306023d0f4471b26c7ead3bcae152e8f16bba8303