Files
felhom.eu/documentation/audits/readback-2026-10-07/F/red-rm-finally.txt
T

34 lines
1.7 KiB
Plaintext

R-528 red-proof red-rm-finally: the removal is no longer in a finally (skipped when the check raised)
mutation: replace
---
finally:
try:
mrc---
with
---
if res["result"] != "error":
try:
mrc---
$ OSAPPLY_UNDER_TEST=/tmp/claude-1000/-mnt-5-hdd-felhom-eu-git/da0e2df0-3072-4d3e-bf10-c475ac1e5ae4/scratchpad/r528-mut/red-rm-finally-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_container_removed_even_when_inspect_raises
rc=1
E
======================================================================
ERROR: test_container_removed_even_when_inspect_raises (__main__.OOMCheck.test_container_removed_even_when_inspect_raises)
----------------------------------------------------------------------
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 1281, in test_container_removed_even_when_inspect_raises
self.assertEqual(len(f.oom_removed), 1, "the container must be removed even when inspect raised")
^^^^^^^^^^^^^
AttributeError: 'Fake' object has no attribute 'oom_removed'
----------------------------------------------------------------------
Ran 1 test in 0.017s
FAILED (errors=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_container_removed_even_when_inspect_raises
rc=0
OK
VERDICT: RED as expected, GREEN on the real wrapper