R-528 red-proof red-health-mode: the check also runs in docker health mode
mutation: replace
---
            self.report["health"] = self.health()
            return 0
---
with
---
            self.report["health"] = self.health()
            self.report["oom_check"] = self.oom_check()
            return 0
---
$ OSAPPLY_UNDER_TEST=/tmp/claude-1000/-mnt-5-hdd-felhom-eu-git/da0e2df0-3072-4d3e-bf10-c475ac1e5ae4/scratchpad/r528-mut/red-health-mode-felhom-os-apply python3 -W ignore /tmp/claude-1000/-mnt-5-hdd-felhom-eu-git/da0e2df0-3072-4d3e-bf10-c475ac1e5ae4/scratchpad/agent-r528/configs/test_felhom_os_apply.py OOMCheck.test_never_on_guest_or_host_or_in_health_mode
rc=1
F
======================================================================
FAIL: test_never_on_guest_or_host_or_in_health_mode (__main__.OOMCheck.test_never_on_guest_or_host_or_in_health_mode)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/claude-1000/-mnt-5-hdd-felhom-eu-git/da0e2df0-3072-4d3e-bf10-c475ac1e5ae4/scratchpad/agent-r528/configs/test_felhom_os_apply.py", line 1301, in test_never_on_guest_or_host_or_in_health_mode
    self.assertNotIn("oom_check", r)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
AssertionError: 'oom_check' unexpectedly found in {'health': {'containers': {'app': {'health': 'healthy', 'id': 'bbb222', 'state': 'running'}, 'felhom-controller': {'health': 'healthy', 'id': 'aaa111', 'state': 'running'}}, 'controller': 'healthy', 'controller_docker_ok': True, 'docker_ok': True, 'network_ok': True}, 'layer': 'docker', 'mode': 'health', 'oom_check': {'detail': 'the engine reported the memory kill: OOMKilled=true and the oom event', 'exit_code': 137, 'image': 'gitea.dooplex.hu/admin/felhom-controller:0.300.0', 'oom_event': True, 'oom_killed': True, 'result': 'pass'}, 'pass_seconds': 0.0, 'refused': None, 'release_id': 'os-docker-t1', 'vmid': 9201}

----------------------------------------------------------------------
Ran 1 test in 0.016s

FAILED (failures=1)

=== control: the same test against the real wrapper ===
$ python3 -W ignore /tmp/claude-1000/-mnt-5-hdd-felhom-eu-git/da0e2df0-3072-4d3e-bf10-c475ac1e5ae4/scratchpad/agent-r528/configs/test_felhom_os_apply.py OOMCheck.test_never_on_guest_or_host_or_in_health_mode
rc=0
OK
VERDICT: RED as expected, GREEN on the real wrapper
