{"abstract":"A healthy workflow is halted because one state field changed.","category":"Agent workflow termination","checks":8,"contract":"Return true iff current key occurs at least twice in the observed key sequence.","contract_signature":"seen, current","evaluation_group":"w3-agent-workflow-termination-loop-cycle-detection","failed_approach":"Treating a sufficiently long history as a cycle still halts on novel state keys.","family":"w3-agent-workflow-termination-loop-cycle-detection","id":"FA-99891","implementations":{"attempt":{"sha256":"76ea6fa4be1ab147cb90d875c30518cf9f8398bae17c0fd3ba0918c05234fde4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(seen, current):\n    return current in seen or len(seen) > 1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('same state repeats', solve(['a','b'],'b'),True)\ncheck('new state', solve(['a','b'],'c'),False)\ncheck('empty history', solve([],'a'),False)\ncheck('novel after one prior state', solve(['a'],'b'),False)\ncheck('singleton match', solve(['x'],'x'),True)\ncheck('different key', solve(['x'],'y'),False)\ncheck('later repeated key', solve(['a','c','a'],'a'),True)\ncheck('empty string key', solve([''],'x'),False)\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":"49446e8de1b172cb00371f7f12e21b599c967918cefdcde579d7970cfa37f177","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(seen, current):\n    return bool(seen)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('same state repeats', solve(['a','b'],'b'),True)\ncheck('new state', solve(['a','b'],'c'),False)\ncheck('empty history', solve([],'a'),False)\ncheck('novel after one prior state', solve(['a'],'b'),False)\ncheck('singleton match', solve(['x'],'x'),True)\ncheck('different key', solve(['x'],'y'),False)\ncheck('later repeated key', solve(['a','c','a'],'a'),True)\ncheck('empty string key', solve([''],'x'),False)\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":"Keys are canonical immutable strings; canonicalization itself is outside scope. 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":"w3-agent-workflow-termination-loop-cycle-detection","generated_at":"2026-09-30T16:48:29.419755+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This toy decision rule isolates one bounded agent-loop completion contract.","root_cause":"The detector treats any nonempty history as a repeated state, without comparing keys.","sha256":"d774a86540698880001d0839cacbc8ed02cc70ac67c6b487f570aea07da18287","title":"Workflow: a changed state is mistaken for a repeated loop state · case 01","variant":1,"variant_policy":"The same explicitly authored fixtures repeat across all five numbered records; runtime N is unused. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":30.338,"exit_code":1,"observations":[{"actual":true,"check":"same state repeats","expected":true,"passed":true},{"actual":true,"check":"new state","expected":false,"passed":false},{"actual":false,"check":"empty history","expected":false,"passed":true},{"actual":false,"check":"novel after one prior state","expected":false,"passed":true},{"actual":true,"check":"singleton match","expected":true,"passed":true},{"actual":false,"check":"different key","expected":false,"passed":true},{"actual":true,"check":"later repeated key","expected":true,"passed":true},{"actual":false,"check":"empty string key","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same state repeats\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"new state\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"empty history\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"novel after one prior state\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"singleton match\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"different key\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"later repeated key\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"empty string key\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.803,"exit_code":1,"observations":[{"actual":true,"check":"same state repeats","expected":true,"passed":true},{"actual":true,"check":"new state","expected":false,"passed":false},{"actual":false,"check":"empty history","expected":false,"passed":true},{"actual":true,"check":"novel after one prior state","expected":false,"passed":false},{"actual":true,"check":"singleton match","expected":true,"passed":true},{"actual":true,"check":"different key","expected":false,"passed":false},{"actual":true,"check":"later repeated key","expected":true,"passed":true},{"actual":true,"check":"empty string key","expected":false,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same state repeats\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"new state\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"empty history\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"novel after one prior state\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"singleton match\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"different key\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"later repeated key\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"empty string key\", \"actual\": true, \"expected\": false, \"passed\": false}], \"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."}}