{"abstract":"Gaps are checked against later positions, spacing encounters backwards.","category":"Procedural level generation constraints","checks":8,"contract":"Proposed positions are deduplicated and taken ascending. A position is legal when 1 <= pos <= length-2, is not a rest checkpoint (pos % rest_every == 0 when rest_every > 0), and lies at least min_gap after the anchor: the later of the last accepted encounter (initially the start, 0) and the last checkpoint at or before pos. Returns accepted positions.","contract_signature":"length, encounters, min_gap, rest_every","evaluation_group":"w2-procedural-level-generation-constraints-encounter-pacing","failed_approach":"Sorting without dedup accepts duplicate encounters when min_gap is zero.","family":"w2-procedural-level-generation-constraints-encounter-pacing-proposal-normalisation","id":"FA-86761","implementations":{"attempt":{"sha256":"c994992985b97d92ab7815acccadd3bb0a93a8634bfe31722af3e41088bd2706","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(length, encounters, min_gap, rest_every):\n    out = []\n    last = 0\n    for pos in sorted(encounters):\n        if pos < 1 or pos > length - 2:\n            continue\n        if rest_every and pos % rest_every == 0:\n            continue\n        anchor = last\n        if rest_every:\n            anchor = max(anchor, pos // rest_every * rest_every)\n        if pos - anchor < min_gap:\n            continue\n        out.append(pos)\n        last = pos\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),\n  ('fault site proposal normalisation #1',\n   [27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0],\n   [6, 10, 12, 15, 20]),\n  ('fault site proposal normalisation #2', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),\n  ('regression proposal normalisation #1', [4, [1, -2, 1], 0, 7], [1]),\n  ('regression proposal normalisation #2', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),\n  ('last legal tile #1', [10, [8, 9], 1, 0], [8]),\n  ('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),\n  ('control #1', [21, [-2, 16], 2, 5], [])],\n [('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),\n  ('fault site proposal normalisation #1', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),\n  ('fault site proposal normalisation #2', [40, [41, 39, 8, 9, 9, 32, 18, 41], 5, 0], [8, 18, 32]),\n  ('regression proposal normalisation #1', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),\n  ('regression proposal normalisation #2', [20, [16, 11, 18, 18, -2, 4, 21, 19, 21], 0, 0], [4, 11, 16, 18]),\n  ('last legal tile #1', [10, [8, 9], 1, 0], [8]),\n  ('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),\n  ('control #1', [21, [-2, 16], 2, 5], [])],\n [('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),\n  ('fault site proposal normalisation #1', [39, [34, 15, 35, 19, 4], 2, 4], [15, 19, 34]),\n  ('fault site proposal normalisation #2', [37, [27, 33, 11, 14, 7], 0, 7], [11, 27, 33]),\n  ('regression proposal normalisation #1', [30, [4, 23, 32, 22, 22, -1, 9, 2], 0, 0], [2, 4, 9, 22, 23]),\n  ('regression proposal normalisation #2', [39, [36, 36, 16, 30, 0, 39, 8], 0, 5], [8, 16, 36]),\n  ('last legal tile #1', [10, [8, 9], 1, 0], [8]),\n  ('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),\n  ('control #1', [21, [-2, 16], 2, 5], [])],\n [('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),\n  ('regression proposal normalisation #1', [4, [1, -2, 1], 0, 7], [1]),\n  ('fault site proposal normalisation #1', [38, [27, 16, 11, 3], 0, 7], [3, 11, 16, 27]),\n  ('partial repair boundary #1', [22, [23, 22, 5, 11, 5], 0, 0], [5, 11]),\n  ('partial repair boundary #2', [14, [1, 12, 0, 1], 0, 0], [1, 12]),\n  ('last legal tile #1', [10, [8, 9], 1, 0], [8]),\n  ('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),\n  ('control #1', [34, [-1, 30, 25, 20, 1, 11, 0], 5, 4], [])],\n [('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),\n  ('fault site proposal normalisation #1', [36, [32, 33, 13], 2, 0], [13, 32]),\n  ('fault site proposal normalisation #2', [29, [-2, 26, 19], 3, 0], [19, 26]),\n  ('regression proposal normalisation #1', [15, [2, 8, 8, 11], 0, 5], [2, 8, 11]),\n  ('regression proposal normalisation #2', [30, [17, 13, 17, -2, -2, 9, 32, 23], 0, 7], [9, 13, 17, 23]),\n  ('last legal tile #1', [10, [8, 9], 1, 0], [8]),\n  ('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),\n  ('control #1', [40, [3, 4], 3, 0], [3])]]\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":"91b15f9f484c189b918beb917b22a5c6b1ca9d3d4e5c837cdc373dd3d84ec2bd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(length, encounters, min_gap, rest_every):\n    out = []\n    last = 0\n    for pos in encounters:\n        if pos < 1 or pos > length - 2:\n            continue\n        if rest_every and pos % rest_every == 0:\n            continue\n        anchor = last\n        if rest_every:\n            anchor = max(anchor, pos // rest_every * rest_every)\n        if pos - anchor < min_gap:\n            continue\n        out.append(pos)\n        last = pos\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),\n  ('fault site proposal normalisation #1',\n   [27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0],\n   [6, 10, 12, 15, 20]),\n  ('fault site proposal normalisation #2', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),\n  ('regression proposal normalisation #1', [4, [1, -2, 1], 0, 7], [1]),\n  ('regression proposal normalisation #2', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),\n  ('last legal tile #1', [10, [8, 9], 1, 0], [8]),\n  ('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),\n  ('control #1', [21, [-2, 16], 2, 5], [])],\n [('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),\n  ('fault site proposal normalisation #1', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),\n  ('fault site proposal normalisation #2', [40, [41, 39, 8, 9, 9, 32, 18, 41], 5, 0], [8, 18, 32]),\n  ('regression proposal normalisation #1', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),\n  ('regression proposal normalisation #2', [20, [16, 11, 18, 18, -2, 4, 21, 19, 21], 0, 0], [4, 11, 16, 18]),\n  ('last legal tile #1', [10, [8, 9], 1, 0], [8]),\n  ('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),\n  ('control #1', [21, [-2, 16], 2, 5], [])],\n [('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),\n  ('fault site proposal normalisation #1', [39, [34, 15, 35, 19, 4], 2, 4], [15, 19, 34]),\n  ('fault site proposal normalisation #2', [37, [27, 33, 11, 14, 7], 0, 7], [11, 27, 33]),\n  ('regression proposal normalisation #1', [30, [4, 23, 32, 22, 22, -1, 9, 2], 0, 0], [2, 4, 9, 22, 23]),\n  ('regression proposal normalisation #2', [39, [36, 36, 16, 30, 0, 39, 8], 0, 5], [8, 16, 36]),\n  ('last legal tile #1', [10, [8, 9], 1, 0], [8]),\n  ('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),\n  ('control #1', [21, [-2, 16], 2, 5], [])],\n [('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),\n  ('regression proposal normalisation #1', [4, [1, -2, 1], 0, 7], [1]),\n  ('fault site proposal normalisation #1', [38, [27, 16, 11, 3], 0, 7], [3, 11, 16, 27]),\n  ('partial repair boundary #1', [22, [23, 22, 5, 11, 5], 0, 0], [5, 11]),\n  ('partial repair boundary #2', [14, [1, 12, 0, 1], 0, 0], [1, 12]),\n  ('last legal tile #1', [10, [8, 9], 1, 0], [8]),\n  ('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),\n  ('control #1', [34, [-1, 30, 25, 20, 1, 11, 0], 5, 4], [])],\n [('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),\n  ('fault site proposal normalisation #1', [36, [32, 33, 13], 2, 0], [13, 32]),\n  ('fault site proposal normalisation #2', [29, [-2, 26, 19], 3, 0], [19, 26]),\n  ('regression proposal normalisation #1', [15, [2, 8, 8, 11], 0, 5], [2, 8, 11]),\n  ('regression proposal normalisation #2', [30, [17, 13, 17, -2, -2, 9, 32, 23], 0, 7], [9, 13, 17, 23]),\n  ('last legal tile #1', [10, [8, 9], 1, 0], [8]),\n  ('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),\n  ('control #1', [40, [3, 4], 3, 0], [3])]]\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-encounter-pacing-proposal-normalisation","generated_at":"2026-09-29T14:50:52.561731+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":"Proposals are neither sorted nor deduplicated.","sha256":"2a464c3abc3501a33b15a48bf930b5a90935caf3e011e643691b7a3f2bb080fe","title":"Encounter pacing along the critical path: Proposals processed in input order · 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.608,"exit_code":1,"observations":[{"actual":[3,3,4],"check":"duplicate proposals #1","expected":[3,4],"passed":false},{"actual":[6,10,12,15,20],"check":"fault site proposal normalisation #1","expected":[6,10,12,15,20],"passed":true},{"actual":[4,7,8,9],"check":"fault site proposal normalisation #2","expected":[4,7,8,9],"passed":true},{"actual":[1,1],"check":"regression proposal normalisation #1","expected":[1],"passed":false},{"actual":[2,4,6,6,9,10],"check":"regression proposal normalisation #2","expected":[2,4,6,9,10],"passed":false},{"actual":[8],"check":"last legal tile #1","expected":[8],"passed":true},{"actual":[2,7],"check":"checkpoint resets gap #1","expected":[2,7],"passed":true},{"actual":[],"check":"control #1","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"duplicate proposals #1\", \"actual\": [3, 3, 4], \"expected\": [3, 4], \"passed\": false}, {\"check\": \"fault site proposal normalisation #1\", \"actual\": [6, 10, 12, 15, 20], \"expected\": [6, 10, 12, 15, 20], \"passed\": true}, {\"check\": \"fault site proposal normalisation #2\", \"actual\": [4, 7, 8, 9], \"expected\": [4, 7, 8, 9], \"passed\": true}, {\"check\": \"regression proposal normalisation #1\", \"actual\": [1, 1], \"expected\": [1], \"passed\": false}, {\"check\": \"regression proposal normalisation #2\", \"actual\": [2, 4, 6, 6, 9, 10], \"expected\": [2, 4, 6, 9, 10], \"passed\": false}, {\"check\": \"last legal tile #1\", \"actual\": [8], \"expected\": [8], \"passed\": true}, {\"check\": \"checkpoint resets gap #1\", \"actual\": [2, 7], \"expected\": [2, 7], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.564,"exit_code":1,"observations":[{"actual":[3,3,4],"check":"duplicate proposals #1","expected":[3,4],"passed":false},{"actual":[20],"check":"fault site proposal normalisation #1","expected":[6,10,12,15,20],"passed":false},{"actual":[4,9],"check":"fault site proposal normalisation #2","expected":[4,7,8,9],"passed":false},{"actual":[1,1],"check":"regression proposal normalisation #1","expected":[1],"passed":false},{"actual":[6,10],"check":"regression proposal normalisation #2","expected":[2,4,6,9,10],"passed":false},{"actual":[8],"check":"last legal tile #1","expected":[8],"passed":true},{"actual":[2,7],"check":"checkpoint resets gap #1","expected":[2,7],"passed":true},{"actual":[],"check":"control #1","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"duplicate proposals #1\", \"actual\": [3, 3, 4], \"expected\": [3, 4], \"passed\": false}, {\"check\": \"fault site proposal normalisation #1\", \"actual\": [20], \"expected\": [6, 10, 12, 15, 20], \"passed\": false}, {\"check\": \"fault site proposal normalisation #2\", \"actual\": [4, 9], \"expected\": [4, 7, 8, 9], \"passed\": false}, {\"check\": \"regression proposal normalisation #1\", \"actual\": [1, 1], \"expected\": [1], \"passed\": false}, {\"check\": \"regression proposal normalisation #2\", \"actual\": [6, 10], \"expected\": [2, 4, 6, 9, 10], \"passed\": false}, {\"check\": \"last legal tile #1\", \"actual\": [8], \"expected\": [8], \"passed\": true}, {\"check\": \"checkpoint resets gap #1\", \"actual\": [2, 7], \"expected\": [2, 7], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [], \"expected\": [], \"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."}}