{"abstract":"Stair placement differs from the documented row-major rule.","category":"Procedural level generation constraints","checks":8,"contract":"Scan floor_a row by row (y), then column (x); choose the first cell where floor_a[y][x] == '.', the cell exists on floor_b and is '.' there, and the Manhattan distance to entrance [x, y] is at least min_dist. Returns [x, y] or None.","contract_signature":"floor_a, floor_b, entrance, min_dist","evaluation_group":"w2-procedural-level-generation-constraints-aligned-stairs","failed_approach":"Scanning rows bottom-up still picks a different first cell.","family":"w2-procedural-level-generation-constraints-aligned-stairs-scan-order","id":"FA-86821","implementations":{"attempt":{"sha256":"5043bedb0220dedba35f9588cd41d452efa9c8985f0f1d37c9116ffa9b94ff63","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(floor_a, floor_b, entrance, min_dist):\n    for y in reversed(range(len(floor_a))):\n        for x in range(len(floor_a[0])):\n            if floor_a[y][x] != '.':\n                continue\n            if y >= len(floor_b) or x >= len(floor_b[0]) or floor_b[y][x] != '.':\n                continue\n            if abs(x - entrance[0]) + abs(y - entrance[1]) < min_dist:\n                continue\n            return [x, y]\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('regression scan order #1',\n   [['#....', '..#..', '#...#', '#..#.', '.#.#.', '.#.#.'],\n    ['#~..', '..~.', '..~.', '..#.', '##~~'],\n    [1, 4],\n    1],\n   [2, 0]),\n  ('regression scan order #2',\n   [['.#..', '....', '....', '#...'], ['~#...', '~.~..', '#~.~.'], [3, 0], 0],\n   [2, 0]),\n  ('partial repair boundary #1',\n   [['..###.', '.#.#..', '...##.', '###...', '.#..##'], ['#', '~', '.', '.', '.', '#'], [2, 2], 2],\n   [0, 2]),\n  ('partial repair boundary #2',\n   [['#', '.', '.', '.', '.', '#'], ['..', '..', '..', '.~', '.~', '##'], [0, 3], 0],\n   [0, 1]),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('control #1', [['#.#.', '...#'], ['...#~', '.....'], [3, 1], 4], None)],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('regression scan order #1',\n   [['.#..', '....', '....', '#...'], ['~#...', '~.~..', '#~.~.'], [3, 0], 0],\n   [2, 0]),\n  ('regression scan order #2',\n   [['..#..', '#..#.', '..#..', '.....', '.#...', '##.#.'],\n    ['~~.', '##.', '~#~', '###', '.##', '...'],\n    [2, 1],\n    0],\n   [2, 1]),\n  ('partial repair boundary #1',\n   [['..###.', '.#.#..', '...##.', '###...', '.#..##'], ['#', '~', '.', '.', '.', '#'], [2, 2], 2],\n   [0, 2]),\n  ('partial repair boundary #2',\n   [['#', '.', '.', '.', '.', '#'], ['..', '..', '..', '.~', '.~', '##'], [0, 3], 0],\n   [0, 1]),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('control #1', [['#.#.', '...#'], ['...#~', '.....'], [3, 1], 4], None)],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('regression scan order #1',\n   [['###..', '.#.##', '.....', '.....', '#.##.'], ['~#..', '...#'], [0, 0], 3],\n   [3, 0]),\n  ('regression scan order #2',\n   [['..#..', '#....', '##...', '...#.', '..#..'], ['~.~.', '.##.', '~.##', '....', '...~'], [4, 2], 0],\n   [1, 0]),\n  ('partial repair boundary #1',\n   [['#', '.', '.', '.', '.', '#'], ['..', '..', '..', '.~', '.~', '##'], [0, 3], 0],\n   [0, 1]),\n  ('partial repair boundary #2',\n   [['...#', '.##.', '#..#', '.#..', '.#.#', '....'], ['.....', '.#..~', '.#~.#', '.#~.#'], [2, 5], 1],\n   [0, 0]),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('control #1', [['#.#.', '...#'], ['...#~', '.....'], [3, 1], 4], None)],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('regression scan order #1',\n   [['...', '...', '###', '...', '###'], ['~.#', '.#~', '~..', '.#~', '.#.'], [1, 3], 2],\n   [1, 0]),\n  ('regression scan order #2',\n   [['..', '..', '.#', '##', '..', '..'], ['~.', '.~', '..', '~.', '~#'], [1, 4], 4],\n   [1, 0]),\n  ('regression scan order #3',\n   [['..#..', '#..#.', '..#..', '.....', '.#...', '##.#.'],\n    ['~~.', '##.', '~#~', '###', '.##', '...'],\n    [2, 1],\n    0],\n   [2, 1]),\n  ('regression scan order #4',\n   [['###..', '.#.##', '.....', '.....', '#.##.'], ['~#..', '...#'], [0, 0], 3],\n   [3, 0]),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('control #1', [['.', '#', '.', '#'], ['#.....'], [0, 1], 4], None)],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('regression scan order #1',\n   [['...#', '##..', '.##.', '....', '.#..', '..##'], ['~.', '#.', '##', '~.', '#.', '.#'], [3, 2], 2],\n   [1, 0]),\n  ('regression scan order #2',\n   [['.#...', '.....', '.....', '..##.'], ['~~.', '.#.', '...', '#.~', '~##', '...'], [0, 1], 3],\n   [2, 0]),\n  ('partial repair boundary #1',\n   [['..#', '.#.', '#.#', '...', '..#'], ['#', '.', '#', '.'], [0, 0], 0],\n   [0, 1]),\n  ('partial repair boundary #2',\n   [['.....#', '..#.#.', '.#..#.', '..###.', '#.#..#'], ['.#.~~#', '.#.##.', '~~#~..', '......'], [0, 3], 5],\n   [2, 0]),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('control #1',\n   [['...', '.#.', '...', '..#', '###', '..#'], ['~.#.~', '##~~#', '~~#..', '.~.~.'], [2, 4], 5],\n   [1, 0])]]\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":"425c0dc9fbb7ae83f3b1a894c85cdd8cb58118c4e16717130cc8e10302ed29a6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(floor_a, floor_b, entrance, min_dist):\n    for x in range(len(floor_a[0])):\n        for y in range(len(floor_a)):\n            if floor_a[y][x] != '.':\n                continue\n            if y >= len(floor_b) or x >= len(floor_b[0]) or floor_b[y][x] != '.':\n                continue\n            if abs(x - entrance[0]) + abs(y - entrance[1]) < min_dist:\n                continue\n            return [x, y]\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('regression scan order #1',\n   [['#....', '..#..', '#...#', '#..#.', '.#.#.', '.#.#.'],\n    ['#~..', '..~.', '..~.', '..#.', '##~~'],\n    [1, 4],\n    1],\n   [2, 0]),\n  ('regression scan order #2',\n   [['.#..', '....', '....', '#...'], ['~#...', '~.~..', '#~.~.'], [3, 0], 0],\n   [2, 0]),\n  ('partial repair boundary #1',\n   [['..###.', '.#.#..', '...##.', '###...', '.#..##'], ['#', '~', '.', '.', '.', '#'], [2, 2], 2],\n   [0, 2]),\n  ('partial repair boundary #2',\n   [['#', '.', '.', '.', '.', '#'], ['..', '..', '..', '.~', '.~', '##'], [0, 3], 0],\n   [0, 1]),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('control #1', [['#.#.', '...#'], ['...#~', '.....'], [3, 1], 4], None)],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('regression scan order #1',\n   [['.#..', '....', '....', '#...'], ['~#...', '~.~..', '#~.~.'], [3, 0], 0],\n   [2, 0]),\n  ('regression scan order #2',\n   [['..#..', '#..#.', '..#..', '.....', '.#...', '##.#.'],\n    ['~~.', '##.', '~#~', '###', '.##', '...'],\n    [2, 1],\n    0],\n   [2, 1]),\n  ('partial repair boundary #1',\n   [['..###.', '.#.#..', '...##.', '###...', '.#..##'], ['#', '~', '.', '.', '.', '#'], [2, 2], 2],\n   [0, 2]),\n  ('partial repair boundary #2',\n   [['#', '.', '.', '.', '.', '#'], ['..', '..', '..', '.~', '.~', '##'], [0, 3], 0],\n   [0, 1]),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('control #1', [['#.#.', '...#'], ['...#~', '.....'], [3, 1], 4], None)],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('regression scan order #1',\n   [['###..', '.#.##', '.....', '.....', '#.##.'], ['~#..', '...#'], [0, 0], 3],\n   [3, 0]),\n  ('regression scan order #2',\n   [['..#..', '#....', '##...', '...#.', '..#..'], ['~.~.', '.##.', '~.##', '....', '...~'], [4, 2], 0],\n   [1, 0]),\n  ('partial repair boundary #1',\n   [['#', '.', '.', '.', '.', '#'], ['..', '..', '..', '.~', '.~', '##'], [0, 3], 0],\n   [0, 1]),\n  ('partial repair boundary #2',\n   [['...#', '.##.', '#..#', '.#..', '.#.#', '....'], ['.....', '.#..~', '.#~.#', '.#~.#'], [2, 5], 1],\n   [0, 0]),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('control #1', [['#.#.', '...#'], ['...#~', '.....'], [3, 1], 4], None)],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('regression scan order #1',\n   [['...', '...', '###', '...', '###'], ['~.#', '.#~', '~..', '.#~', '.#.'], [1, 3], 2],\n   [1, 0]),\n  ('regression scan order #2',\n   [['..', '..', '.#', '##', '..', '..'], ['~.', '.~', '..', '~.', '~#'], [1, 4], 4],\n   [1, 0]),\n  ('regression scan order #3',\n   [['..#..', '#..#.', '..#..', '.....', '.#...', '##.#.'],\n    ['~~.', '##.', '~#~', '###', '.##', '...'],\n    [2, 1],\n    0],\n   [2, 1]),\n  ('regression scan order #4',\n   [['###..', '.#.##', '.....', '.....', '#.##.'], ['~#..', '...#'], [0, 0], 3],\n   [3, 0]),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('control #1', [['.', '#', '.', '#'], ['#.....'], [0, 1], 4], None)],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('regression scan order #1',\n   [['...#', '##..', '.##.', '....', '.#..', '..##'], ['~.', '#.', '##', '~.', '#.', '.#'], [3, 2], 2],\n   [1, 0]),\n  ('regression scan order #2',\n   [['.#...', '.....', '.....', '..##.'], ['~~.', '.#.', '...', '#.~', '~##', '...'], [0, 1], 3],\n   [2, 0]),\n  ('partial repair boundary #1',\n   [['..#', '.#.', '#.#', '...', '..#'], ['#', '.', '#', '.'], [0, 0], 0],\n   [0, 1]),\n  ('partial repair boundary #2',\n   [['.....#', '..#.#.', '.#..#.', '..###.', '#.#..#'], ['.#.~~#', '.#.##.', '~~#~..', '......'], [0, 3], 5],\n   [2, 0]),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('control #1',\n   [['...', '.#.', '...', '..#', '###', '..#'], ['~.#.~', '##~~#', '~~#..', '.~.~.'], [2, 4], 5],\n   [1, 0])]]\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-aligned-stairs-scan-order","generated_at":"2026-09-29T14:50:53.143519+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":"The loops iterate columns in the outer loop.","sha256":"af532d45977c2acc45105e015f3fb491d5040678fdfcb4630d8febb246969bff","title":"Aligned stair placement: Stairs scanned column-major · 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":39.616,"exit_code":1,"observations":[{"actual":[0,1],"check":"first row candidate #1","expected":[1,0],"passed":false},{"actual":[1,3],"check":"regression scan order #1","expected":[2,0],"passed":false},{"actual":[2,2],"check":"regression scan order #2","expected":[2,0],"passed":false},{"actual":[0,4],"check":"partial repair boundary #1","expected":[0,2],"passed":false},{"actual":[0,4],"check":"partial repair boundary #2","expected":[0,1],"passed":false},{"actual":null,"check":"water below #1","expected":null,"passed":true},{"actual":[2,0],"check":"distance exactly min #1","expected":[2,0],"passed":true},{"actual":null,"check":"control #1","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"first row candidate #1\", \"actual\": [0, 1], \"expected\": [1, 0], \"passed\": false}, {\"check\": \"regression scan order #1\", \"actual\": [1, 3], \"expected\": [2, 0], \"passed\": false}, {\"check\": \"regression scan order #2\", \"actual\": [2, 2], \"expected\": [2, 0], \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": [0, 4], \"expected\": [0, 2], \"passed\": false}, {\"check\": \"partial repair boundary #2\", \"actual\": [0, 4], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"water below #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"distance exactly min #1\", \"actual\": [2, 0], \"expected\": [2, 0], \"passed\": true}, {\"check\": \"control #1\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.636,"exit_code":1,"observations":[{"actual":[0,1],"check":"first row candidate #1","expected":[1,0],"passed":false},{"actual":[0,1],"check":"regression scan order #1","expected":[2,0],"passed":false},{"actual":[1,1],"check":"regression scan order #2","expected":[2,0],"passed":false},{"actual":[0,2],"check":"partial repair boundary #1","expected":[0,2],"passed":true},{"actual":[0,1],"check":"partial repair boundary #2","expected":[0,1],"passed":true},{"actual":null,"check":"water below #1","expected":null,"passed":true},{"actual":[2,0],"check":"distance exactly min #1","expected":[2,0],"passed":true},{"actual":null,"check":"control #1","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"first row candidate #1\", \"actual\": [0, 1], \"expected\": [1, 0], \"passed\": false}, {\"check\": \"regression scan order #1\", \"actual\": [0, 1], \"expected\": [2, 0], \"passed\": false}, {\"check\": \"regression scan order #2\", \"actual\": [1, 1], \"expected\": [2, 0], \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": [0, 2], \"expected\": [0, 2], \"passed\": true}, {\"check\": \"partial repair boundary #2\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"water below #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"distance exactly min #1\", \"actual\": [2, 0], \"expected\": [2, 0], \"passed\": true}, {\"check\": \"control #1\", \"actual\": null, \"expected\": null, \"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."}}