From 9b0c2d5b53dd96c147742b8d8d40440e8135b48a Mon Sep 17 00:00:00 2001 From: goodboy Date: Fri, 24 Apr 2026 22:48:35 -0400 Subject: [PATCH] Tighten orphan-SIGINT xfail to `strict=True` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-classify `test_orphaned_subactor_sigint_cleanup_DRAFT` from flakey-env-sensitive (`strict=False` w/ "passes in isolation, flakey in full suite") to a hard known-gap (`strict=True`) with the orphan-SIGINT hang as the documented cause. The previous framing ("env pollution") let the test silently pass when ordering happened to favor it; the new framing forces an XPASS-as-FAIL the moment the underlying gap is actually closed, so we can drop the mark intentionally instead of accidentally. Reason text + leading `# Known-gap test —` comment both point at `ai/conc-anal/subint_forkserver_orphan_sigint_hang_issue.md` for the full diagnosis. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code (cherry picked from commit 44bdb1697c8f182737a10853e6a23cb7085f637c) --- tests/spawn/test_subint_forkserver.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/spawn/test_subint_forkserver.py b/tests/spawn/test_subint_forkserver.py index 34362901..bde3c3f0 100644 --- a/tests/spawn/test_subint_forkserver.py +++ b/tests/spawn/test_subint_forkserver.py @@ -446,21 +446,19 @@ def _process_alive(pid: int) -> bool: return False -# Regressed back to xfail: previously passed after the -# fork-child FD-hygiene fix in `_close_inherited_fds()`, -# but the recent `wait_for_no_more_peers(move_on_after=3.0)` -# bound in `async_main`'s teardown added up to 3s to the -# orphan subactor's exit timeline, pushing it past the -# test's 10s poll window. Real fix requires making the -# bounded wait faster when the actor is orphaned, or -# increasing the test's poll window. See tracker doc +# Known-gap test — `subint_forkserver` orphan-SIGINT +# handling. See # `ai/conc-anal/subint_forkserver_orphan_sigint_hang_issue.md`. +# `strict=True` so if a future fix closes the gap the +# XPASS surfaces as a FAIL and forces us to drop the +# mark intentionally. @pytest.mark.xfail( strict=True, reason=( - 'Regressed to xfail after `wait_for_no_more_peers` ' - 'bound added ~3s teardown latency. Needs either ' - 'faster orphan-side teardown or 15s test poll window.' + 'Orphan subactor SIGINT delivery: trio event loop ' + 'on non-main thread post-fork doesn\'t see the ' + 'external SIGINT → KBI path. See tracker doc.\n' + 'ai/conc-anal/subint_forkserver_orphan_sigint_hang_issue.md' ), ) @pytest.mark.timeout(