{"abstract":"A defeated flag carrier scores on entering home.","category":"Game simulation rules","checks":7,"contract":"HP positive, damage nonnegative; carrying, at_home, own_flag_home bool. Return [remaining HP, enemy flag state carried/dropped/captured/absent, score 0/1]. Death takes priority over capture.","contract_signature":"hp, damage, carrying, at_home, own_flag_home","evaluation_group":"model-74b01b2239c585be","failed_approach":"Requiring survival alone ignores the own-flag-at-home capture condition.","family":"z-games-flag-death-before-capture","id":"FA-11686","implementations":{"attempt":{"sha256":"4c8cbc3d8147e5c297fe92153ec321ca3bcdb38467efbf5de6a3c3996490c377","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(hp, damage, carrying, at_home, own_flag_home):\n    left=max(0,hp-damage)\n    if not carrying:return [left,'absent',0]\n    if left==0:return [left,'dropped',0]\n    return [left,'captured',1] if at_home else [left,'carried',0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('lethal home arrival',solve(N,N,True,True,True),[0,'dropped',0])\ncheck('own flag missing',solve(N+1,0,True,True,False),[N+1,'carried',0])\ncheck('legal capture',solve(N+2,1,True,True,True),[N+1,'captured',1])\ncheck('outside home',solve(N+1,0,True,False,True),[N+1,'carried',0])\ncheck('no carried flag',solve(N,0,False,True,True),[N,'absent',0])\ncheck('overkill drops',solve(N,N+5,True,False,False),[0,'dropped',0])\ncheck('empty carrier defeated',solve(N,N,False,True,True),[0,'absent',0])\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":"63e5faaf82ba8049bb68c125dacc6453ee86a5f66a343d66361b47879449f26c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(hp, damage, carrying, at_home, own_flag_home):\n    left=max(0,hp-damage)\n    if not carrying:return [left,'absent',0]\n    if at_home and own_flag_home:return [left,'captured',1]\n    return [left,'dropped' if left==0 else 'carried',0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('lethal home arrival',solve(N,N,True,True,True),[0,'dropped',0])\ncheck('own flag missing',solve(N+1,0,True,True,False),[N+1,'carried',0])\ncheck('legal capture',solve(N+2,1,True,True,True),[N+1,'captured',1])\ncheck('outside home',solve(N+1,0,True,False,True),[N+1,'carried',0])\ncheck('no carried flag',solve(N,0,False,True,True),[N,'absent',0])\ncheck('overkill drops',solve(N,N+5,True,False,False),[0,'dropped',0])\ncheck('empty carrier defeated',solve(N,N,False,True,True),[0,'absent',0])\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":"Controlled rules-only simulation; not a complete 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":"z-games-flag-death-before-capture","generated_at":"2026-09-29T14:38:50.111340+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic game-rule model isolates this rule interaction for regression testing.","root_cause":"Home arrival is scored before lethal damage and flag drop.","sha256":"e0e54d7d21089332b65285934471bf640c7231e2f5ff18a80a7cb79298f22220","title":"A defeated flag carrier scores on entering home · 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":37.155,"exit_code":1,"observations":[{"actual":[0,"dropped",0],"check":"lethal home arrival","expected":[0,"dropped",0],"passed":true},{"actual":[2,"captured",1],"check":"own flag missing","expected":[2,"carried",0],"passed":false},{"actual":[2,"captured",1],"check":"legal capture","expected":[2,"captured",1],"passed":true},{"actual":[2,"carried",0],"check":"outside home","expected":[2,"carried",0],"passed":true},{"actual":[1,"absent",0],"check":"no carried flag","expected":[1,"absent",0],"passed":true},{"actual":[0,"dropped",0],"check":"overkill drops","expected":[0,"dropped",0],"passed":true},{"actual":[0,"absent",0],"check":"empty carrier defeated","expected":[0,"absent",0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"lethal home arrival\", \"actual\": [0, \"dropped\", 0], \"expected\": [0, \"dropped\", 0], \"passed\": true}, {\"check\": \"own flag missing\", \"actual\": [2, \"captured\", 1], \"expected\": [2, \"carried\", 0], \"passed\": false}, {\"check\": \"legal capture\", \"actual\": [2, \"captured\", 1], \"expected\": [2, \"captured\", 1], \"passed\": true}, {\"check\": \"outside home\", \"actual\": [2, \"carried\", 0], \"expected\": [2, \"carried\", 0], \"passed\": true}, {\"check\": \"no carried flag\", \"actual\": [1, \"absent\", 0], \"expected\": [1, \"absent\", 0], \"passed\": true}, {\"check\": \"overkill drops\", \"actual\": [0, \"dropped\", 0], \"expected\": [0, \"dropped\", 0], \"passed\": true}, {\"check\": \"empty carrier defeated\", \"actual\": [0, \"absent\", 0], \"expected\": [0, \"absent\", 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.841,"exit_code":1,"observations":[{"actual":[0,"captured",1],"check":"lethal home arrival","expected":[0,"dropped",0],"passed":false},{"actual":[2,"carried",0],"check":"own flag missing","expected":[2,"carried",0],"passed":true},{"actual":[2,"captured",1],"check":"legal capture","expected":[2,"captured",1],"passed":true},{"actual":[2,"carried",0],"check":"outside home","expected":[2,"carried",0],"passed":true},{"actual":[1,"absent",0],"check":"no carried flag","expected":[1,"absent",0],"passed":true},{"actual":[0,"dropped",0],"check":"overkill drops","expected":[0,"dropped",0],"passed":true},{"actual":[0,"absent",0],"check":"empty carrier defeated","expected":[0,"absent",0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"lethal home arrival\", \"actual\": [0, \"captured\", 1], \"expected\": [0, \"dropped\", 0], \"passed\": false}, {\"check\": \"own flag missing\", \"actual\": [2, \"carried\", 0], \"expected\": [2, \"carried\", 0], \"passed\": true}, {\"check\": \"legal capture\", \"actual\": [2, \"captured\", 1], \"expected\": [2, \"captured\", 1], \"passed\": true}, {\"check\": \"outside home\", \"actual\": [2, \"carried\", 0], \"expected\": [2, \"carried\", 0], \"passed\": true}, {\"check\": \"no carried flag\", \"actual\": [1, \"absent\", 0], \"expected\": [1, \"absent\", 0], \"passed\": true}, {\"check\": \"overkill drops\", \"actual\": [0, \"dropped\", 0], \"expected\": [0, \"dropped\", 0], \"passed\": true}, {\"check\": \"empty carrier defeated\", \"actual\": [0, \"absent\", 0], \"expected\": [0, \"absent\", 0], \"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."}}