FAILURE MAP
← Case archive

FA-53331 / Raster memory layout / Open access

Four Tap Sensor Storage: Readout sample includes packet header or uses full sensor row pitch · case 01

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

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

ROOT CAUSE

Readout sample includes packet header or uses full sensor row pitch The faulty expression is packet_origin+(local_y*half_width+local_x)*p["b"].

VERIFIED REPAIR

Apply the stipulated layout rule at address: packet_origin+3+(local_y*half_width+local_x)*p["b"].

Unsuccessful approach: The attempted repair uses packet_origin+3+(local_y*p["w"]+local_x)*p["b"] and still violates the layout contract.

Case contract

A stipulated even-sized sensor splits the image into four quadrants. Each readout tap scans toward the center: right taps reverse x, bottom taps reverse y. Tap packets have three-byte headers and are stored in order [2,0,3,1]. 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)
    half_width = p["w"]//2
    half_height = p["h"]//2
    tap = (2 if p["y"]>=half_height else 0)+(1 if p["x"]>=half_width else 0)
    local_x = p["x"] if tap%2==0 else p["w"]-1-p["x"]
    local_y = p["y"] if tap<2 else p["h"]-1-p["y"]
    storage_slot = [1,3,0,2][tap]
    packet_pitch = half_width*half_height*p["b"]+3
    packet_origin = p["base"]+storage_slot*packet_pitch
    address = packet_origin+(local_y*half_width+local_x)*p["b"]
    allocation_end = p["base"]+4*packet_pitch
    return {'half_width': half_width, 'half_height': half_height, 'tap': tap, 'local_x': local_x, 'local_y': local_y, 'storage_slot': storage_slot, 'packet_pitch': packet_pitch, 'packet_origin': packet_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': 8, 'h': 8, 'x': 0, 'y': 0, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 35, 'packet_origin': 42, 'address': 45, 'allocation_end': 147}), ({'w': 8, 'h': 10, 'x': 5, 'y': 1, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 5, 'tap': 1, 'local_x': 2, 'local_y': 1, 'storage_slot': 3, 'packet_pitch': 43, 'packet_origin': 136, 'address': 151, 'allocation_end': 179}), ({'w': 8, 'h': 12, 'x': 1, 'y': 6, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 51, 'packet_origin': 7, 'address': 52, 'allocation_end': 211}), ({'w': 8, 'h': 14, 'x': 6, 'y': 7, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 7, 'tap': 3, 'local_x': 1, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 59, 'packet_origin': 125, 'address': 178, 'allocation_end': 243}), ({'w': 8, 'h': 16, 'x': 1, 'y': 2, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 8, 'tap': 0, 'local_x': 1, 'local_y': 2, 'storage_slot': 1, 'packet_pitch': 67, 'packet_origin': 74, 'address': 95, 'allocation_end': 275}), ({'w': 8, 'h': 18, 'x': 2, 'y': 11, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 9, 'tap': 2, 'local_x': 2, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 75, 'packet_origin': 7, 'address': 62, 'allocation_end': 307})], 2: [({'w': 10, 'h': 8, 'x': 0, 'y': 0, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 63, 'packet_origin': 77, 'address': 80, 'allocation_end': 266}), ({'w': 10, 'h': 10, 'x': 5, 'y': 1, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 5, 'tap': 1, 'local_x': 4, 'local_y': 1, 'storage_slot': 3, 'packet_pitch': 78, 'packet_origin': 248, 'address': 278, 'allocation_end': 326}), ({'w': 10, 'h': 12, 'x': 1, 'y': 6, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 93, 'packet_origin': 14, 'address': 95, 'allocation_end': 386}), ({'w': 10, 'h': 14, 'x': 6, 'y': 7, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 7, 'tap': 3, 'local_x': 3, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 108, 'packet_origin': 230, 'address': 332, 'allocation_end': 446}), ({'w': 10, 'h': 16, 'x': 9, 'y': 2, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 8, 'tap': 1, 'local_x': 0, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 123, 'packet_origin': 383, 'address': 416, 'allocation_end': 506}), ({'w': 10, 'h': 18, 'x': 0, 'y': 11, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 9, 'tap': 2, 'local_x': 0, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 138, 'packet_origin': 14, 'address': 107, 'allocation_end': 566})], 3: [({'w': 12, 'h': 8, 'x': 0, 'y': 0, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 99, 'packet_origin': 120, 'address': 123, 'allocation_end': 417}), ({'w': 12, 'h': 10, 'x': 5, 'y': 1, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 5, 'tap': 0, 'local_x': 5, 'local_y': 1, 'storage_slot': 1, 'packet_pitch': 123, 'packet_origin': 144, 'address': 191, 'allocation_end': 513}), ({'w': 12, 'h': 12, 'x': 1, 'y': 6, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 147, 'packet_origin': 21, 'address': 148, 'allocation_end': 609}), ({'w': 12, 'h': 14, 'x': 6, 'y': 7, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 7, 'tap': 3, 'local_x': 5, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 171, 'packet_origin': 363, 'address': 530, 'allocation_end': 705}), ({'w': 12, 'h': 16, 'x': 9, 'y': 2, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 8, 'tap': 1, 'local_x': 2, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 195, 'packet_origin': 606, 'address': 665, 'allocation_end': 801}), ({'w': 12, 'h': 18, 'x': 10, 'y': 11, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 9, 'tap': 3, 'local_x': 1, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 219, 'packet_origin': 459, 'address': 610, 'allocation_end': 897})], 4: [({'w': 14, 'h': 8, 'x': 0, 'y': 0, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 143, 'packet_origin': 171, 'address': 174, 'allocation_end': 600}), ({'w': 14, 'h': 10, 'x': 5, 'y': 1, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 5, 'tap': 0, 'local_x': 5, 'local_y': 1, 'storage_slot': 1, 'packet_pitch': 178, 'packet_origin': 206, 'address': 269, 'allocation_end': 740}), ({'w': 14, 'h': 12, 'x': 1, 'y': 6, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 213, 'packet_origin': 28, 'address': 211, 'allocation_end': 880}), ({'w': 14, 'h': 14, 'x': 6, 'y': 7, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 7, 'tap': 2, 'local_x': 6, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 248, 'packet_origin': 28, 'address': 271, 'allocation_end': 1020}), ({'w': 14, 'h': 16, 'x': 9, 'y': 2, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 8, 'tap': 1, 'local_x': 4, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 283, 'packet_origin': 877, 'address': 970, 'allocation_end': 1160}), ({'w': 14, 'h': 18, 'x': 10, 'y': 11, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 9, 'tap': 3, 'local_x': 3, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 318, 'packet_origin': 664, 'address': 892, 'allocation_end': 1300})], 5: [({'w': 16, 'h': 8, 'x': 0, 'y': 0, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 195, 'packet_origin': 230, 'address': 233, 'allocation_end': 815}), ({'w': 16, 'h': 10, 'x': 5, 'y': 1, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 5, 'tap': 0, 'local_x': 5, 'local_y': 1, 'storage_slot': 1, 'packet_pitch': 243, 'packet_origin': 278, 'address': 359, 'allocation_end': 1007}), ({'w': 16, 'h': 12, 'x': 1, 'y': 6, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 291, 'packet_origin': 35, 'address': 284, 'allocation_end': 1199}), ({'w': 16, 'h': 14, 'x': 6, 'y': 7, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 7, 'tap': 2, 'local_x': 6, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 339, 'packet_origin': 35, 'address': 362, 'allocation_end': 1391}), ({'w': 16, 'h': 16, 'x': 9, 'y': 2, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 8, 'tap': 1, 'local_x': 6, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 387, 'packet_origin': 1196, 'address': 1331, 'allocation_end': 1583}), ({'w': 16, 'h': 18, 'x': 10, 'y': 11, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 9, 'tap': 3, 'local_x': 5, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 435, 'packet_origin': 905, 'address': 1226, 'allocation_end': 1775})]}
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': 42, 'allocation_end': 147, 'half_height': 4, 'half_width': 4, 'local_x': 0, 'local_y': 0, 'packet_origin': 42, 'packet_pitch': 35, 'storage_slot': 1, 'tap': 0}{'address': 45, 'allocation_end': 147, 'half_height': 4, 'half_width': 4, 'local_x': 0, 'local_y': 0, 'packet_origin': 42, 'packet_pitch': 35, 'storage_slot': 1, 'tap': 0}Failed
layout fixture 2{'address': 148, 'allocation_end': 179, 'half_height': 5, 'half_width': 4, 'local_x': 2, 'local_y': 1, 'packet_origin': 136, 'packet_pitch': 43, 'storage_slot': 3, 'tap': 1}{'address': 151, 'allocation_end': 179, 'half_height': 5, 'half_width': 4, 'local_x': 2, 'local_y': 1, 'packet_origin': 136, 'packet_pitch': 43, 'storage_slot': 3, 'tap': 1}Failed
layout fixture 3{'address': 49, 'allocation_end': 211, 'half_height': 6, 'half_width': 4, 'local_x': 1, 'local_y': 5, 'packet_origin': 7, 'packet_pitch': 51, 'storage_slot': 0, 'tap': 2}{'address': 52, 'allocation_end': 211, 'half_height': 6, 'half_width': 4, 'local_x': 1, 'local_y': 5, 'packet_origin': 7, 'packet_pitch': 51, 'storage_slot': 0, 'tap': 2}Failed
layout fixture 4{'address': 175, 'allocation_end': 243, 'half_height': 7, 'half_width': 4, 'local_x': 1, 'local_y': 6, 'packet_origin': 125, 'packet_pitch': 59, 'storage_slot': 2, 'tap': 3}{'address': 178, 'allocation_end': 243, 'half_height': 7, 'half_width': 4, 'local_x': 1, 'local_y': 6, 'packet_origin': 125, 'packet_pitch': 59, 'storage_slot': 2, 'tap': 3}Failed
layout fixture 5{'address': 92, 'allocation_end': 275, 'half_height': 8, 'half_width': 4, 'local_x': 1, 'local_y': 2, 'packet_origin': 74, 'packet_pitch': 67, 'storage_slot': 1, 'tap': 0}{'address': 95, 'allocation_end': 275, 'half_height': 8, 'half_width': 4, 'local_x': 1, 'local_y': 2, 'packet_origin': 74, 'packet_pitch': 67, 'storage_slot': 1, 'tap': 0}Failed
layout fixture 6{'address': 59, 'allocation_end': 307, 'half_height': 9, 'half_width': 4, 'local_x': 2, 'local_y': 6, 'packet_origin': 7, 'packet_pitch': 75, 'storage_slot': 0, 'tap': 2}{'address': 62, 'allocation_end': 307, 'half_height': 9, 'half_width': 4, 'local_x': 2, 'local_y': 6, 'packet_origin': 7, 'packet_pitch': 75, 'storage_slot': 0, 'tap': 2}Failed

SHA-256 / 7e27103a65b61b2c5fd1a1af4c08af3612bf38d3364dad512b819bae85e89abe

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)
    half_width = p["w"]//2
    half_height = p["h"]//2
    tap = (2 if p["y"]>=half_height else 0)+(1 if p["x"]>=half_width else 0)
    local_x = p["x"] if tap%2==0 else p["w"]-1-p["x"]
    local_y = p["y"] if tap<2 else p["h"]-1-p["y"]
    storage_slot = [1,3,0,2][tap]
    packet_pitch = half_width*half_height*p["b"]+3
    packet_origin = p["base"]+storage_slot*packet_pitch
    address = packet_origin+3+(local_y*p["w"]+local_x)*p["b"]
    allocation_end = p["base"]+4*packet_pitch
    return {'half_width': half_width, 'half_height': half_height, 'tap': tap, 'local_x': local_x, 'local_y': local_y, 'storage_slot': storage_slot, 'packet_pitch': packet_pitch, 'packet_origin': packet_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': 8, 'h': 8, 'x': 0, 'y': 0, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 35, 'packet_origin': 42, 'address': 45, 'allocation_end': 147}), ({'w': 8, 'h': 10, 'x': 5, 'y': 1, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 5, 'tap': 1, 'local_x': 2, 'local_y': 1, 'storage_slot': 3, 'packet_pitch': 43, 'packet_origin': 136, 'address': 151, 'allocation_end': 179}), ({'w': 8, 'h': 12, 'x': 1, 'y': 6, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 51, 'packet_origin': 7, 'address': 52, 'allocation_end': 211}), ({'w': 8, 'h': 14, 'x': 6, 'y': 7, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 7, 'tap': 3, 'local_x': 1, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 59, 'packet_origin': 125, 'address': 178, 'allocation_end': 243}), ({'w': 8, 'h': 16, 'x': 1, 'y': 2, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 8, 'tap': 0, 'local_x': 1, 'local_y': 2, 'storage_slot': 1, 'packet_pitch': 67, 'packet_origin': 74, 'address': 95, 'allocation_end': 275}), ({'w': 8, 'h': 18, 'x': 2, 'y': 11, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 9, 'tap': 2, 'local_x': 2, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 75, 'packet_origin': 7, 'address': 62, 'allocation_end': 307})], 2: [({'w': 10, 'h': 8, 'x': 0, 'y': 0, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 63, 'packet_origin': 77, 'address': 80, 'allocation_end': 266}), ({'w': 10, 'h': 10, 'x': 5, 'y': 1, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 5, 'tap': 1, 'local_x': 4, 'local_y': 1, 'storage_slot': 3, 'packet_pitch': 78, 'packet_origin': 248, 'address': 278, 'allocation_end': 326}), ({'w': 10, 'h': 12, 'x': 1, 'y': 6, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 93, 'packet_origin': 14, 'address': 95, 'allocation_end': 386}), ({'w': 10, 'h': 14, 'x': 6, 'y': 7, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 7, 'tap': 3, 'local_x': 3, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 108, 'packet_origin': 230, 'address': 332, 'allocation_end': 446}), ({'w': 10, 'h': 16, 'x': 9, 'y': 2, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 8, 'tap': 1, 'local_x': 0, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 123, 'packet_origin': 383, 'address': 416, 'allocation_end': 506}), ({'w': 10, 'h': 18, 'x': 0, 'y': 11, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 9, 'tap': 2, 'local_x': 0, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 138, 'packet_origin': 14, 'address': 107, 'allocation_end': 566})], 3: [({'w': 12, 'h': 8, 'x': 0, 'y': 0, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 99, 'packet_origin': 120, 'address': 123, 'allocation_end': 417}), ({'w': 12, 'h': 10, 'x': 5, 'y': 1, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 5, 'tap': 0, 'local_x': 5, 'local_y': 1, 'storage_slot': 1, 'packet_pitch': 123, 'packet_origin': 144, 'address': 191, 'allocation_end': 513}), ({'w': 12, 'h': 12, 'x': 1, 'y': 6, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 147, 'packet_origin': 21, 'address': 148, 'allocation_end': 609}), ({'w': 12, 'h': 14, 'x': 6, 'y': 7, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 7, 'tap': 3, 'local_x': 5, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 171, 'packet_origin': 363, 'address': 530, 'allocation_end': 705}), ({'w': 12, 'h': 16, 'x': 9, 'y': 2, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 8, 'tap': 1, 'local_x': 2, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 195, 'packet_origin': 606, 'address': 665, 'allocation_end': 801}), ({'w': 12, 'h': 18, 'x': 10, 'y': 11, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 9, 'tap': 3, 'local_x': 1, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 219, 'packet_origin': 459, 'address': 610, 'allocation_end': 897})], 4: [({'w': 14, 'h': 8, 'x': 0, 'y': 0, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 143, 'packet_origin': 171, 'address': 174, 'allocation_end': 600}), ({'w': 14, 'h': 10, 'x': 5, 'y': 1, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 5, 'tap': 0, 'local_x': 5, 'local_y': 1, 'storage_slot': 1, 'packet_pitch': 178, 'packet_origin': 206, 'address': 269, 'allocation_end': 740}), ({'w': 14, 'h': 12, 'x': 1, 'y': 6, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 213, 'packet_origin': 28, 'address': 211, 'allocation_end': 880}), ({'w': 14, 'h': 14, 'x': 6, 'y': 7, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 7, 'tap': 2, 'local_x': 6, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 248, 'packet_origin': 28, 'address': 271, 'allocation_end': 1020}), ({'w': 14, 'h': 16, 'x': 9, 'y': 2, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 8, 'tap': 1, 'local_x': 4, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 283, 'packet_origin': 877, 'address': 970, 'allocation_end': 1160}), ({'w': 14, 'h': 18, 'x': 10, 'y': 11, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 9, 'tap': 3, 'local_x': 3, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 318, 'packet_origin': 664, 'address': 892, 'allocation_end': 1300})], 5: [({'w': 16, 'h': 8, 'x': 0, 'y': 0, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 195, 'packet_origin': 230, 'address': 233, 'allocation_end': 815}), ({'w': 16, 'h': 10, 'x': 5, 'y': 1, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 5, 'tap': 0, 'local_x': 5, 'local_y': 1, 'storage_slot': 1, 'packet_pitch': 243, 'packet_origin': 278, 'address': 359, 'allocation_end': 1007}), ({'w': 16, 'h': 12, 'x': 1, 'y': 6, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 291, 'packet_origin': 35, 'address': 284, 'allocation_end': 1199}), ({'w': 16, 'h': 14, 'x': 6, 'y': 7, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 7, 'tap': 2, 'local_x': 6, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 339, 'packet_origin': 35, 'address': 362, 'allocation_end': 1391}), ({'w': 16, 'h': 16, 'x': 9, 'y': 2, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 8, 'tap': 1, 'local_x': 6, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 387, 'packet_origin': 1196, 'address': 1331, 'allocation_end': 1583}), ({'w': 16, 'h': 18, 'x': 10, 'y': 11, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 9, 'tap': 3, 'local_x': 5, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 435, 'packet_origin': 905, 'address': 1226, 'allocation_end': 1775})]}
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': 45, 'allocation_end': 147, 'half_height': 4, 'half_width': 4, 'local_x': 0, 'local_y': 0, 'packet_origin': 42, 'packet_pitch': 35, 'storage_slot': 1, 'tap': 0}{'address': 45, 'allocation_end': 147, 'half_height': 4, 'half_width': 4, 'local_x': 0, 'local_y': 0, 'packet_origin': 42, 'packet_pitch': 35, 'storage_slot': 1, 'tap': 0}Passed
layout fixture 2{'address': 159, 'allocation_end': 179, 'half_height': 5, 'half_width': 4, 'local_x': 2, 'local_y': 1, 'packet_origin': 136, 'packet_pitch': 43, 'storage_slot': 3, 'tap': 1}{'address': 151, 'allocation_end': 179, 'half_height': 5, 'half_width': 4, 'local_x': 2, 'local_y': 1, 'packet_origin': 136, 'packet_pitch': 43, 'storage_slot': 3, 'tap': 1}Failed
layout fixture 3{'address': 92, 'allocation_end': 211, 'half_height': 6, 'half_width': 4, 'local_x': 1, 'local_y': 5, 'packet_origin': 7, 'packet_pitch': 51, 'storage_slot': 0, 'tap': 2}{'address': 52, 'allocation_end': 211, 'half_height': 6, 'half_width': 4, 'local_x': 1, 'local_y': 5, 'packet_origin': 7, 'packet_pitch': 51, 'storage_slot': 0, 'tap': 2}Failed
layout fixture 4{'address': 226, 'allocation_end': 243, 'half_height': 7, 'half_width': 4, 'local_x': 1, 'local_y': 6, 'packet_origin': 125, 'packet_pitch': 59, 'storage_slot': 2, 'tap': 3}{'address': 178, 'allocation_end': 243, 'half_height': 7, 'half_width': 4, 'local_x': 1, 'local_y': 6, 'packet_origin': 125, 'packet_pitch': 59, 'storage_slot': 2, 'tap': 3}Failed
layout fixture 5{'address': 111, 'allocation_end': 275, 'half_height': 8, 'half_width': 4, 'local_x': 1, 'local_y': 2, 'packet_origin': 74, 'packet_pitch': 67, 'storage_slot': 1, 'tap': 0}{'address': 95, 'allocation_end': 275, 'half_height': 8, 'half_width': 4, 'local_x': 1, 'local_y': 2, 'packet_origin': 74, 'packet_pitch': 67, 'storage_slot': 1, 'tap': 0}Failed
layout fixture 6{'address': 110, 'allocation_end': 307, 'half_height': 9, 'half_width': 4, 'local_x': 2, 'local_y': 6, 'packet_origin': 7, 'packet_pitch': 75, 'storage_slot': 0, 'tap': 2}{'address': 62, 'allocation_end': 307, 'half_height': 9, 'half_width': 4, 'local_x': 2, 'local_y': 6, 'packet_origin': 7, 'packet_pitch': 75, 'storage_slot': 0, 'tap': 2}Failed

SHA-256 / 714a79b39acd4507592f27bd0c20666f30c1b73131a31f16d2f03563e1276a78

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)
    half_width = p["w"]//2
    half_height = p["h"]//2
    tap = (2 if p["y"]>=half_height else 0)+(1 if p["x"]>=half_width else 0)
    local_x = p["x"] if tap%2==0 else p["w"]-1-p["x"]
    local_y = p["y"] if tap<2 else p["h"]-1-p["y"]
    storage_slot = [1,3,0,2][tap]
    packet_pitch = half_width*half_height*p["b"]+3
    packet_origin = p["base"]+storage_slot*packet_pitch
    address = packet_origin+3+(local_y*half_width+local_x)*p["b"]
    allocation_end = p["base"]+4*packet_pitch
    return {'half_width': half_width, 'half_height': half_height, 'tap': tap, 'local_x': local_x, 'local_y': local_y, 'storage_slot': storage_slot, 'packet_pitch': packet_pitch, 'packet_origin': packet_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': 8, 'h': 8, 'x': 0, 'y': 0, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 35, 'packet_origin': 42, 'address': 45, 'allocation_end': 147}), ({'w': 8, 'h': 10, 'x': 5, 'y': 1, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 5, 'tap': 1, 'local_x': 2, 'local_y': 1, 'storage_slot': 3, 'packet_pitch': 43, 'packet_origin': 136, 'address': 151, 'allocation_end': 179}), ({'w': 8, 'h': 12, 'x': 1, 'y': 6, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 51, 'packet_origin': 7, 'address': 52, 'allocation_end': 211}), ({'w': 8, 'h': 14, 'x': 6, 'y': 7, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 7, 'tap': 3, 'local_x': 1, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 59, 'packet_origin': 125, 'address': 178, 'allocation_end': 243}), ({'w': 8, 'h': 16, 'x': 1, 'y': 2, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 8, 'tap': 0, 'local_x': 1, 'local_y': 2, 'storage_slot': 1, 'packet_pitch': 67, 'packet_origin': 74, 'address': 95, 'allocation_end': 275}), ({'w': 8, 'h': 18, 'x': 2, 'y': 11, 'b': 2, 'base': 7}, {'half_width': 4, 'half_height': 9, 'tap': 2, 'local_x': 2, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 75, 'packet_origin': 7, 'address': 62, 'allocation_end': 307})], 2: [({'w': 10, 'h': 8, 'x': 0, 'y': 0, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 63, 'packet_origin': 77, 'address': 80, 'allocation_end': 266}), ({'w': 10, 'h': 10, 'x': 5, 'y': 1, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 5, 'tap': 1, 'local_x': 4, 'local_y': 1, 'storage_slot': 3, 'packet_pitch': 78, 'packet_origin': 248, 'address': 278, 'allocation_end': 326}), ({'w': 10, 'h': 12, 'x': 1, 'y': 6, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 93, 'packet_origin': 14, 'address': 95, 'allocation_end': 386}), ({'w': 10, 'h': 14, 'x': 6, 'y': 7, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 7, 'tap': 3, 'local_x': 3, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 108, 'packet_origin': 230, 'address': 332, 'allocation_end': 446}), ({'w': 10, 'h': 16, 'x': 9, 'y': 2, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 8, 'tap': 1, 'local_x': 0, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 123, 'packet_origin': 383, 'address': 416, 'allocation_end': 506}), ({'w': 10, 'h': 18, 'x': 0, 'y': 11, 'b': 3, 'base': 14}, {'half_width': 5, 'half_height': 9, 'tap': 2, 'local_x': 0, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 138, 'packet_origin': 14, 'address': 107, 'allocation_end': 566})], 3: [({'w': 12, 'h': 8, 'x': 0, 'y': 0, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 99, 'packet_origin': 120, 'address': 123, 'allocation_end': 417}), ({'w': 12, 'h': 10, 'x': 5, 'y': 1, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 5, 'tap': 0, 'local_x': 5, 'local_y': 1, 'storage_slot': 1, 'packet_pitch': 123, 'packet_origin': 144, 'address': 191, 'allocation_end': 513}), ({'w': 12, 'h': 12, 'x': 1, 'y': 6, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 147, 'packet_origin': 21, 'address': 148, 'allocation_end': 609}), ({'w': 12, 'h': 14, 'x': 6, 'y': 7, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 7, 'tap': 3, 'local_x': 5, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 171, 'packet_origin': 363, 'address': 530, 'allocation_end': 705}), ({'w': 12, 'h': 16, 'x': 9, 'y': 2, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 8, 'tap': 1, 'local_x': 2, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 195, 'packet_origin': 606, 'address': 665, 'allocation_end': 801}), ({'w': 12, 'h': 18, 'x': 10, 'y': 11, 'b': 4, 'base': 21}, {'half_width': 6, 'half_height': 9, 'tap': 3, 'local_x': 1, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 219, 'packet_origin': 459, 'address': 610, 'allocation_end': 897})], 4: [({'w': 14, 'h': 8, 'x': 0, 'y': 0, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 143, 'packet_origin': 171, 'address': 174, 'allocation_end': 600}), ({'w': 14, 'h': 10, 'x': 5, 'y': 1, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 5, 'tap': 0, 'local_x': 5, 'local_y': 1, 'storage_slot': 1, 'packet_pitch': 178, 'packet_origin': 206, 'address': 269, 'allocation_end': 740}), ({'w': 14, 'h': 12, 'x': 1, 'y': 6, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 213, 'packet_origin': 28, 'address': 211, 'allocation_end': 880}), ({'w': 14, 'h': 14, 'x': 6, 'y': 7, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 7, 'tap': 2, 'local_x': 6, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 248, 'packet_origin': 28, 'address': 271, 'allocation_end': 1020}), ({'w': 14, 'h': 16, 'x': 9, 'y': 2, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 8, 'tap': 1, 'local_x': 4, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 283, 'packet_origin': 877, 'address': 970, 'allocation_end': 1160}), ({'w': 14, 'h': 18, 'x': 10, 'y': 11, 'b': 5, 'base': 28}, {'half_width': 7, 'half_height': 9, 'tap': 3, 'local_x': 3, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 318, 'packet_origin': 664, 'address': 892, 'allocation_end': 1300})], 5: [({'w': 16, 'h': 8, 'x': 0, 'y': 0, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 4, 'tap': 0, 'local_x': 0, 'local_y': 0, 'storage_slot': 1, 'packet_pitch': 195, 'packet_origin': 230, 'address': 233, 'allocation_end': 815}), ({'w': 16, 'h': 10, 'x': 5, 'y': 1, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 5, 'tap': 0, 'local_x': 5, 'local_y': 1, 'storage_slot': 1, 'packet_pitch': 243, 'packet_origin': 278, 'address': 359, 'allocation_end': 1007}), ({'w': 16, 'h': 12, 'x': 1, 'y': 6, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 6, 'tap': 2, 'local_x': 1, 'local_y': 5, 'storage_slot': 0, 'packet_pitch': 291, 'packet_origin': 35, 'address': 284, 'allocation_end': 1199}), ({'w': 16, 'h': 14, 'x': 6, 'y': 7, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 7, 'tap': 2, 'local_x': 6, 'local_y': 6, 'storage_slot': 0, 'packet_pitch': 339, 'packet_origin': 35, 'address': 362, 'allocation_end': 1391}), ({'w': 16, 'h': 16, 'x': 9, 'y': 2, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 8, 'tap': 1, 'local_x': 6, 'local_y': 2, 'storage_slot': 3, 'packet_pitch': 387, 'packet_origin': 1196, 'address': 1331, 'allocation_end': 1583}), ({'w': 16, 'h': 18, 'x': 10, 'y': 11, 'b': 6, 'base': 35}, {'half_width': 8, 'half_height': 9, 'tap': 3, 'local_x': 5, 'local_y': 6, 'storage_slot': 2, 'packet_pitch': 435, 'packet_origin': 905, 'address': 1226, 'allocation_end': 1775})]}
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': 45, 'allocation_end': 147, 'half_height': 4, 'half_width': 4, 'local_x': 0, 'local_y': 0, 'packet_origin': 42, 'packet_pitch': 35, 'storage_slot': 1, 'tap': 0}{'address': 45, 'allocation_end': 147, 'half_height': 4, 'half_width': 4, 'local_x': 0, 'local_y': 0, 'packet_origin': 42, 'packet_pitch': 35, 'storage_slot': 1, 'tap': 0}Passed
layout fixture 2{'address': 151, 'allocation_end': 179, 'half_height': 5, 'half_width': 4, 'local_x': 2, 'local_y': 1, 'packet_origin': 136, 'packet_pitch': 43, 'storage_slot': 3, 'tap': 1}{'address': 151, 'allocation_end': 179, 'half_height': 5, 'half_width': 4, 'local_x': 2, 'local_y': 1, 'packet_origin': 136, 'packet_pitch': 43, 'storage_slot': 3, 'tap': 1}Passed
layout fixture 3{'address': 52, 'allocation_end': 211, 'half_height': 6, 'half_width': 4, 'local_x': 1, 'local_y': 5, 'packet_origin': 7, 'packet_pitch': 51, 'storage_slot': 0, 'tap': 2}{'address': 52, 'allocation_end': 211, 'half_height': 6, 'half_width': 4, 'local_x': 1, 'local_y': 5, 'packet_origin': 7, 'packet_pitch': 51, 'storage_slot': 0, 'tap': 2}Passed
layout fixture 4{'address': 178, 'allocation_end': 243, 'half_height': 7, 'half_width': 4, 'local_x': 1, 'local_y': 6, 'packet_origin': 125, 'packet_pitch': 59, 'storage_slot': 2, 'tap': 3}{'address': 178, 'allocation_end': 243, 'half_height': 7, 'half_width': 4, 'local_x': 1, 'local_y': 6, 'packet_origin': 125, 'packet_pitch': 59, 'storage_slot': 2, 'tap': 3}Passed
layout fixture 5{'address': 95, 'allocation_end': 275, 'half_height': 8, 'half_width': 4, 'local_x': 1, 'local_y': 2, 'packet_origin': 74, 'packet_pitch': 67, 'storage_slot': 1, 'tap': 0}{'address': 95, 'allocation_end': 275, 'half_height': 8, 'half_width': 4, 'local_x': 1, 'local_y': 2, 'packet_origin': 74, 'packet_pitch': 67, 'storage_slot': 1, 'tap': 0}Passed
layout fixture 6{'address': 62, 'allocation_end': 307, 'half_height': 9, 'half_width': 4, 'local_x': 2, 'local_y': 6, 'packet_origin': 7, 'packet_pitch': 75, 'storage_slot': 0, 'tap': 2}{'address': 62, 'allocation_end': 307, 'half_height': 9, 'half_width': 4, 'local_x': 2, 'local_y': 6, 'packet_origin': 7, 'packet_pitch': 75, 'storage_slot': 0, 'tap': 2}Passed

SHA-256 / 72aac0466c518b1adace25357b58e7468dbc8f7e3e699bc41f69722881a2af3d

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:37.971440+00:00.

Case digest / ac2fb2331724c5a8785fbb8237d81f4afd607800d0a6ae7030bab21259ef814b