{"abstract":"A task that finishes precisely at the watchdog time causes a major fault.","category":"PLC ladder logic scan cycles","checks":8,"contract":"Periodic task triggered every period ms from t=0; exec_times[k] is how long the k-th triggered execution would take. A trigger arriving while the previous execution is still running (trigger time < completion time) is an overlap: it is counted and skipped, not queued; a trigger exactly at completion starts normally. An execution longer than watchdog raises a major fault at start + watchdog and scheduling stops. Return [start_times, overlap_count, fault_time or None].","contract_signature":"period, watchdog, exec_times","evaluation_group":"w2-plc-ladder-logic-scan-cycles-periodic-task-overlap","failed_approach":"Exempting the first execution from the watchdog misses a genuine first-scan overrun.","family":"w2-plc-ladder-logic-scan-cycles-periodic-task-overlap-watchdog-compare","id":"FA-92066","implementations":{"attempt":{"sha256":"59fc6dfb935f92a2f9418661e23eb3ab4bf13758d3e06dc46b8b47e59a2d2df2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(period, watchdog, exec_times):\n    t_free = 0\n    starts = []\n    overlaps = 0\n    fault = None\n    for k, ex in enumerate(exec_times):\n        trig = k * period\n        if trig < t_free:\n            overlaps += 1\n            continue\n        starts.append(trig)\n        if ex > watchdog and k > 0:\n            fault = trig + watchdog\n            break\n        t_free = trig + ex\n    return [starts, overlaps, fault]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: exact watchdog', [20, 30, [30, 5, 5, 5]], [[0, 40, 60], 1, None]],\n  ['regression: first execution overruns', [10, 25, [30, 5]], [[0], 0, 25]],\n  ['control: mixed overlaps', [10, 50, [5, 15, 3, 10, 12, 4]], [[0, 10, 30, 40], 2, None]],\n  ['control: watchdog exceeded', [10, 12, [5, 13, 4]], [[0, 10], 0, 22]],\n  ['control: skip then drift', [10, 100, [25, 1, 1, 1, 1, 1]], [[0, 30, 40, 50], 2, None]],\n  ['regression: scenario 1', [50, 100, [100, 100, 100, 100, 50, 25]], [[0, 100, 200, 250], 2, None]],\n  ['regression: scenario 2', [20, 100, [100, 100, 60, 39, 20, 40, 54, 40]], [[0, 100, 140], 5, None]],\n  ['regression: scenario 3', [50, 40, [50, 100, 50, 100, 100, 40]], [[0], 0, 40]]],\n [['regression: scenario 1', [20, 60, [60, 20, 36, 40, 20]], [[0, 60], 3, None]],\n  ['regression: scenario 5', [25, 40, [53, 25, 25, 50, 50, 25, 25, 50]], [[0], 0, 40]],\n  ['control: mixed overlaps', [10, 50, [5, 15, 3, 10, 12, 4]], [[0, 10, 30, 40], 2, None]],\n  ['control: watchdog exceeded', [10, 12, [5, 13, 4]], [[0, 10], 0, 22]],\n  ['regression: exact watchdog', [20, 30, [30, 5, 5, 5]], [[0, 40, 60], 1, None]],\n  ['regression: first execution overruns', [10, 25, [30, 5]], [[0], 0, 25]],\n  ['control: skip then drift', [10, 100, [25, 1, 1, 1, 1, 1]], [[0, 30, 40, 50], 2, None]],\n  ['regression: scenario 2',\n   [10, 100, [10, 10, 10, 10, 10, 20, 100, 3, 20, 10, 100]],\n   [[0, 10, 20, 30, 40, 50, 70, 80, 100], 2, None]]],\n [['regression: scenario 3',\n   [20, 30, [20, 30, 6, 30, 40, 39, 61, 36, 40, 40, 30, 20]],\n   [[0, 20, 60, 100], 2, 130]],\n  ['regression: scenario 9', [50, 30, [50, 29, 42, 100, 100, 41, 5, 30, 100, 12]], [[0], 0, 30]],\n  ['control: mixed overlaps', [10, 50, [5, 15, 3, 10, 12, 4]], [[0, 10, 30, 40], 2, None]],\n  ['control: watchdog exceeded', [10, 12, [5, 13, 4]], [[0, 10], 0, 22]],\n  ['regression: exact watchdog', [20, 30, [30, 5, 5, 5]], [[0, 40, 60], 1, None]],\n  ['regression: first execution overruns', [10, 25, [30, 5]], [[0], 0, 25]],\n  ['control: skip then drift', [10, 100, [25, 1, 1, 1, 1, 1]], [[0, 30, 40, 50], 2, None]],\n  ['regression: scenario 1', [20, 100, [100, 20, 60, 100, 40, 20, 30, 12]], [[0, 100, 120], 5, None]]],\n [['regression: scenario 5', [10, 30, [30, 30, 30, 28, 10, 30]], [[0, 30], 4, None]],\n  ['regression: scenario 15', [50, 60, [100, 60, 60, 33, 50, 24, 100, 60, 60]], [[0], 0, 60]],\n  ['control: mixed overlaps', [10, 50, [5, 15, 3, 10, 12, 4]], [[0, 10, 30, 40], 2, None]],\n  ['control: watchdog exceeded', [10, 12, [5, 13, 4]], [[0, 10], 0, 22]],\n  ['regression: exact watchdog', [20, 30, [30, 5, 5, 5]], [[0, 40, 60], 1, None]],\n  ['regression: first execution overruns', [10, 25, [30, 5]], [[0], 0, 25]],\n  ['control: skip then drift', [10, 100, [25, 1, 1, 1, 1, 1]], [[0, 30, 40, 50], 2, None]],\n  ['control: scenario 1', [20, 30, [21, 20, 20, 20, 40, 30, 20, 30, 40, 30, 40]], [[0, 40, 60, 80], 1, 110]]],\n [['regression: scenario 10',\n   [10, 40, [40, 40, 40, 20, 10, 40, 14, 21, 20, 40, 41, 10]],\n   [[0, 40, 50, 90], 8, None]],\n  ['regression: scenario 7', [50, 40, [44, 9, 44, 100, 40, 68, 54, 100, 5, 40, 50]], [[0], 0, 40]],\n  ['control: mixed overlaps', [10, 50, [5, 15, 3, 10, 12, 4]], [[0, 10, 30, 40], 2, None]],\n  ['control: watchdog exceeded', [10, 12, [5, 13, 4]], [[0, 10], 0, 22]],\n  ['regression: exact watchdog', [20, 30, [30, 5, 5, 5]], [[0, 40, 60], 1, None]],\n  ['regression: first execution overruns', [10, 25, [30, 5]], [[0], 0, 25]],\n  ['control: skip then drift', [10, 100, [25, 1, 1, 1, 1, 1]], [[0, 30, 40, 50], 2, None]],\n  ['regression: scenario 1', [25, 60, [70, 25, 60, 35, 25, 15, 60, 60, 25, 50, 25, 4]], [[0], 0, 60]]]]\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":"d18b5ee00ab19d0a089c51d0559d3b5742f2b89680a7e5d74d4e682f2bed16ca","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(period, watchdog, exec_times):\n    t_free = 0\n    starts = []\n    overlaps = 0\n    fault = None\n    for k, ex in enumerate(exec_times):\n        trig = k * period\n        if trig < t_free:\n            overlaps += 1\n            continue\n        starts.append(trig)\n        if ex >= watchdog:\n            fault = trig + watchdog\n            break\n        t_free = trig + ex\n    return [starts, overlaps, fault]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: exact watchdog', [20, 30, [30, 5, 5, 5]], [[0, 40, 60], 1, None]],\n  ['regression: first execution overruns', [10, 25, [30, 5]], [[0], 0, 25]],\n  ['control: mixed overlaps', [10, 50, [5, 15, 3, 10, 12, 4]], [[0, 10, 30, 40], 2, None]],\n  ['control: watchdog exceeded', [10, 12, [5, 13, 4]], [[0, 10], 0, 22]],\n  ['control: skip then drift', [10, 100, [25, 1, 1, 1, 1, 1]], [[0, 30, 40, 50], 2, None]],\n  ['regression: scenario 1', [50, 100, [100, 100, 100, 100, 50, 25]], [[0, 100, 200, 250], 2, None]],\n  ['regression: scenario 2', [20, 100, [100, 100, 60, 39, 20, 40, 54, 40]], [[0, 100, 140], 5, None]],\n  ['regression: scenario 3', [50, 40, [50, 100, 50, 100, 100, 40]], [[0], 0, 40]]],\n [['regression: scenario 1', [20, 60, [60, 20, 36, 40, 20]], [[0, 60], 3, None]],\n  ['regression: scenario 5', [25, 40, [53, 25, 25, 50, 50, 25, 25, 50]], [[0], 0, 40]],\n  ['control: mixed overlaps', [10, 50, [5, 15, 3, 10, 12, 4]], [[0, 10, 30, 40], 2, None]],\n  ['control: watchdog exceeded', [10, 12, [5, 13, 4]], [[0, 10], 0, 22]],\n  ['regression: exact watchdog', [20, 30, [30, 5, 5, 5]], [[0, 40, 60], 1, None]],\n  ['regression: first execution overruns', [10, 25, [30, 5]], [[0], 0, 25]],\n  ['control: skip then drift', [10, 100, [25, 1, 1, 1, 1, 1]], [[0, 30, 40, 50], 2, None]],\n  ['regression: scenario 2',\n   [10, 100, [10, 10, 10, 10, 10, 20, 100, 3, 20, 10, 100]],\n   [[0, 10, 20, 30, 40, 50, 70, 80, 100], 2, None]]],\n [['regression: scenario 3',\n   [20, 30, [20, 30, 6, 30, 40, 39, 61, 36, 40, 40, 30, 20]],\n   [[0, 20, 60, 100], 2, 130]],\n  ['regression: scenario 9', [50, 30, [50, 29, 42, 100, 100, 41, 5, 30, 100, 12]], [[0], 0, 30]],\n  ['control: mixed overlaps', [10, 50, [5, 15, 3, 10, 12, 4]], [[0, 10, 30, 40], 2, None]],\n  ['control: watchdog exceeded', [10, 12, [5, 13, 4]], [[0, 10], 0, 22]],\n  ['regression: exact watchdog', [20, 30, [30, 5, 5, 5]], [[0, 40, 60], 1, None]],\n  ['regression: first execution overruns', [10, 25, [30, 5]], [[0], 0, 25]],\n  ['control: skip then drift', [10, 100, [25, 1, 1, 1, 1, 1]], [[0, 30, 40, 50], 2, None]],\n  ['regression: scenario 1', [20, 100, [100, 20, 60, 100, 40, 20, 30, 12]], [[0, 100, 120], 5, None]]],\n [['regression: scenario 5', [10, 30, [30, 30, 30, 28, 10, 30]], [[0, 30], 4, None]],\n  ['regression: scenario 15', [50, 60, [100, 60, 60, 33, 50, 24, 100, 60, 60]], [[0], 0, 60]],\n  ['control: mixed overlaps', [10, 50, [5, 15, 3, 10, 12, 4]], [[0, 10, 30, 40], 2, None]],\n  ['control: watchdog exceeded', [10, 12, [5, 13, 4]], [[0, 10], 0, 22]],\n  ['regression: exact watchdog', [20, 30, [30, 5, 5, 5]], [[0, 40, 60], 1, None]],\n  ['regression: first execution overruns', [10, 25, [30, 5]], [[0], 0, 25]],\n  ['control: skip then drift', [10, 100, [25, 1, 1, 1, 1, 1]], [[0, 30, 40, 50], 2, None]],\n  ['control: scenario 1', [20, 30, [21, 20, 20, 20, 40, 30, 20, 30, 40, 30, 40]], [[0, 40, 60, 80], 1, 110]]],\n [['regression: scenario 10',\n   [10, 40, [40, 40, 40, 20, 10, 40, 14, 21, 20, 40, 41, 10]],\n   [[0, 40, 50, 90], 8, None]],\n  ['regression: scenario 7', [50, 40, [44, 9, 44, 100, 40, 68, 54, 100, 5, 40, 50]], [[0], 0, 40]],\n  ['control: mixed overlaps', [10, 50, [5, 15, 3, 10, 12, 4]], [[0, 10, 30, 40], 2, None]],\n  ['control: watchdog exceeded', [10, 12, [5, 13, 4]], [[0, 10], 0, 22]],\n  ['regression: exact watchdog', [20, 30, [30, 5, 5, 5]], [[0, 40, 60], 1, None]],\n  ['regression: first execution overruns', [10, 25, [30, 5]], [[0], 0, 25]],\n  ['control: skip then drift', [10, 100, [25, 1, 1, 1, 1, 1]], [[0, 30, 40, 50], 2, None]],\n  ['regression: scenario 1', [25, 60, [70, 25, 60, 35, 25, 15, 60, 60, 25, 50, 25, 4]], [[0], 0, 60]]]]\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 bounded teaching model of one PLC instruction or rung pattern evaluated scan by scan. The stated contract is a stipulated toy convention, not a claim of conformance to any vendor controller or IEC 61131-3 runtime. 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-plc-ladder-logic-scan-cycles-periodic-task-overlap-watchdog-compare","generated_at":"2026-09-29T14:51:42.313706+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Ladder programs are executed as repeated scans; each defect here changes what a rung, timer, counter or data-table instruction reports on a particular scan, which is how commissioning and field faults are actually observed.","root_cause":"The watchdog test uses >= instead of >.","sha256":"6b30c38621213c0b42978b885df835d239a72eea1736e0ed450ecb3b877d7ee9","title":"Task watchdog faults on an execution exactly equal to its limit · 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":44.341,"exit_code":1,"observations":[{"actual":[[0,40,60],1,null],"check":"regression: exact watchdog","expected":[[0,40,60],1,null],"passed":true},{"actual":[[0],1,null],"check":"regression: first execution overruns","expected":[[0],0,25],"passed":false},{"actual":[[0,10,30,40],2,null],"check":"control: mixed overlaps","expected":[[0,10,30,40],2,null],"passed":true},{"actual":[[0,10],0,22],"check":"control: watchdog exceeded","expected":[[0,10],0,22],"passed":true},{"actual":[[0,30,40,50],2,null],"check":"control: skip then drift","expected":[[0,30,40,50],2,null],"passed":true},{"actual":[[0,100,200,250],2,null],"check":"regression: scenario 1","expected":[[0,100,200,250],2,null],"passed":true},{"actual":[[0,100,140],5,null],"check":"regression: scenario 2","expected":[[0,100,140],5,null],"passed":true},{"actual":[[0,50],0,90],"check":"regression: scenario 3","expected":[[0],0,40],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: exact watchdog\", \"actual\": [[0, 40, 60], 1, null], \"expected\": [[0, 40, 60], 1, null], \"passed\": true}, {\"check\": \"regression: first execution overruns\", \"actual\": [[0], 1, null], \"expected\": [[0], 0, 25], \"passed\": false}, {\"check\": \"control: mixed overlaps\", \"actual\": [[0, 10, 30, 40], 2, null], \"expected\": [[0, 10, 30, 40], 2, null], \"passed\": true}, {\"check\": \"control: watchdog exceeded\", \"actual\": [[0, 10], 0, 22], \"expected\": [[0, 10], 0, 22], \"passed\": true}, {\"check\": \"control: skip then drift\", \"actual\": [[0, 30, 40, 50], 2, null], \"expected\": [[0, 30, 40, 50], 2, null], \"passed\": true}, {\"check\": \"regression: scenario 1\", \"actual\": [[0, 100, 200, 250], 2, null], \"expected\": [[0, 100, 200, 250], 2, null], \"passed\": true}, {\"check\": \"regression: scenario 2\", \"actual\": [[0, 100, 140], 5, null], \"expected\": [[0, 100, 140], 5, null], \"passed\": true}, {\"check\": \"regression: scenario 3\", \"actual\": [[0, 50], 0, 90], \"expected\": [[0], 0, 40], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.609,"exit_code":1,"observations":[{"actual":[[0],0,30],"check":"regression: exact watchdog","expected":[[0,40,60],1,null],"passed":false},{"actual":[[0],0,25],"check":"regression: first execution overruns","expected":[[0],0,25],"passed":true},{"actual":[[0,10,30,40],2,null],"check":"control: mixed overlaps","expected":[[0,10,30,40],2,null],"passed":true},{"actual":[[0,10],0,22],"check":"control: watchdog exceeded","expected":[[0,10],0,22],"passed":true},{"actual":[[0,30,40,50],2,null],"check":"control: skip then drift","expected":[[0,30,40,50],2,null],"passed":true},{"actual":[[0],0,100],"check":"regression: scenario 1","expected":[[0,100,200,250],2,null],"passed":false},{"actual":[[0],0,100],"check":"regression: scenario 2","expected":[[0,100,140],5,null],"passed":false},{"actual":[[0],0,40],"check":"regression: scenario 3","expected":[[0],0,40],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: exact watchdog\", \"actual\": [[0], 0, 30], \"expected\": [[0, 40, 60], 1, null], \"passed\": false}, {\"check\": \"regression: first execution overruns\", \"actual\": [[0], 0, 25], \"expected\": [[0], 0, 25], \"passed\": true}, {\"check\": \"control: mixed overlaps\", \"actual\": [[0, 10, 30, 40], 2, null], \"expected\": [[0, 10, 30, 40], 2, null], \"passed\": true}, {\"check\": \"control: watchdog exceeded\", \"actual\": [[0, 10], 0, 22], \"expected\": [[0, 10], 0, 22], \"passed\": true}, {\"check\": \"control: skip then drift\", \"actual\": [[0, 30, 40, 50], 2, null], \"expected\": [[0, 30, 40, 50], 2, null], \"passed\": true}, {\"check\": \"regression: scenario 1\", \"actual\": [[0], 0, 100], \"expected\": [[0, 100, 200, 250], 2, null], \"passed\": false}, {\"check\": \"regression: scenario 2\", \"actual\": [[0], 0, 100], \"expected\": [[0, 100, 140], 5, null], \"passed\": false}, {\"check\": \"regression: scenario 3\", \"actual\": [[0], 0, 40], \"expected\": [[0], 0, 40], \"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."}}