{"abstract":"Counter-clockwise requests leave prefabs unrotated.","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":"Taking the absolute value turns counter-clockwise into clockwise.","family":"w2-procedural-level-generation-constraints-prefab-stamp-rotation-count","id":"FA-86736","implementations":{"attempt":{"sha256":"42fc94751bb3ed31a0d08171a5d61e389282f1b0679569ba72341bab9f167686","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(abs(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 + r, ox + 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 = [[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('fault site rotation count #1',\n   [['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],\n   [['...', '#..', 'X..', '...', '#X.', '..X'], False]),\n  ('regression rotation count #1',\n   [['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],\n   [['..#', '...', '.D.', '###'], True]),\n  ('partial repair boundary #1',\n   [['XX', 'X.', '..', '..', '..'], ['D', 'D', ' '], 0, 4, -3],\n   [['XX', 'X.', '..', '..', '..'], False]),\n  ('regression rotation count #2',\n   [['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],\n   [['...', '...', '...', 'X..', 'X#.', '...'], True]),\n  ('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('control #1', [['.#...#', '.#.#..'], ['  ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('regression rotation count #1',\n   [['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],\n   [['..#', '...', '.D.', '###'], True]),\n  ('fault site rotation count #1',\n   [['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], ['D', '.'], 2, 3, -1],\n   [['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], False]),\n  ('regression rotation count #2',\n   [['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],\n   [['...', '...', '...', 'X..', 'X#.', '...'], True]),\n  ('partial repair boundary #1',\n   [['.X.', '...', 'X#.'], ['#', ' '], 2, 2, -1],\n   [['.X.', '...', 'X##'], True]),\n  ('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('control #1', [['.#...#', '.#.#..'], ['  ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('fault site rotation count #1',\n   [['X#.XX', '....X', '...#.', 'X...#', 'X....'], ['D', 'D'], 1, 0, -1],\n   [['XDDXX', '....X', '...#.', 'X...#', 'X....'], True]),\n  ('fault site rotation count #2',\n   [['#...#.', '.##X..', '...X#.', '..XX..', '..#X.#'], ['.', '.'], 1, 1, -1],\n   [['#...#.', '...X..', '...X#.', '..XX..', '..#X.#'], True]),\n  ('partial repair boundary #1',\n   [['.X.', '...', 'X#.'], ['#', ' '], 2, 2, -1],\n   [['.X.', '...', 'X##'], True]),\n  ('regression rotation count #1', [['..X', 'X..'], ['   ', 'D. '], 0, -1, -1], [['..X', 'XD.'], True]),\n  ('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('control #1', [['.#...#', '.#.#..'], ['  ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('regression rotation count #1',\n   [['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],\n   [['...', '...', '...', 'X..', 'X#.', '...'], True]),\n  ('regression rotation count #2', [['..X', 'X..'], ['   ', 'D. '], 0, -1, -1], [['..X', 'XD.'], True]),\n  ('regression rotation count #3',\n   [['..X.', '..##', 'XX..', 'X...', '#X..'], ['D', '.'], 1, 1, -3],\n   [['..X.', '..D#', 'XX..', 'X...', '#X..'], True]),\n  ('partial repair boundary #1',\n   [['..', '..', '.X', '..'], [' D.'], 0, 2, -3],\n   [['..', '..', '.X', '..'], False]),\n  ('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('control #1',\n   [['#X', '..', '..', '#.', '#.'], [' D', '.#', '.#'], -1, 2, 3],\n   [['#X', '..', '..', '#.', '#.'], False])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('fault site rotation count #1',\n   [['..', '..', '..'], [' ', ' ', 'D'], 0, 0, -2],\n   [['D.', '..', '..'], True]),\n  ('regression rotation count #1',\n   [['..X.', '..##', 'XX..', 'X...', '#X..'], ['D', '.'], 1, 1, -3],\n   [['..X.', '..D#', 'XX..', 'X...', '#X..'], True]),\n  ('partial repair boundary #1', [['..X.', '#.#.'], ['# '], 0, 0, -3], [['#.X.', '#.#.'], True]),\n  ('regression rotation count #2',\n   [['.....', '....#', '....X', '#.XX#', '.##..'], ['.##'], 0, 0, -1],\n   [['#....', '#...#', '....X', '#.XX#', '.##..'], True]),\n  ('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('control #1', [['.X.', '...'], ['D#.', 'D #'], -1, -1, -1], [['.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":"63f12ef84364104764a40f5165aeb0a880c09669af75447fd6ecaff47dd301c3","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):\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 + r, ox + 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 = [[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('fault site rotation count #1',\n   [['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],\n   [['...', '#..', 'X..', '...', '#X.', '..X'], False]),\n  ('regression rotation count #1',\n   [['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],\n   [['..#', '...', '.D.', '###'], True]),\n  ('partial repair boundary #1',\n   [['XX', 'X.', '..', '..', '..'], ['D', 'D', ' '], 0, 4, -3],\n   [['XX', 'X.', '..', '..', '..'], False]),\n  ('regression rotation count #2',\n   [['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],\n   [['...', '...', '...', 'X..', 'X#.', '...'], True]),\n  ('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('control #1', [['.#...#', '.#.#..'], ['  ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('regression rotation count #1',\n   [['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],\n   [['..#', '...', '.D.', '###'], True]),\n  ('fault site rotation count #1',\n   [['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], ['D', '.'], 2, 3, -1],\n   [['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], False]),\n  ('regression rotation count #2',\n   [['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],\n   [['...', '...', '...', 'X..', 'X#.', '...'], True]),\n  ('partial repair boundary #1',\n   [['.X.', '...', 'X#.'], ['#', ' '], 2, 2, -1],\n   [['.X.', '...', 'X##'], True]),\n  ('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('control #1', [['.#...#', '.#.#..'], ['  ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('fault site rotation count #1',\n   [['X#.XX', '....X', '...#.', 'X...#', 'X....'], ['D', 'D'], 1, 0, -1],\n   [['XDDXX', '....X', '...#.', 'X...#', 'X....'], True]),\n  ('fault site rotation count #2',\n   [['#...#.', '.##X..', '...X#.', '..XX..', '..#X.#'], ['.', '.'], 1, 1, -1],\n   [['#...#.', '...X..', '...X#.', '..XX..', '..#X.#'], True]),\n  ('partial repair boundary #1',\n   [['.X.', '...', 'X#.'], ['#', ' '], 2, 2, -1],\n   [['.X.', '...', 'X##'], True]),\n  ('regression rotation count #1', [['..X', 'X..'], ['   ', 'D. '], 0, -1, -1], [['..X', 'XD.'], True]),\n  ('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('control #1', [['.#...#', '.#.#..'], ['  ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('regression rotation count #1',\n   [['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],\n   [['...', '...', '...', 'X..', 'X#.', '...'], True]),\n  ('regression rotation count #2', [['..X', 'X..'], ['   ', 'D. '], 0, -1, -1], [['..X', 'XD.'], True]),\n  ('regression rotation count #3',\n   [['..X.', '..##', 'XX..', 'X...', '#X..'], ['D', '.'], 1, 1, -3],\n   [['..X.', '..D#', 'XX..', 'X...', '#X..'], True]),\n  ('partial repair boundary #1',\n   [['..', '..', '.X', '..'], [' D.'], 0, 2, -3],\n   [['..', '..', '.X', '..'], False]),\n  ('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('control #1',\n   [['#X', '..', '..', '#.', '#.'], [' D', '.#', '.#'], -1, 2, 3],\n   [['#X', '..', '..', '#.', '#.'], False])],\n [('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),\n  ('fault site rotation count #1',\n   [['..', '..', '..'], [' ', ' ', 'D'], 0, 0, -2],\n   [['D.', '..', '..'], True]),\n  ('regression rotation count #1',\n   [['..X.', '..##', 'XX..', 'X...', '#X..'], ['D', '.'], 1, 1, -3],\n   [['..X.', '..D#', 'XX..', 'X...', '#X..'], True]),\n  ('partial repair boundary #1', [['..X.', '#.#.'], ['# '], 0, 0, -3], [['#.X.', '#.#.'], True]),\n  ('regression rotation count #2',\n   [['.....', '....#', '....X', '#.XX#', '.##..'], ['.##'], 0, 0, -1],\n   [['#....', '#...#', '....X', '#.XX#', '.##..'], True]),\n  ('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),\n  ('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),\n  ('control #1', [['.X.', '...'], ['D#.', 'D #'], -1, -1, -1], [['.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-rotation-count","generated_at":"2026-09-29T14:50:52.212382+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":"A negative rotation count yields an empty loop.","sha256":"a55253c8fef1babf5e224f3d37041c008d8f14324be9e0d2f192f3a5b3c4fb82","title":"Rotated prefab stamping: Negative rotations are ignored · 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":45.133,"exit_code":1,"observations":[{"actual":[[".#.","..."],true],"check":"counter-clockwise turn #1","expected":[["...","#.."],true],"passed":false},{"actual":[["...","#..","X..","...","#X.","..X"],false],"check":"fault site rotation count #1","expected":[["...","#..","X..","...","#X.","..X"],false],"passed":true},{"actual":[["..#","...",".##","##D"],true],"check":"regression rotation count #1","expected":[["..#","...",".D.","###"],true],"passed":false},{"actual":[["XX","X.","..","..","DD"],true],"check":"partial repair boundary #1","expected":[["XX","X.","..","..",".."],false],"passed":false},{"actual":[["...","...","...","X#.","X#.","..."],false],"check":"regression rotation count #2","expected":[["...","...","...","X..","X#.","..."],true],"passed":false},{"actual":[["#...","D..."],true],"check":"quarter turn #1","expected":[["#...","D..."],true],"passed":true},{"actual":[["#.","#."],true],"check":"transparent overhang #1","expected":[["#.","#."],true],"passed":true},{"actual":[[".#...#",".#.#.."],false],"check":"control #1","expected":[[".#...#",".#.#.."],false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"counter-clockwise turn #1\", \"actual\": [[\".#.\", \"...\"], true], \"expected\": [[\"...\", \"#..\"], true], \"passed\": false}, {\"check\": \"fault site rotation count #1\", \"actual\": [[\"...\", \"#..\", \"X..\", \"...\", \"#X.\", \"..X\"], false], \"expected\": [[\"...\", \"#..\", \"X..\", \"...\", \"#X.\", \"..X\"], false], \"passed\": true}, {\"check\": \"regression rotation count #1\", \"actual\": [[\"..#\", \"...\", \".##\", \"##D\"], true], \"expected\": [[\"..#\", \"...\", \".D.\", \"###\"], true], \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": [[\"XX\", \"X.\", \"..\", \"..\", \"DD\"], true], \"expected\": [[\"XX\", \"X.\", \"..\", \"..\", \"..\"], false], \"passed\": false}, {\"check\": \"regression rotation count #2\", \"actual\": [[\"...\", \"...\", \"...\", \"X#.\", \"X#.\", \"...\"], false], \"expected\": [[\"...\", \"...\", \"...\", \"X..\", \"X#.\", \"...\"], true], \"passed\": false}, {\"check\": \"quarter turn #1\", \"actual\": [[\"#...\", \"D...\"], true], \"expected\": [[\"#...\", \"D...\"], true], \"passed\": true}, {\"check\": \"transparent overhang #1\", \"actual\": [[\"#.\", \"#.\"], true], \"expected\": [[\"#.\", \"#.\"], true], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [[\".#...#\", \".#.#..\"], false], \"expected\": [[\".#...#\", \".#.#..\"], false], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.15,"exit_code":1,"observations":[{"actual":[["#..","..."],true],"check":"counter-clockwise turn #1","expected":[["...","#.."],true],"passed":false},{"actual":[[".D.","#.D","X..","...","#X.","..X"],true],"check":"fault site rotation count #1","expected":[["...","#..","X..","...","#X.","..X"],false],"passed":false},{"actual":[["..#","...","..#","#D#"],true],"check":"regression rotation count #1","expected":[["..#","...",".D.","###"],true],"passed":false},{"actual":[["XX","X.","..","..",".."],false],"check":"partial repair boundary #1","expected":[["XX","X.","..","..",".."],false],"passed":true},{"actual":[["...","...","...","X..","X..","..."],true],"check":"regression rotation count #2","expected":[["...","...","...","X..","X#.","..."],true],"passed":false},{"actual":[["#...","D..."],true],"check":"quarter turn #1","expected":[["#...","D..."],true],"passed":true},{"actual":[["#.","#."],true],"check":"transparent overhang #1","expected":[["#.","#."],true],"passed":true},{"actual":[[".#...#",".#.#.."],false],"check":"control #1","expected":[[".#...#",".#.#.."],false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"counter-clockwise turn #1\", \"actual\": [[\"#..\", \"...\"], true], \"expected\": [[\"...\", \"#..\"], true], \"passed\": false}, {\"check\": \"fault site rotation count #1\", \"actual\": [[\".D.\", \"#.D\", \"X..\", \"...\", \"#X.\", \"..X\"], true], \"expected\": [[\"...\", \"#..\", \"X..\", \"...\", \"#X.\", \"..X\"], false], \"passed\": false}, {\"check\": \"regression rotation count #1\", \"actual\": [[\"..#\", \"...\", \"..#\", \"#D#\"], true], \"expected\": [[\"..#\", \"...\", \".D.\", \"###\"], true], \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": [[\"XX\", \"X.\", \"..\", \"..\", \"..\"], false], \"expected\": [[\"XX\", \"X.\", \"..\", \"..\", \"..\"], false], \"passed\": true}, {\"check\": \"regression rotation count #2\", \"actual\": [[\"...\", \"...\", \"...\", \"X..\", \"X..\", \"...\"], true], \"expected\": [[\"...\", \"...\", \"...\", \"X..\", \"X#.\", \"...\"], true], \"passed\": false}, {\"check\": \"quarter turn #1\", \"actual\": [[\"#...\", \"D...\"], true], \"expected\": [[\"#...\", \"D...\"], true], \"passed\": true}, {\"check\": \"transparent overhang #1\", \"actual\": [[\"#.\", \"#.\"], true], \"expected\": [[\"#.\", \"#.\"], true], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [[\".#...#\", \".#.#..\"], false], \"expected\": [[\".#...#\", \".#.#..\"], 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."}}