{"abstract":"UNION pagination allows one row past its global limit.","category":"Data systems","checks":7,"contract":"Concatenate ordered input branches with bag semantics, then apply one global nonnegative offset and limit. Branch-local boundaries, empty branches, and repeated rows do not reset pagination counters. Output order is branch order then row order.","evaluation_group":"s3-data-systems-union-global-pagination","failed_approach":"Increasing the stopping threshold retains the extra row.","family":"s3-data-systems-union-global-pagination-limit-boundary","id":"FA-45446","implementations":{"attempt":{"sha256":"c2c4cd7342e7f4c6659a4c61a1a5e331ae31bc2fecafd5b98cd8593d604d3a99","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    try:\n        branches,offset,limit=d\n        remaining=offset; out=[]\n        for branch in branches:\n            for row in branch:\n                if remaining: remaining-=1; continue\n                if len(out)>=limit+1: return out\n                out.append(row)\n        return out\n    except (IndexError, KeyError, ValueError, StopIteration) as exc:\n        return {\"representation_error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nif N == 1:\n    check('offset crosses branches', solve([[[1], [2, 3], [4]], 2, 2]), [3, 4])\n    check('global limit', solve([[[1, 2], [3, 4]], 0, 3]), [1, 2, 3])\n    check('empty middle', solve([[[1], [], [2, 3]], 1, 2]), [2, 3])\n    check('duplicates', solve([[[1, 1], [2]], 0, 3]), [1, 1, 2])\n    check('zero limit', solve([[[1]], 0, 0]), [])\n    check('large offset', solve([[[1], [2]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 2:\n    check('offset crosses branches', solve([[[2], [3, 4], [5]], 2, 2]), [4, 5])\n    check('global limit', solve([[[2, 3], [4, 5]], 0, 3]), [2, 3, 4])\n    check('empty middle', solve([[[2], [], [3, 4]], 1, 2]), [3, 4])\n    check('duplicates', solve([[[2, 2], [3]], 0, 3]), [2, 2, 3])\n    check('zero limit', solve([[[2]], 0, 0]), [])\n    check('large offset', solve([[[2], [3]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 3:\n    check('offset crosses branches', solve([[[3], [4, 5], [6]], 2, 2]), [5, 6])\n    check('global limit', solve([[[3, 4], [5, 6]], 0, 3]), [3, 4, 5])\n    check('empty middle', solve([[[3], [], [4, 5]], 1, 2]), [4, 5])\n    check('duplicates', solve([[[3, 3], [4]], 0, 3]), [3, 3, 4])\n    check('zero limit', solve([[[3]], 0, 0]), [])\n    check('large offset', solve([[[3], [4]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 4:\n    check('offset crosses branches', solve([[[4], [5, 6], [7]], 2, 2]), [6, 7])\n    check('global limit', solve([[[4, 5], [6, 7]], 0, 3]), [4, 5, 6])\n    check('empty middle', solve([[[4], [], [5, 6]], 1, 2]), [5, 6])\n    check('duplicates', solve([[[4, 4], [5]], 0, 3]), [4, 4, 5])\n    check('zero limit', solve([[[4]], 0, 0]), [])\n    check('large offset', solve([[[4], [5]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 5:\n    check('offset crosses branches', solve([[[5], [6, 7], [8]], 2, 2]), [7, 8])\n    check('global limit', solve([[[5, 6], [7, 8]], 0, 3]), [5, 6, 7])\n    check('empty middle', solve([[[5], [], [6, 7]], 1, 2]), [6, 7])\n    check('duplicates', solve([[[5, 5], [6]], 0, 3]), [5, 5, 6])\n    check('zero limit', solve([[[5]], 0, 0]), [])\n    check('large offset', solve([[[5], [6]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\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":"f303b865efdb15c497910d1e4bec55ce4eef67322e4cefc0e02877ae3b2e6ee8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    try:\n        branches,offset,limit=d\n        remaining=offset; out=[]\n        for branch in branches:\n            for row in branch:\n                if remaining: remaining-=1; continue\n                if len(out)>limit: return out\n                out.append(row)\n        return out\n    except (IndexError, KeyError, ValueError, StopIteration) as exc:\n        return {\"representation_error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nif N == 1:\n    check('offset crosses branches', solve([[[1], [2, 3], [4]], 2, 2]), [3, 4])\n    check('global limit', solve([[[1, 2], [3, 4]], 0, 3]), [1, 2, 3])\n    check('empty middle', solve([[[1], [], [2, 3]], 1, 2]), [2, 3])\n    check('duplicates', solve([[[1, 1], [2]], 0, 3]), [1, 1, 2])\n    check('zero limit', solve([[[1]], 0, 0]), [])\n    check('large offset', solve([[[1], [2]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 2:\n    check('offset crosses branches', solve([[[2], [3, 4], [5]], 2, 2]), [4, 5])\n    check('global limit', solve([[[2, 3], [4, 5]], 0, 3]), [2, 3, 4])\n    check('empty middle', solve([[[2], [], [3, 4]], 1, 2]), [3, 4])\n    check('duplicates', solve([[[2, 2], [3]], 0, 3]), [2, 2, 3])\n    check('zero limit', solve([[[2]], 0, 0]), [])\n    check('large offset', solve([[[2], [3]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 3:\n    check('offset crosses branches', solve([[[3], [4, 5], [6]], 2, 2]), [5, 6])\n    check('global limit', solve([[[3, 4], [5, 6]], 0, 3]), [3, 4, 5])\n    check('empty middle', solve([[[3], [], [4, 5]], 1, 2]), [4, 5])\n    check('duplicates', solve([[[3, 3], [4]], 0, 3]), [3, 3, 4])\n    check('zero limit', solve([[[3]], 0, 0]), [])\n    check('large offset', solve([[[3], [4]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 4:\n    check('offset crosses branches', solve([[[4], [5, 6], [7]], 2, 2]), [6, 7])\n    check('global limit', solve([[[4, 5], [6, 7]], 0, 3]), [4, 5, 6])\n    check('empty middle', solve([[[4], [], [5, 6]], 1, 2]), [5, 6])\n    check('duplicates', solve([[[4, 4], [5]], 0, 3]), [4, 4, 5])\n    check('zero limit', solve([[[4]], 0, 0]), [])\n    check('large offset', solve([[[4], [5]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 5:\n    check('offset crosses branches', solve([[[5], [6, 7], [8]], 2, 2]), [7, 8])\n    check('global limit', solve([[[5, 6], [7, 8]], 0, 3]), [5, 6, 7])\n    check('empty middle', solve([[[5], [], [6, 7]], 1, 2]), [6, 7])\n    check('duplicates', solve([[[5, 5], [6]], 0, 3]), [5, 5, 6])\n    check('zero limit', solve([[[5]], 0, 0]), [])\n    check('large offset', solve([[[5], [6]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\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"},"fixed":{"sha256":"7fd7fca5b594ad99cd6f1da4034f6f91f0ce114f9a38731abe6402f659d0170d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    try:\n        branches,offset,limit=d\n        remaining=offset; out=[]\n        for branch in branches:\n            for row in branch:\n                if remaining: remaining-=1; continue\n                if len(out)>=limit: return out\n                out.append(row)\n        return out\n    except (IndexError, KeyError, ValueError, StopIteration) as exc:\n        return {\"representation_error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nif N == 1:\n    check('offset crosses branches', solve([[[1], [2, 3], [4]], 2, 2]), [3, 4])\n    check('global limit', solve([[[1, 2], [3, 4]], 0, 3]), [1, 2, 3])\n    check('empty middle', solve([[[1], [], [2, 3]], 1, 2]), [2, 3])\n    check('duplicates', solve([[[1, 1], [2]], 0, 3]), [1, 1, 2])\n    check('zero limit', solve([[[1]], 0, 0]), [])\n    check('large offset', solve([[[1], [2]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 2:\n    check('offset crosses branches', solve([[[2], [3, 4], [5]], 2, 2]), [4, 5])\n    check('global limit', solve([[[2, 3], [4, 5]], 0, 3]), [2, 3, 4])\n    check('empty middle', solve([[[2], [], [3, 4]], 1, 2]), [3, 4])\n    check('duplicates', solve([[[2, 2], [3]], 0, 3]), [2, 2, 3])\n    check('zero limit', solve([[[2]], 0, 0]), [])\n    check('large offset', solve([[[2], [3]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 3:\n    check('offset crosses branches', solve([[[3], [4, 5], [6]], 2, 2]), [5, 6])\n    check('global limit', solve([[[3, 4], [5, 6]], 0, 3]), [3, 4, 5])\n    check('empty middle', solve([[[3], [], [4, 5]], 1, 2]), [4, 5])\n    check('duplicates', solve([[[3, 3], [4]], 0, 3]), [3, 3, 4])\n    check('zero limit', solve([[[3]], 0, 0]), [])\n    check('large offset', solve([[[3], [4]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 4:\n    check('offset crosses branches', solve([[[4], [5, 6], [7]], 2, 2]), [6, 7])\n    check('global limit', solve([[[4, 5], [6, 7]], 0, 3]), [4, 5, 6])\n    check('empty middle', solve([[[4], [], [5, 6]], 1, 2]), [5, 6])\n    check('duplicates', solve([[[4, 4], [5]], 0, 3]), [4, 4, 5])\n    check('zero limit', solve([[[4]], 0, 0]), [])\n    check('large offset', solve([[[4], [5]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\nelif N == 5:\n    check('offset crosses branches', solve([[[5], [6, 7], [8]], 2, 2]), [7, 8])\n    check('global limit', solve([[[5, 6], [7, 8]], 0, 3]), [5, 6, 7])\n    check('empty middle', solve([[[5], [], [6, 7]], 1, 2]), [6, 7])\n    check('duplicates', solve([[[5, 5], [6]], 0, 3]), [5, 5, 6])\n    check('zero limit', solve([[[5]], 0, 0]), [])\n    check('large offset', solve([[[5], [6]], 4, 2]), [])\n    check('no branches', solve([[], 0, 3]), [])\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":"Offline stipulated semantics over valid small inputs; no performance, concurrency, or production-engine conformance claim. 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":"s3-data-systems-union-global-pagination-limit-boundary","generated_at":"2026-09-29T14:44:22.302884+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A bounded deterministic data engine model makes representation and changelog faults reproducible.","repair":"Preserve the stated physical representation and operation order: Concatenate ordered input branches with bag semantics, then apply one global nonnegative offset and limit. Branch-local boundaries, empty branches, and repeated rows do not reset pagination counters. Output order is branch order then row order.","root_cause":"union-global-pagination: UNION pagination allows one row past its global limit.","sha256":"12f812e292e6189dfbb430cc33f6f8d26e0d5e6517cea7b9c96f2e846ac5ed5c","title":"UNION pagination allows one row past its global limit · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.299,"exit_code":1,"observations":[{"actual":[3,4],"check":"offset crosses branches","expected":[3,4],"passed":true},{"actual":[1,2,3,4],"check":"global limit","expected":[1,2,3],"passed":false},{"actual":[2,3],"check":"empty middle","expected":[2,3],"passed":true},{"actual":[1,1,2],"check":"duplicates","expected":[1,1,2],"passed":true},{"actual":[1],"check":"zero limit","expected":[],"passed":false},{"actual":[],"check":"large offset","expected":[],"passed":true},{"actual":[],"check":"no branches","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"offset crosses branches\", \"actual\": [3, 4], \"expected\": [3, 4], \"passed\": true}, {\"check\": \"global limit\", \"actual\": [1, 2, 3, 4], \"expected\": [1, 2, 3], \"passed\": false}, {\"check\": \"empty middle\", \"actual\": [2, 3], \"expected\": [2, 3], \"passed\": true}, {\"check\": \"duplicates\", \"actual\": [1, 1, 2], \"expected\": [1, 1, 2], \"passed\": true}, {\"check\": \"zero limit\", \"actual\": [1], \"expected\": [], \"passed\": false}, {\"check\": \"large offset\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"no branches\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":49.481,"exit_code":1,"observations":[{"actual":[3,4],"check":"offset crosses branches","expected":[3,4],"passed":true},{"actual":[1,2,3,4],"check":"global limit","expected":[1,2,3],"passed":false},{"actual":[2,3],"check":"empty middle","expected":[2,3],"passed":true},{"actual":[1,1,2],"check":"duplicates","expected":[1,1,2],"passed":true},{"actual":[1],"check":"zero limit","expected":[],"passed":false},{"actual":[],"check":"large offset","expected":[],"passed":true},{"actual":[],"check":"no branches","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"offset crosses branches\", \"actual\": [3, 4], \"expected\": [3, 4], \"passed\": true}, {\"check\": \"global limit\", \"actual\": [1, 2, 3, 4], \"expected\": [1, 2, 3], \"passed\": false}, {\"check\": \"empty middle\", \"actual\": [2, 3], \"expected\": [2, 3], \"passed\": true}, {\"check\": \"duplicates\", \"actual\": [1, 1, 2], \"expected\": [1, 1, 2], \"passed\": true}, {\"check\": \"zero limit\", \"actual\": [1], \"expected\": [], \"passed\": false}, {\"check\": \"large offset\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"no branches\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":51.578,"exit_code":0,"observations":[{"actual":[3,4],"check":"offset crosses branches","expected":[3,4],"passed":true},{"actual":[1,2,3],"check":"global limit","expected":[1,2,3],"passed":true},{"actual":[2,3],"check":"empty middle","expected":[2,3],"passed":true},{"actual":[1,1,2],"check":"duplicates","expected":[1,1,2],"passed":true},{"actual":[],"check":"zero limit","expected":[],"passed":true},{"actual":[],"check":"large offset","expected":[],"passed":true},{"actual":[],"check":"no branches","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"offset crosses branches\", \"actual\": [3, 4], \"expected\": [3, 4], \"passed\": true}, {\"check\": \"global limit\", \"actual\": [1, 2, 3], \"expected\": [1, 2, 3], \"passed\": true}, {\"check\": \"empty middle\", \"actual\": [2, 3], \"expected\": [2, 3], \"passed\": true}, {\"check\": \"duplicates\", \"actual\": [1, 1, 2], \"expected\": [1, 1, 2], \"passed\": true}, {\"check\": \"zero limit\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"large offset\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"no branches\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}