tests: make real subagent interrupt test hermetic#13493
Open
shimotmr wants to merge 1 commit intoNousResearch:mainfrom
Open
tests: make real subagent interrupt test hermetic#13493shimotmr wants to merge 1 commit intoNousResearch:mainfrom
shimotmr wants to merge 1 commit intoNousResearch:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_real_interrupt_subagenthermetic against leaked terminal backend envrun_conversation()startsRoot cause
This test is intended to verify delegate interrupt propagation, but in suite runs it could be influenced by:
TERMINAL_ENV/TERMINAL_MODAL_MODE_build_system_prompt_check_compression_model_feasibility()and its auxiliary/provider preflight pathThat allowed the child to get stuck during construction / pre-conversation setup instead of exercising the interrupt path the test claims to cover.
Changes
TERMINAL_ENV=localinsetUp()and restore env intearDown()_build_system_prompt_check_compression_model_feasibility()so the test stays focused on interrupt propagation rather than auxiliary compression/provider preflight behaviorVerification
pytest -n0 tests/tools/test_terminal_requirements.py::test_modal_backend_direct_mode_does_not_fall_back_to_managed tests/run_agent/test_real_interrupt_subagent.py::TestRealSubagentInterrupt::test_interrupt_child_during_api_call -vv -spytest tests/run_agent/test_real_interrupt_subagent.py::TestRealSubagentInterrupt::test_interrupt_child_during_api_call -vv -s./scripts/run_tests.sh tests/run_agent/test_real_interrupt_subagent.py tests/tools/test_terminal_requirements.py --maxfail=1 -qNotes
This fixes the test/harness hermeticity issue. There may still be a production-level follow-up worth discussing around whether
AIAgent.__init__should do auxiliary compression feasibility checks eagerly for child agents.