{"abstract":"Non-square prefabs land rotated a quarter turn.","category":"Procedural level generation constraints","checks":8,"contract":"The prefab (rows of chars, ' ' transparent) is rotated clockwise rot times (rot taken mod 4, negative allowed) and stamped with its top-left at column ox, row oy. If any non-transparent tile would land out of bounds or on a locked 'X' tile, the stamp is rejected and the original grid returned with False; otherwise the new grid with True.","contract_signature":"grid, prefab, ox, oy, rot","evaluation_group":"w2-procedural-level-generation-constraints-prefab-stamp","failed_approach":"Swapping origin axes moves the prefab to the mirrored position.","family":"w2-procedural-level-generation-constraints-prefab-stamp-stamp-offset-axes","id":"FA-86746","implementations":{"attempt":{"sha256":"3edacebccbde0d34c11952a88b9541e276edb2131b4ff0b16faa475a4434d61b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(grid, prefab, ox, oy, rot):\n    p = [list(row) for row in prefab]\n    for _ in range(rot % 4):\n        p = [list(row) for row in zip(*p[::-1])]\n    g = [list(row) for row in grid]\n    for r, line in enumerate(p):\n        for c, t in enumerate(line):\n            if t == ' ':\n                continue\n            y, x = ox + r, oy + c\n            if not (0 <= y < len(g) and 0 <= x < len(g[0])) or g[y][x] == 'X':\n                return [grid, False]\n            g[y][x] = t\n    return [[''.join(row) for row in g], True]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('regression stamp offset axes #1',\n   [['.#...#', '.#.#..'], ['  ', '# '], 1, -1, 6],\n   [['.#...#', '.#.#..'], False]),\n  ('regression stamp offset axes #2', [['.#.', '#..'], ['  ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),\n  ('regression stamp offset axes #3',\n   [['...#..', '.#....', '#.....'], ['#.', ' .', '#D'], 2, 0, 5],\n   [['..###.', '.#D...', '#.....'], True]),\n  ('control #1',\n   [['#X', '..', '..', '#.', '#.'], [' D', '.#', '.#'], -1, 2, 3],\n   [['#X', '..', '..', '#.', '#.'], False]),\n  ('control #2',\n   [['XX', 'X.', '..', '..', '..'], ['D', 'D', ' '], 0, 4, -3],\n   [['XX', 'X.', '..', '..', '..'], False])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('regression stamp offset axes #1',\n   [['.#...#', '.#.#..'], ['  ', '# '], 1, -1, 6],\n   [['.#...#', '.#.#..'], False]),\n  ('fault site stamp offset axes #1',\n   [['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],\n   [['...', '#..', 'X..', '...', '#X.', '..X'], False]),\n  ('regression stamp offset axes #2', [['.#.', '#..'], ['  ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),\n  ('regression stamp offset axes #3',\n   [['...#..', '.#....', '#.....'], ['#.', ' .', '#D'], 2, 0, 5],\n   [['..###.', '.#D...', '#.....'], True]),\n  ('control #1', [['.X.', '...'], ['D#.', 'D #'], -1, -1, -1], [['.X.', '...'], False]),\n  ('control #2',\n   [['...#', '.X..', 'XX..', '.#X.', 'X.##'], [' .', '  ', '##'], 1, 4, 0],\n   [['...#', '.X..', 'XX..', '.#X.', 'X.##'], False])],\n [('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('fault site stamp offset axes #1',\n   [['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],\n   [['...', '#..', 'X..', '...', '#X.', '..X'], False]),\n  ('regression stamp offset axes #1', [['.#.', '#..'], ['  ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),\n  ('regression stamp offset axes #2',\n   [['..X', '#..', '...'], ['#', '.', '#'], 1, 0, 4],\n   [['.#X', '#..', '.#.'], True]),\n  ('partial repair boundary #1',\n   [['....X', '.....', '..#..', '...X.', '...XX', '..#X#'], ['.'], 1, 5, 6],\n   [['....X', '.....', '..#..', '...X.', '...XX', '..#X#'], True]),\n  ('control #1',\n   [['......', '.....#', '.#....'], [' ##'], -1, -1, -2],\n   [['......', '.....#', '.#....'], False]),\n  ('control #2',\n   [['#.#', '#..', '#..', '#.X', 'X#.'], [' '], 1, 4, 3],\n   [['#.#', '#..', '#..', '#.X', 'X#.'], True]),\n  ('control #3',\n   [['XX#', '.XX', '.#.', '##X', 'X.#'], [' DD', ' #D'], 0, 3, 5],\n   [['XX#', '.XX', '.#.', '##X', 'X.#'], False])],\n [('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('fault site stamp offset axes #1',\n   [['..#X.', '.....', '.....', '.XX#.'], ['##D', '#. ', '.# '], 0, 0, 0],\n   [['##DX.', '#....', '.#...', '.XX#.'], True]),\n  ('regression stamp offset axes #1',\n   [['...#..', '.#....', '#.....'], ['#.', ' .', '#D'], 2, 0, 5],\n   [['..###.', '.#D...', '#.....'], True]),\n  ('partial repair boundary #1',\n   [['..#.', '..X.', '.X#.', '..X.', '.X#.'], ['#.'], 2, 3, 5],\n   [['..#.', '..X.', '.X#.', '..X.', '.X#.'], False]),\n  ('regression stamp offset axes #2',\n   [['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],\n   [['..#', '...', '.D.', '###'], True]),\n  ('control #1',\n   [['......', '.....#', '.#....'], [' ##'], -1, -1, -2],\n   [['......', '.....#', '.#....'], False]),\n  ('control #2',\n   [['#.#', '#..', '#..', '#.X', 'X#.'], [' '], 1, 4, 3],\n   [['#.#', '#..', '#..', '#.X', 'X#.'], True])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('regression stamp offset axes #1',\n   [['..X', '#..', '...'], ['#', '.', '#'], 1, 0, 4],\n   [['.#X', '#..', '.#.'], True]),\n  ('regression stamp offset axes #2',\n   [['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],\n   [['..#', '...', '.D.', '###'], True]),\n  ('partial repair boundary #1',\n   [['..', '..', '#.', 'X.'], ['D', '#', ' '], 0, 1, 6],\n   [['..', '..', '#.', 'X.'], False]),\n  ('regression stamp offset axes #3',\n   [['...', 'X..', '#..', '#..'], ['DD'], 0, 2, -2],\n   [['...', 'X..', 'DD.', '#..'], True]),\n  ('control #1',\n   [['XX#', '.XX', '.#.', '##X', 'X.#'], [' DD', ' #D'], 0, 3, 5],\n   [['XX#', '.XX', '.#.', '##X', 'X.#'], False]),\n  ('control #2',\n   [['.X.', '#..', '.X.', '.X.', '...'], ['D', '#', '.'], -1, 4, 4],\n   [['.X.', '#..', '.X.', '.X.', '...'], False])]]\nfor label, args, expected in cases[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"1572a3f762447290fc191e05839b8945b24cdbbc917fc493eb308c2fb4149c73","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(grid, prefab, ox, oy, rot):\n    p = [list(row) for row in prefab]\n    for _ in range(rot % 4):\n        p = [list(row) for row in zip(*p[::-1])]\n    g = [list(row) for row in grid]\n    for r, line in enumerate(p):\n        for c, t in enumerate(line):\n            if t == ' ':\n                continue\n            y, x = oy + c, ox + r\n            if not (0 <= y < len(g) and 0 <= x < len(g[0])) or g[y][x] == 'X':\n                return [grid, False]\n            g[y][x] = t\n    return [[''.join(row) for row in g], True]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('regression stamp offset axes #1',\n   [['.#...#', '.#.#..'], ['  ', '# '], 1, -1, 6],\n   [['.#...#', '.#.#..'], False]),\n  ('regression stamp offset axes #2', [['.#.', '#..'], ['  ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),\n  ('regression stamp offset axes #3',\n   [['...#..', '.#....', '#.....'], ['#.', ' .', '#D'], 2, 0, 5],\n   [['..###.', '.#D...', '#.....'], True]),\n  ('control #1',\n   [['#X', '..', '..', '#.', '#.'], [' D', '.#', '.#'], -1, 2, 3],\n   [['#X', '..', '..', '#.', '#.'], False]),\n  ('control #2',\n   [['XX', 'X.', '..', '..', '..'], ['D', 'D', ' '], 0, 4, -3],\n   [['XX', 'X.', '..', '..', '..'], False])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('regression stamp offset axes #1',\n   [['.#...#', '.#.#..'], ['  ', '# '], 1, -1, 6],\n   [['.#...#', '.#.#..'], False]),\n  ('fault site stamp offset axes #1',\n   [['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],\n   [['...', '#..', 'X..', '...', '#X.', '..X'], False]),\n  ('regression stamp offset axes #2', [['.#.', '#..'], ['  ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),\n  ('regression stamp offset axes #3',\n   [['...#..', '.#....', '#.....'], ['#.', ' .', '#D'], 2, 0, 5],\n   [['..###.', '.#D...', '#.....'], True]),\n  ('control #1', [['.X.', '...'], ['D#.', 'D #'], -1, -1, -1], [['.X.', '...'], False]),\n  ('control #2',\n   [['...#', '.X..', 'XX..', '.#X.', 'X.##'], [' .', '  ', '##'], 1, 4, 0],\n   [['...#', '.X..', 'XX..', '.#X.', 'X.##'], False])],\n [('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('fault site stamp offset axes #1',\n   [['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],\n   [['...', '#..', 'X..', '...', '#X.', '..X'], False]),\n  ('regression stamp offset axes #1', [['.#.', '#..'], ['  ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),\n  ('regression stamp offset axes #2',\n   [['..X', '#..', '...'], ['#', '.', '#'], 1, 0, 4],\n   [['.#X', '#..', '.#.'], True]),\n  ('partial repair boundary #1',\n   [['....X', '.....', '..#..', '...X.', '...XX', '..#X#'], ['.'], 1, 5, 6],\n   [['....X', '.....', '..#..', '...X.', '...XX', '..#X#'], True]),\n  ('control #1',\n   [['......', '.....#', '.#....'], [' ##'], -1, -1, -2],\n   [['......', '.....#', '.#....'], False]),\n  ('control #2',\n   [['#.#', '#..', '#..', '#.X', 'X#.'], [' '], 1, 4, 3],\n   [['#.#', '#..', '#..', '#.X', 'X#.'], True]),\n  ('control #3',\n   [['XX#', '.XX', '.#.', '##X', 'X.#'], [' DD', ' #D'], 0, 3, 5],\n   [['XX#', '.XX', '.#.', '##X', 'X.#'], False])],\n [('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('fault site stamp offset axes #1',\n   [['..#X.', '.....', '.....', '.XX#.'], ['##D', '#. ', '.# '], 0, 0, 0],\n   [['##DX.', '#....', '.#...', '.XX#.'], True]),\n  ('regression stamp offset axes #1',\n   [['...#..', '.#....', '#.....'], ['#.', ' .', '#D'], 2, 0, 5],\n   [['..###.', '.#D...', '#.....'], True]),\n  ('partial repair boundary #1',\n   [['..#.', '..X.', '.X#.', '..X.', '.X#.'], ['#.'], 2, 3, 5],\n   [['..#.', '..X.', '.X#.', '..X.', '.X#.'], False]),\n  ('regression stamp offset axes #2',\n   [['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],\n   [['..#', '...', '.D.', '###'], True]),\n  ('control #1',\n   [['......', '.....#', '.#....'], [' ##'], -1, -1, -2],\n   [['......', '.....#', '.#....'], False]),\n  ('control #2',\n   [['#.#', '#..', '#..', '#.X', 'X#.'], [' '], 1, 4, 3],\n   [['#.#', '#..', '#..', '#.X', 'X#.'], True])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('regression stamp offset axes #1',\n   [['..X', '#..', '...'], ['#', '.', '#'], 1, 0, 4],\n   [['.#X', '#..', '.#.'], True]),\n  ('regression stamp offset axes #2',\n   [['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],\n   [['..#', '...', '.D.', '###'], True]),\n  ('partial repair boundary #1',\n   [['..', '..', '#.', 'X.'], ['D', '#', ' '], 0, 1, 6],\n   [['..', '..', '#.', 'X.'], False]),\n  ('regression stamp offset axes #3',\n   [['...', 'X..', '#..', '#..'], ['DD'], 0, 2, -2],\n   [['...', 'X..', 'DD.', '#..'], True]),\n  ('control #1',\n   [['XX#', '.XX', '.#.', '##X', 'X.#'], [' DD', ' #D'], 0, 3, 5],\n   [['XX#', '.XX', '.#.', '##X', 'X.#'], False]),\n  ('control #2',\n   [['.X.', '#..', '.X.', '.X.', '...'], ['D', '#', '.'], -1, 4, 4],\n   [['.X.', '#..', '.X.', '.X.', '...'], False])]]\nfor label, args, expected in cases[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Deterministic toy contract stipulated for this model; integer or exact arithmetic only, not a reproduction of any specific game engine. 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-procedural-level-generation-constraints-prefab-stamp-stamp-offset-axes","generated_at":"2026-09-29T14:50:52.512700+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Procedural generators silently emit unplayable or unfair levels when a single constraint check uses the wrong boundary, axis, neighborhood or update order; the defect is visible in exact generated geometry.","root_cause":"Row and column offsets within the prefab are swapped.","sha256":"7120c17f185120097a1784e5a29b57750fc086413906f6a567a63e1bee5d2e6e","title":"Rotated prefab stamping: Prefab stamped transposed · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.039,"exit_code":1,"observations":[{"actual":[["#...","D..."],true],"check":"quarter turn #1","expected":[["#...","D..."],true],"passed":true},{"actual":[["..",".."],false],"check":"transparent overhang #1","expected":[["#.","#."],true],"passed":false},{"actual":[["...","#.."],true],"check":"counter-clockwise turn #1","expected":[["...","#.."],true],"passed":true},{"actual":[[".#...#","##.#.."],true],"check":"regression stamp offset axes #1","expected":[[".#...#",".#.#.."],false],"passed":false},{"actual":[[".#.","#.."],false],"check":"regression stamp offset axes #2","expected":[["DD.","#.."],true],"passed":false},{"actual":[["...#..",".#....","#....."],false],"check":"regression stamp offset axes #3","expected":[["..###.",".#D...","#....."],true],"passed":false},{"actual":[["#X","..","..","#.","#."],false],"check":"control #1","expected":[["#X","..","..","#.","#."],false],"passed":true},{"actual":[["XX","X.","..","..",".."],false],"check":"control #2","expected":[["XX","X.","..","..",".."],false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"quarter turn #1\", \"actual\": [[\"#...\", \"D...\"], true], \"expected\": [[\"#...\", \"D...\"], true], \"passed\": true}, {\"check\": \"transparent overhang #1\", \"actual\": [[\"..\", \"..\"], false], \"expected\": [[\"#.\", \"#.\"], true], \"passed\": false}, {\"check\": \"counter-clockwise turn #1\", \"actual\": [[\"...\", \"#..\"], true], \"expected\": [[\"...\", \"#..\"], true], \"passed\": true}, {\"check\": \"regression stamp offset axes #1\", \"actual\": [[\".#...#\", \"##.#..\"], true], \"expected\": [[\".#...#\", \".#.#..\"], false], \"passed\": false}, {\"check\": \"regression stamp offset axes #2\", \"actual\": [[\".#.\", \"#..\"], false], \"expected\": [[\"DD.\", \"#..\"], true], \"passed\": false}, {\"check\": \"regression stamp offset axes #3\", \"actual\": [[\"...#..\", \".#....\", \"#.....\"], false], \"expected\": [[\"..###.\", \".#D...\", \"#.....\"], true], \"passed\": false}, {\"check\": \"control #1\", \"actual\": [[\"#X\", \"..\", \"..\", \"#.\", \"#.\"], false], \"expected\": [[\"#X\", \"..\", \"..\", \"#.\", \"#.\"], false], \"passed\": true}, {\"check\": \"control #2\", \"actual\": [[\"XX\", \"X.\", \"..\", \"..\", \"..\"], false], \"expected\": [[\"XX\", \"X.\", \"..\", \"..\", \"..\"], false], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.098,"exit_code":1,"observations":[{"actual":[["#D..","...."],true],"check":"quarter turn #1","expected":[["#...","D..."],true],"passed":false},{"actual":[["..",".."],false],"check":"transparent overhang #1","expected":[["#.","#."],true],"passed":false},{"actual":[[".#.","..."],true],"check":"counter-clockwise turn #1","expected":[["...","#.."],true],"passed":false},{"actual":[[".#...#",".#.#.."],true],"check":"regression stamp offset axes #1","expected":[[".#...#",".#.#.."],false],"passed":false},{"actual":[[".#.","#.."],false],"check":"regression stamp offset axes #2","expected":[["DD.","#.."],true],"passed":false},{"actual":[["..#D..",".#....","#.#..."],true],"check":"regression stamp offset axes #3","expected":[["..###.",".#D...","#....."],true],"passed":false},{"actual":[["#X","..","..","#.","#."],false],"check":"control #1","expected":[["#X","..","..","#.","#."],false],"passed":true},{"actual":[["XX","X.","..","..",".."],false],"check":"control #2","expected":[["XX","X.","..","..",".."],false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"quarter turn #1\", \"actual\": [[\"#D..\", \"....\"], true], \"expected\": [[\"#...\", \"D...\"], true], \"passed\": false}, {\"check\": \"transparent overhang #1\", \"actual\": [[\"..\", \"..\"], false], \"expected\": [[\"#.\", \"#.\"], true], \"passed\": false}, {\"check\": \"counter-clockwise turn #1\", \"actual\": [[\".#.\", \"...\"], true], \"expected\": [[\"...\", \"#..\"], true], \"passed\": false}, {\"check\": \"regression stamp offset axes #1\", \"actual\": [[\".#...#\", \".#.#..\"], true], \"expected\": [[\".#...#\", \".#.#..\"], false], \"passed\": false}, {\"check\": \"regression stamp offset axes #2\", \"actual\": [[\".#.\", \"#..\"], false], \"expected\": [[\"DD.\", \"#..\"], true], \"passed\": false}, {\"check\": \"regression stamp offset axes #3\", \"actual\": [[\"..#D..\", \".#....\", \"#.#...\"], true], \"expected\": [[\"..###.\", \".#D...\", \"#.....\"], true], \"passed\": false}, {\"check\": \"control #1\", \"actual\": [[\"#X\", \"..\", \"..\", \"#.\", \"#.\"], false], \"expected\": [[\"#X\", \"..\", \"..\", \"#.\", \"#.\"], false], \"passed\": true}, {\"check\": \"control #2\", \"actual\": [[\"XX\", \"X.\", \"..\", \"..\", \"..\"], false], \"expected\": [[\"XX\", \"X.\", \"..\", \"..\", \"..\"], false], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}