FA-51856 / Raster memory layout / Open access
Morton Page Directory: Page coordinate uses local x or rounds upward · case 01
The returned physical layout descriptor disagrees with the declared buffer mapping at page_x.
ROOT CAUSE
Page coordinate uses local x or rounds upward The faulty expression is p["x"]%4.
THE FAILURE
Page coordinate uses local x or rounds upward The faulty expression is p["x"]%4.
Unsuccessful approach: The attempted repair uses (p["x"]+3)//4 and still violates the layout contract.
Case contract
Square 4x4 texel pages use row-major page-directory order and Morton x/y interleaving within each page. Each page has an eight-byte header; directory entries are four bytes and directory storage precedes page bodies. 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)
pages_x = (p["w"]+3)//4
pages_y = (p["h"]+3)//4
directory_bytes = pages_x*pages_y*p["entry"]
page_x = p["x"]%4
page_y = p["y"]//4
page_index = page_y*pages_x+page_x
morton = sum(((p["x"]>>i)&1)<<(2*i) | ((p["y"]>>i)&1)<<(2*i+1) for i in range(2))
page_bytes = 16*p["b"]+p["header"]
page_start = p["base"]+directory_bytes+page_index*page_bytes
address = page_start+p["header"]+morton*p["b"]
return {'pages_x': pages_x, 'pages_y': pages_y, 'directory_bytes': directory_bytes, 'page_x': page_x, 'page_y': page_y, 'page_index': page_index, 'morton': morton, 'page_bytes': page_bytes, 'page_start': page_start, 'address': address}
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, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 1, 'pages_y': 1, 'directory_bytes': 4, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 0, 'page_bytes': 40, 'page_start': 15, 'address': 23}), ({'w': 6, 'h': 4, 'x': 1, 'y': 2, 'b': 2, 'base': 11, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 1, 'directory_bytes': 8, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 9, 'page_bytes': 40, 'page_start': 19, 'address': 45}), ({'w': 10, 'h': 8, 'x': 8, 'y': 6, 'b': 2, 'base': 11, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 3, 'pages_y': 2, 'directory_bytes': 24, 'page_x': 2, 'page_y': 1, 'page_index': 5, 'morton': 8, 'page_bytes': 40, 'page_start': 235, 'address': 259}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 2, 'base': 11, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 2, 'directory_bytes': 32, 'page_x': 3, 'page_y': 1, 'page_index': 7, 'morton': 15, 'page_bytes': 40, 'page_start': 323, 'address': 361}), ({'w': 18, 'h': 10, 'x': 16, 'y': 8, 'b': 2, 'base': 11, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 5, 'pages_y': 3, 'directory_bytes': 60, 'page_x': 4, 'page_y': 2, 'page_index': 14, 'morton': 0, 'page_bytes': 40, 'page_start': 631, 'address': 639}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 2, 'base': 11, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 4, 'directory_bytes': 32, 'page_x': 0, 'page_y': 3, 'page_index': 6, 'morton': 5, 'page_bytes': 40, 'page_start': 283, 'address': 301})], 2: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 1, 'pages_y': 1, 'directory_bytes': 4, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 0, 'page_bytes': 56, 'page_start': 26, 'address': 34}), ({'w': 7, 'h': 5, 'x': 1, 'y': 2, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 2, 'directory_bytes': 16, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 9, 'page_bytes': 56, 'page_start': 38, 'address': 73}), ({'w': 11, 'h': 9, 'x': 8, 'y': 6, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 3, 'pages_y': 3, 'directory_bytes': 36, 'page_x': 2, 'page_y': 1, 'page_index': 5, 'morton': 8, 'page_bytes': 56, 'page_start': 338, 'address': 370}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 2, 'directory_bytes': 32, 'page_x': 3, 'page_y': 1, 'page_index': 7, 'morton': 15, 'page_bytes': 56, 'page_start': 446, 'address': 499}), ({'w': 19, 'h': 11, 'x': 16, 'y': 8, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 5, 'pages_y': 3, 'directory_bytes': 60, 'page_x': 4, 'page_y': 2, 'page_index': 14, 'morton': 0, 'page_bytes': 56, 'page_start': 866, 'address': 874}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 4, 'directory_bytes': 32, 'page_x': 0, 'page_y': 3, 'page_index': 6, 'morton': 5, 'page_bytes': 56, 'page_start': 390, 'address': 413})], 3: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 1, 'pages_y': 1, 'directory_bytes': 4, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 0, 'page_bytes': 72, 'page_start': 37, 'address': 45}), ({'w': 8, 'h': 6, 'x': 1, 'y': 2, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 2, 'directory_bytes': 16, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 9, 'page_bytes': 72, 'page_start': 49, 'address': 93}), ({'w': 12, 'h': 10, 'x': 8, 'y': 6, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 3, 'pages_y': 3, 'directory_bytes': 36, 'page_x': 2, 'page_y': 1, 'page_index': 5, 'morton': 8, 'page_bytes': 72, 'page_start': 429, 'address': 469}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 2, 'directory_bytes': 32, 'page_x': 3, 'page_y': 1, 'page_index': 7, 'morton': 15, 'page_bytes': 72, 'page_start': 569, 'address': 637}), ({'w': 20, 'h': 12, 'x': 16, 'y': 8, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 5, 'pages_y': 3, 'directory_bytes': 60, 'page_x': 4, 'page_y': 2, 'page_index': 14, 'morton': 0, 'page_bytes': 72, 'page_start': 1101, 'address': 1109}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 4, 'directory_bytes': 32, 'page_x': 0, 'page_y': 3, 'page_index': 6, 'morton': 5, 'page_bytes': 72, 'page_start': 497, 'address': 525})], 4: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 1, 'pages_y': 1, 'directory_bytes': 4, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 0, 'page_bytes': 88, 'page_start': 48, 'address': 56}), ({'w': 9, 'h': 7, 'x': 1, 'y': 2, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 3, 'pages_y': 2, 'directory_bytes': 24, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 9, 'page_bytes': 88, 'page_start': 68, 'address': 121}), ({'w': 13, 'h': 11, 'x': 8, 'y': 6, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 3, 'directory_bytes': 48, 'page_x': 2, 'page_y': 1, 'page_index': 6, 'morton': 8, 'page_bytes': 88, 'page_start': 620, 'address': 668}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 2, 'directory_bytes': 32, 'page_x': 3, 'page_y': 1, 'page_index': 7, 'morton': 15, 'page_bytes': 88, 'page_start': 692, 'address': 775}), ({'w': 21, 'h': 13, 'x': 16, 'y': 8, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 6, 'pages_y': 4, 'directory_bytes': 96, 'page_x': 4, 'page_y': 2, 'page_index': 16, 'morton': 0, 'page_bytes': 88, 'page_start': 1548, 'address': 1556}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 4, 'directory_bytes': 32, 'page_x': 0, 'page_y': 3, 'page_index': 6, 'morton': 5, 'page_bytes': 88, 'page_start': 604, 'address': 637})], 5: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 1, 'pages_y': 1, 'directory_bytes': 4, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 0, 'page_bytes': 104, 'page_start': 59, 'address': 67}), ({'w': 10, 'h': 8, 'x': 1, 'y': 2, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 3, 'pages_y': 2, 'directory_bytes': 24, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 9, 'page_bytes': 104, 'page_start': 79, 'address': 141}), ({'w': 14, 'h': 12, 'x': 8, 'y': 6, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 3, 'directory_bytes': 48, 'page_x': 2, 'page_y': 1, 'page_index': 6, 'morton': 8, 'page_bytes': 104, 'page_start': 727, 'address': 783}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 2, 'directory_bytes': 32, 'page_x': 3, 'page_y': 1, 'page_index': 7, 'morton': 15, 'page_bytes': 104, 'page_start': 815, 'address': 913}), ({'w': 22, 'h': 14, 'x': 16, 'y': 8, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 6, 'pages_y': 4, 'directory_bytes': 96, 'page_x': 4, 'page_y': 2, 'page_index': 16, 'morton': 0, 'page_bytes': 104, 'page_start': 1815, 'address': 1823}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 4, 'directory_bytes': 32, 'page_x': 0, 'page_y': 3, 'page_index': 6, 'morton': 5, 'page_bytes': 104, 'page_start': 711, 'address': 749})]}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| layout fixture 1 | {'address': 23, 'directory_bytes': 4, 'morton': 0, 'page_bytes': 40, 'page_index': 0, 'page_start': 15, 'page_x': 0, 'page_y': 0, 'pages_x': 1, 'pages_y': 1} | {'address': 23, 'directory_bytes': 4, 'morton': 0, 'page_bytes': 40, 'page_index': 0, 'page_start': 15, 'page_x': 0, 'page_y': 0, 'pages_x': 1, 'pages_y': 1} | Passed |
| layout fixture 2 | {'address': 85, 'directory_bytes': 8, 'morton': 9, 'page_bytes': 40, 'page_index': 1, 'page_start': 59, 'page_x': 1, 'page_y': 0, 'pages_x': 2, 'pages_y': 1} | {'address': 45, 'directory_bytes': 8, 'morton': 9, 'page_bytes': 40, 'page_index': 0, 'page_start': 19, 'page_x': 0, 'page_y': 0, 'pages_x': 2, 'pages_y': 1} | Failed |
| layout fixture 3 | {'address': 179, 'directory_bytes': 24, 'morton': 8, 'page_bytes': 40, 'page_index': 3, 'page_start': 155, 'page_x': 0, 'page_y': 1, 'pages_x': 3, 'pages_y': 2} | {'address': 259, 'directory_bytes': 24, 'morton': 8, 'page_bytes': 40, 'page_index': 5, 'page_start': 235, 'page_x': 2, 'page_y': 1, 'pages_x': 3, 'pages_y': 2} | Failed |
| layout fixture 4 | {'address': 361, 'directory_bytes': 32, 'morton': 15, 'page_bytes': 40, 'page_index': 7, 'page_start': 323, 'page_x': 3, 'page_y': 1, 'pages_x': 4, 'pages_y': 2} | {'address': 361, 'directory_bytes': 32, 'morton': 15, 'page_bytes': 40, 'page_index': 7, 'page_start': 323, 'page_x': 3, 'page_y': 1, 'pages_x': 4, 'pages_y': 2} | Passed |
| layout fixture 5 | {'address': 479, 'directory_bytes': 60, 'morton': 0, 'page_bytes': 40, 'page_index': 10, 'page_start': 471, 'page_x': 0, 'page_y': 2, 'pages_x': 5, 'pages_y': 3} | {'address': 639, 'directory_bytes': 60, 'morton': 0, 'page_bytes': 40, 'page_index': 14, 'page_start': 631, 'page_x': 4, 'page_y': 2, 'pages_x': 5, 'pages_y': 3} | Failed |
| layout fixture 6 | {'address': 421, 'directory_bytes': 32, 'morton': 5, 'page_bytes': 40, 'page_index': 9, 'page_start': 403, 'page_x': 3, 'page_y': 3, 'pages_x': 2, 'pages_y': 4} | {'address': 301, 'directory_bytes': 32, 'morton': 5, 'page_bytes': 40, 'page_index': 6, 'page_start': 283, 'page_x': 0, 'page_y': 3, 'pages_x': 2, 'pages_y': 4} | Failed |
SHA-256 / 83998e3645a46ce3b971e952b116b53e4d241ab5538ebf79d75e56e4f3052c5f
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)
pages_x = (p["w"]+3)//4
pages_y = (p["h"]+3)//4
directory_bytes = pages_x*pages_y*p["entry"]
page_x = (p["x"]+3)//4
page_y = p["y"]//4
page_index = page_y*pages_x+page_x
morton = sum(((p["x"]>>i)&1)<<(2*i) | ((p["y"]>>i)&1)<<(2*i+1) for i in range(2))
page_bytes = 16*p["b"]+p["header"]
page_start = p["base"]+directory_bytes+page_index*page_bytes
address = page_start+p["header"]+morton*p["b"]
return {'pages_x': pages_x, 'pages_y': pages_y, 'directory_bytes': directory_bytes, 'page_x': page_x, 'page_y': page_y, 'page_index': page_index, 'morton': morton, 'page_bytes': page_bytes, 'page_start': page_start, 'address': address}
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, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 1, 'pages_y': 1, 'directory_bytes': 4, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 0, 'page_bytes': 40, 'page_start': 15, 'address': 23}), ({'w': 6, 'h': 4, 'x': 1, 'y': 2, 'b': 2, 'base': 11, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 1, 'directory_bytes': 8, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 9, 'page_bytes': 40, 'page_start': 19, 'address': 45}), ({'w': 10, 'h': 8, 'x': 8, 'y': 6, 'b': 2, 'base': 11, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 3, 'pages_y': 2, 'directory_bytes': 24, 'page_x': 2, 'page_y': 1, 'page_index': 5, 'morton': 8, 'page_bytes': 40, 'page_start': 235, 'address': 259}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 2, 'base': 11, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 2, 'directory_bytes': 32, 'page_x': 3, 'page_y': 1, 'page_index': 7, 'morton': 15, 'page_bytes': 40, 'page_start': 323, 'address': 361}), ({'w': 18, 'h': 10, 'x': 16, 'y': 8, 'b': 2, 'base': 11, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 5, 'pages_y': 3, 'directory_bytes': 60, 'page_x': 4, 'page_y': 2, 'page_index': 14, 'morton': 0, 'page_bytes': 40, 'page_start': 631, 'address': 639}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 2, 'base': 11, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 4, 'directory_bytes': 32, 'page_x': 0, 'page_y': 3, 'page_index': 6, 'morton': 5, 'page_bytes': 40, 'page_start': 283, 'address': 301})], 2: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 1, 'pages_y': 1, 'directory_bytes': 4, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 0, 'page_bytes': 56, 'page_start': 26, 'address': 34}), ({'w': 7, 'h': 5, 'x': 1, 'y': 2, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 2, 'directory_bytes': 16, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 9, 'page_bytes': 56, 'page_start': 38, 'address': 73}), ({'w': 11, 'h': 9, 'x': 8, 'y': 6, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 3, 'pages_y': 3, 'directory_bytes': 36, 'page_x': 2, 'page_y': 1, 'page_index': 5, 'morton': 8, 'page_bytes': 56, 'page_start': 338, 'address': 370}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 2, 'directory_bytes': 32, 'page_x': 3, 'page_y': 1, 'page_index': 7, 'morton': 15, 'page_bytes': 56, 'page_start': 446, 'address': 499}), ({'w': 19, 'h': 11, 'x': 16, 'y': 8, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 5, 'pages_y': 3, 'directory_bytes': 60, 'page_x': 4, 'page_y': 2, 'page_index': 14, 'morton': 0, 'page_bytes': 56, 'page_start': 866, 'address': 874}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 3, 'base': 22, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 4, 'directory_bytes': 32, 'page_x': 0, 'page_y': 3, 'page_index': 6, 'morton': 5, 'page_bytes': 56, 'page_start': 390, 'address': 413})], 3: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 1, 'pages_y': 1, 'directory_bytes': 4, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 0, 'page_bytes': 72, 'page_start': 37, 'address': 45}), ({'w': 8, 'h': 6, 'x': 1, 'y': 2, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 2, 'directory_bytes': 16, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 9, 'page_bytes': 72, 'page_start': 49, 'address': 93}), ({'w': 12, 'h': 10, 'x': 8, 'y': 6, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 3, 'pages_y': 3, 'directory_bytes': 36, 'page_x': 2, 'page_y': 1, 'page_index': 5, 'morton': 8, 'page_bytes': 72, 'page_start': 429, 'address': 469}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 2, 'directory_bytes': 32, 'page_x': 3, 'page_y': 1, 'page_index': 7, 'morton': 15, 'page_bytes': 72, 'page_start': 569, 'address': 637}), ({'w': 20, 'h': 12, 'x': 16, 'y': 8, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 5, 'pages_y': 3, 'directory_bytes': 60, 'page_x': 4, 'page_y': 2, 'page_index': 14, 'morton': 0, 'page_bytes': 72, 'page_start': 1101, 'address': 1109}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 4, 'base': 33, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 4, 'directory_bytes': 32, 'page_x': 0, 'page_y': 3, 'page_index': 6, 'morton': 5, 'page_bytes': 72, 'page_start': 497, 'address': 525})], 4: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 1, 'pages_y': 1, 'directory_bytes': 4, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 0, 'page_bytes': 88, 'page_start': 48, 'address': 56}), ({'w': 9, 'h': 7, 'x': 1, 'y': 2, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 3, 'pages_y': 2, 'directory_bytes': 24, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 9, 'page_bytes': 88, 'page_start': 68, 'address': 121}), ({'w': 13, 'h': 11, 'x': 8, 'y': 6, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 3, 'directory_bytes': 48, 'page_x': 2, 'page_y': 1, 'page_index': 6, 'morton': 8, 'page_bytes': 88, 'page_start': 620, 'address': 668}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 2, 'directory_bytes': 32, 'page_x': 3, 'page_y': 1, 'page_index': 7, 'morton': 15, 'page_bytes': 88, 'page_start': 692, 'address': 775}), ({'w': 21, 'h': 13, 'x': 16, 'y': 8, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 6, 'pages_y': 4, 'directory_bytes': 96, 'page_x': 4, 'page_y': 2, 'page_index': 16, 'morton': 0, 'page_bytes': 88, 'page_start': 1548, 'address': 1556}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 5, 'base': 44, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 4, 'directory_bytes': 32, 'page_x': 0, 'page_y': 3, 'page_index': 6, 'morton': 5, 'page_bytes': 88, 'page_start': 604, 'address': 637})], 5: [({'w': 1, 'h': 1, 'x': 0, 'y': 0, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 1, 'pages_y': 1, 'directory_bytes': 4, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 0, 'page_bytes': 104, 'page_start': 59, 'address': 67}), ({'w': 10, 'h': 8, 'x': 1, 'y': 2, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 3, 'pages_y': 2, 'directory_bytes': 24, 'page_x': 0, 'page_y': 0, 'page_index': 0, 'morton': 9, 'page_bytes': 104, 'page_start': 79, 'address': 141}), ({'w': 14, 'h': 12, 'x': 8, 'y': 6, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 3, 'directory_bytes': 48, 'page_x': 2, 'page_y': 1, 'page_index': 6, 'morton': 8, 'page_bytes': 104, 'page_start': 727, 'address': 783}), ({'w': 16, 'h': 8, 'x': 15, 'y': 7, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 4, 'pages_y': 2, 'directory_bytes': 32, 'page_x': 3, 'page_y': 1, 'page_index': 7, 'morton': 15, 'page_bytes': 104, 'page_start': 815, 'address': 913}), ({'w': 22, 'h': 14, 'x': 16, 'y': 8, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 6, 'pages_y': 4, 'directory_bytes': 96, 'page_x': 4, 'page_y': 2, 'page_index': 16, 'morton': 0, 'page_bytes': 104, 'page_start': 1815, 'address': 1823}), ({'w': 7, 'h': 13, 'x': 3, 'y': 12, 'b': 6, 'base': 55, 'px': 4, 'py': 4, 'header': 8, 'entry': 4}, {'pages_x': 2, 'pages_y': 4, 'directory_bytes': 32, 'page_x': 0, 'page_y': 3, 'page_index': 6, 'morton': 5, 'page_bytes': 104, 'page_start': 711, 'address': 749})]}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| layout fixture 1 | {'address': 23, 'directory_bytes': 4, 'morton': 0, 'page_bytes': 40, 'page_index': 0, 'page_start': 15, 'page_x': 0, 'page_y': 0, 'pages_x': 1, 'pages_y': 1} | {'address': 23, 'directory_bytes': 4, 'morton': 0, 'page_bytes': 40, 'page_index': 0, 'page_start': 15, 'page_x': 0, 'page_y': 0, 'pages_x': 1, 'pages_y': 1} | Passed |
| layout fixture 2 | {'address': 85, 'directory_bytes': 8, 'morton': 9, 'page_bytes': 40, 'page_index': 1, 'page_start': 59, 'page_x': 1, 'page_y': 0, 'pages_x': 2, 'pages_y': 1} | {'address': 45, 'directory_bytes': 8, 'morton': 9, 'page_bytes': 40, 'page_index': 0, 'page_start': 19, 'page_x': 0, 'page_y': 0, 'pages_x': 2, 'pages_y': 1} | Failed |
| layout fixture 3 | {'address': 259, 'directory_bytes': 24, 'morton': 8, 'page_bytes': 40, 'page_index': 5, 'page_start': 235, 'page_x': 2, 'page_y': 1, 'pages_x': 3, 'pages_y': 2} | {'address': 259, 'directory_bytes': 24, 'morton': 8, 'page_bytes': 40, 'page_index': 5, 'page_start': 235, 'page_x': 2, 'page_y': 1, 'pages_x': 3, 'pages_y': 2} | Passed |
| layout fixture 4 | {'address': 401, 'directory_bytes': 32, 'morton': 15, 'page_bytes': 40, 'page_index': 8, 'page_start': 363, 'page_x': 4, 'page_y': 1, 'pages_x': 4, 'pages_y': 2} | {'address': 361, 'directory_bytes': 32, 'morton': 15, 'page_bytes': 40, 'page_index': 7, 'page_start': 323, 'page_x': 3, 'page_y': 1, 'pages_x': 4, 'pages_y': 2} | Failed |
| layout fixture 5 | {'address': 639, 'directory_bytes': 60, 'morton': 0, 'page_bytes': 40, 'page_index': 14, 'page_start': 631, 'page_x': 4, 'page_y': 2, 'pages_x': 5, 'pages_y': 3} | {'address': 639, 'directory_bytes': 60, 'morton': 0, 'page_bytes': 40, 'page_index': 14, 'page_start': 631, 'page_x': 4, 'page_y': 2, 'pages_x': 5, 'pages_y': 3} | Passed |
| layout fixture 6 | {'address': 341, 'directory_bytes': 32, 'morton': 5, 'page_bytes': 40, 'page_index': 7, 'page_start': 323, 'page_x': 1, 'page_y': 3, 'pages_x': 2, 'pages_y': 4} | {'address': 301, 'directory_bytes': 32, 'morton': 5, 'page_bytes': 40, 'page_index': 6, 'page_start': 283, 'page_x': 0, 'page_y': 3, 'pages_x': 2, 'pages_y': 4} | Failed |
SHA-256 / 40a000f77429096efe68216da0f104151b5d417d04efb88f76f845d453254961
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 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
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:23.416745+00:00.
Case digest / 309ede5d8081c9a280e62b72f87ce6ec857ee99e40437597f550e55088b82d13