{"abstract":"A mistyped -20 percent step reports a negative rollout that downstream gates treat inconsistently.","category":"Feature flag rollout bucketing","checks":8,"contract":"steps is a possibly unsorted list of [epoch second, percent or None]. Order steps by time, breaking ties by list position (later entries apply later). Every step with time <= now is active in that order; a None percent is a hold that keeps the previous value; numeric percents are clamped to [0, 100]. Before the first step the percentage is 0. Return [percent, original list index of the last active step or -1].","contract_signature":"steps, now","evaluation_group":"w2-feature-flag-rollout-bucketing-scheduled-ramp","failed_approach":"Clamping only the lower bound lets 150 percent through.","family":"w2-feature-flag-rollout-bucketing-scheduled-ramp-percentage-clamp","id":"FA-74006","implementations":{"attempt":{"sha256":"36b56c0ea0ab345108cd845df3ae44b75a65b3dce91417540469c0aaf2cb4d38","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(steps, now):\n    order = sorted(range(len(steps)), key=lambda i: (steps[i][0], i))\n    current = 0\n    active = -1\n    for i in order:\n        at, pct = steps[i]\n        if at > now:\n            break\n        active = i\n        if pct is not None:\n            current = max(pct, 0)\n    return [current, active]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('step scheduled exactly now is active', [[[0, 5], [60, 25]], 60], [25, 1]),\n  ('unsorted schedule is ordered by time', [[[60, 50], [0, 10], [30, 25]], 45], [25, 2]),\n  ('later entry wins a timestamp tie', [[[0, 5], [30, 50], [30, 20]], 40], [20, 2]),\n  ('hold step keeps previous percentage', [[[0, 25], [30, None]], 40], [25, 1]),\n  ('explicit rollback to zero percent', [[[0, 25], [30, 0]], 40], [0, 1]),\n  ('over-hundred percent is clamped', [[[0, 150]], 10], [100, 0]),\n  ('negative percent is clamped to zero', [[[0, 10], [5, -20]], 10], [0, 1]),\n  ('ramp schedule sample 1', [[[45, 0], [45, 5], [20, None], [45, 25], [60, -10], [45, None]], 45], [25, 5])],\n [('unsorted schedule is ordered by time', [[[60, 50], [0, 10], [30, 25]], 45], [25, 2]),\n  ('later entry wins a timestamp tie', [[[0, 5], [30, 50], [30, 20]], 40], [20, 2]),\n  ('hold step keeps previous percentage', [[[0, 25], [30, None]], 40], [25, 1]),\n  ('explicit rollback to zero percent', [[[0, 25], [30, 0]], 40], [0, 1]),\n  ('over-hundred percent is clamped', [[[0, 150]], 10], [100, 0]),\n  ('negative percent is clamped to zero', [[[0, 10], [5, -20]], 10], [0, 1]),\n  ('ramp schedule sample 28', [[[60, 120], [20, 120], [45, 100], [10, 25], [0, -10]], 0], [0, 4]),\n  ('ramp schedule sample 30', [[[20, 120], [10, 120], [0, 50], [20, None]], 20], [100, 3])],\n [('later entry wins a timestamp tie', [[[0, 5], [30, 50], [30, 20]], 40], [20, 2]),\n  ('hold step keeps previous percentage', [[[0, 25], [30, None]], 40], [25, 1]),\n  ('explicit rollback to zero percent', [[[0, 25], [30, 0]], 40], [0, 1]),\n  ('over-hundred percent is clamped', [[[0, 150]], 10], [100, 0]),\n  ('negative percent is clamped to zero', [[[0, 10], [5, -20]], 10], [0, 1]),\n  ('ramp schedule sample 11', [[[0, 5]], -5], [0, -1]),\n  ('ramp schedule sample 48', [[[0, -10], [60, None], [20, -10]], 60], [0, 1]),\n  ('ramp schedule sample 58', [[[30, 25], [30, 120], [10, 120], [30, None]], 30], [100, 3])],\n [('hold step keeps previous percentage', [[[0, 25], [30, None]], 40], [25, 1]),\n  ('explicit rollback to zero percent', [[[0, 25], [30, 0]], 40], [0, 1]),\n  ('over-hundred percent is clamped', [[[0, 150]], 10], [100, 0]),\n  ('negative percent is clamped to zero', [[[0, 10], [5, -20]], 10], [0, 1]),\n  ('before first step is zero', [[[10, 50]], 5], [0, -1]),\n  ('ramp schedule sample 8', [[[20, -10]], 30], [0, 0]),\n  ('ramp schedule sample 16', [[[60, 120]], 60], [100, 0]),\n  ('ramp schedule sample 17', [[[45, 5], [20, 120], [20, 50], [10, 100], [45, 75]], 20], [50, 2])],\n [('explicit rollback to zero percent', [[[0, 25], [30, 0]], 40], [0, 1]),\n  ('over-hundred percent is clamped', [[[0, 150]], 10], [100, 0]),\n  ('negative percent is clamped to zero', [[[0, 10], [5, -20]], 10], [0, 1]),\n  ('before first step is zero', [[[10, 50]], 5], [0, -1]),\n  ('active index refers to original position', [[[20, 30], [10, 10]], 15], [10, 1]),\n  ('ramp schedule sample 21', [[], 0], [0, -1]),\n  ('ramp schedule sample 32', [[[60, 0], [0, -10], [20, 0]], 10], [0, 1]),\n  ('ramp schedule sample 39', [[[0, 120], [30, None], [30, None], [20, -10]], 0], [100, 0])]]\nfor label, args, expected in fixtures[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":"582dd01b45be8249ccbd6b0c8b3df74425719d81b4291dbdf653649c691cedba","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(steps, now):\n    order = sorted(range(len(steps)), key=lambda i: (steps[i][0], i))\n    current = 0\n    active = -1\n    for i in order:\n        at, pct = steps[i]\n        if at > now:\n            break\n        active = i\n        if pct is not None:\n            current = min(pct, 100)\n    return [current, active]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('step scheduled exactly now is active', [[[0, 5], [60, 25]], 60], [25, 1]),\n  ('unsorted schedule is ordered by time', [[[60, 50], [0, 10], [30, 25]], 45], [25, 2]),\n  ('later entry wins a timestamp tie', [[[0, 5], [30, 50], [30, 20]], 40], [20, 2]),\n  ('hold step keeps previous percentage', [[[0, 25], [30, None]], 40], [25, 1]),\n  ('explicit rollback to zero percent', [[[0, 25], [30, 0]], 40], [0, 1]),\n  ('over-hundred percent is clamped', [[[0, 150]], 10], [100, 0]),\n  ('negative percent is clamped to zero', [[[0, 10], [5, -20]], 10], [0, 1]),\n  ('ramp schedule sample 1', [[[45, 0], [45, 5], [20, None], [45, 25], [60, -10], [45, None]], 45], [25, 5])],\n [('unsorted schedule is ordered by time', [[[60, 50], [0, 10], [30, 25]], 45], [25, 2]),\n  ('later entry wins a timestamp tie', [[[0, 5], [30, 50], [30, 20]], 40], [20, 2]),\n  ('hold step keeps previous percentage', [[[0, 25], [30, None]], 40], [25, 1]),\n  ('explicit rollback to zero percent', [[[0, 25], [30, 0]], 40], [0, 1]),\n  ('over-hundred percent is clamped', [[[0, 150]], 10], [100, 0]),\n  ('negative percent is clamped to zero', [[[0, 10], [5, -20]], 10], [0, 1]),\n  ('ramp schedule sample 28', [[[60, 120], [20, 120], [45, 100], [10, 25], [0, -10]], 0], [0, 4]),\n  ('ramp schedule sample 30', [[[20, 120], [10, 120], [0, 50], [20, None]], 20], [100, 3])],\n [('later entry wins a timestamp tie', [[[0, 5], [30, 50], [30, 20]], 40], [20, 2]),\n  ('hold step keeps previous percentage', [[[0, 25], [30, None]], 40], [25, 1]),\n  ('explicit rollback to zero percent', [[[0, 25], [30, 0]], 40], [0, 1]),\n  ('over-hundred percent is clamped', [[[0, 150]], 10], [100, 0]),\n  ('negative percent is clamped to zero', [[[0, 10], [5, -20]], 10], [0, 1]),\n  ('ramp schedule sample 11', [[[0, 5]], -5], [0, -1]),\n  ('ramp schedule sample 48', [[[0, -10], [60, None], [20, -10]], 60], [0, 1]),\n  ('ramp schedule sample 58', [[[30, 25], [30, 120], [10, 120], [30, None]], 30], [100, 3])],\n [('hold step keeps previous percentage', [[[0, 25], [30, None]], 40], [25, 1]),\n  ('explicit rollback to zero percent', [[[0, 25], [30, 0]], 40], [0, 1]),\n  ('over-hundred percent is clamped', [[[0, 150]], 10], [100, 0]),\n  ('negative percent is clamped to zero', [[[0, 10], [5, -20]], 10], [0, 1]),\n  ('before first step is zero', [[[10, 50]], 5], [0, -1]),\n  ('ramp schedule sample 8', [[[20, -10]], 30], [0, 0]),\n  ('ramp schedule sample 16', [[[60, 120]], 60], [100, 0]),\n  ('ramp schedule sample 17', [[[45, 5], [20, 120], [20, 50], [10, 100], [45, 75]], 20], [50, 2])],\n [('explicit rollback to zero percent', [[[0, 25], [30, 0]], 40], [0, 1]),\n  ('over-hundred percent is clamped', [[[0, 150]], 10], [100, 0]),\n  ('negative percent is clamped to zero', [[[0, 10], [5, -20]], 10], [0, 1]),\n  ('before first step is zero', [[[10, 50]], 5], [0, -1]),\n  ('active index refers to original position', [[[20, 30], [10, 10]], 15], [10, 1]),\n  ('ramp schedule sample 21', [[], 0], [0, -1]),\n  ('ramp schedule sample 32', [[[60, 0], [0, -10], [20, 0]], 10], [0, 1]),\n  ('ramp schedule sample 39', [[[0, 120], [30, None], [30, None], [20, -10]], 0], [100, 0])]]\nfor label, args, expected in fixtures[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":"A deterministic toy flag-evaluation model with a stipulated contract; it does not reproduce any vendor SDK byte for byte. 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-feature-flag-rollout-bucketing-scheduled-ramp-percentage-clamp","generated_at":"2026-09-29T14:48:52.624187+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Scheduled ramps move production traffic unattended, so the percentage at any instant must be exact.","root_cause":"Only the upper clamp is applied to step percentages.","sha256":"65fa835f28f7d92a0ad5c4bd166d8151e7526ebe59208329d6e032b90a8eb408","title":"Scheduled rollout ramp: Negative step percentages pass through · 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.771,"exit_code":1,"observations":[{"actual":[25,1],"check":"step scheduled exactly now is active","expected":[25,1],"passed":true},{"actual":[25,2],"check":"unsorted schedule is ordered by time","expected":[25,2],"passed":true},{"actual":[20,2],"check":"later entry wins a timestamp tie","expected":[20,2],"passed":true},{"actual":[25,1],"check":"hold step keeps previous percentage","expected":[25,1],"passed":true},{"actual":[0,1],"check":"explicit rollback to zero percent","expected":[0,1],"passed":true},{"actual":[150,0],"check":"over-hundred percent is clamped","expected":[100,0],"passed":false},{"actual":[0,1],"check":"negative percent is clamped to zero","expected":[0,1],"passed":true},{"actual":[25,5],"check":"ramp schedule sample 1","expected":[25,5],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"step scheduled exactly now is active\", \"actual\": [25, 1], \"expected\": [25, 1], \"passed\": true}, {\"check\": \"unsorted schedule is ordered by time\", \"actual\": [25, 2], \"expected\": [25, 2], \"passed\": true}, {\"check\": \"later entry wins a timestamp tie\", \"actual\": [20, 2], \"expected\": [20, 2], \"passed\": true}, {\"check\": \"hold step keeps previous percentage\", \"actual\": [25, 1], \"expected\": [25, 1], \"passed\": true}, {\"check\": \"explicit rollback to zero percent\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"over-hundred percent is clamped\", \"actual\": [150, 0], \"expected\": [100, 0], \"passed\": false}, {\"check\": \"negative percent is clamped to zero\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"ramp schedule sample 1\", \"actual\": [25, 5], \"expected\": [25, 5], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.207,"exit_code":1,"observations":[{"actual":[25,1],"check":"step scheduled exactly now is active","expected":[25,1],"passed":true},{"actual":[25,2],"check":"unsorted schedule is ordered by time","expected":[25,2],"passed":true},{"actual":[20,2],"check":"later entry wins a timestamp tie","expected":[20,2],"passed":true},{"actual":[25,1],"check":"hold step keeps previous percentage","expected":[25,1],"passed":true},{"actual":[0,1],"check":"explicit rollback to zero percent","expected":[0,1],"passed":true},{"actual":[100,0],"check":"over-hundred percent is clamped","expected":[100,0],"passed":true},{"actual":[-20,1],"check":"negative percent is clamped to zero","expected":[0,1],"passed":false},{"actual":[25,5],"check":"ramp schedule sample 1","expected":[25,5],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"step scheduled exactly now is active\", \"actual\": [25, 1], \"expected\": [25, 1], \"passed\": true}, {\"check\": \"unsorted schedule is ordered by time\", \"actual\": [25, 2], \"expected\": [25, 2], \"passed\": true}, {\"check\": \"later entry wins a timestamp tie\", \"actual\": [20, 2], \"expected\": [20, 2], \"passed\": true}, {\"check\": \"hold step keeps previous percentage\", \"actual\": [25, 1], \"expected\": [25, 1], \"passed\": true}, {\"check\": \"explicit rollback to zero percent\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"over-hundred percent is clamped\", \"actual\": [100, 0], \"expected\": [100, 0], \"passed\": true}, {\"check\": \"negative percent is clamped to zero\", \"actual\": [-20, 1], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"ramp schedule sample 1\", \"actual\": [25, 5], \"expected\": [25, 5], \"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."}}