test(approval): isolate test_blocking_approval_* from parallel-load contamination #6
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: low (depends on the agent_cache refactor in the sibling issue)
Symptom
tests/gateway/test_approve_deny_commands.py::TestBlockingApprovalE2E::test_blocking_approval_approve_once(andtest_blocking_approval_deny) pass when run alone but fail intermittently when xdist schedules them alongsidetest_concurrent_inserts_settle_at_capon the same runner.Failure shape: the agent thread's
notify_cbcallback never fires within the 2.5s wait window (assert len(notified) == 1failing with0).Root cause hypothesis
The test holds the full test run hostage to host-wide CPU pressure. When
test_concurrent_inserts_settle_at_capis creating 160 realAIAgentinstances on adjacent xdist workers, the agent thread in this test is starved enough that it doesn't reach the gateway-approval path before the main thread's polling deadline expires.If so, fixing the sibling issue (stub-agent refactor for
test_concurrent_inserts_settle_at_cap) should also fix this one, because the load source goes away.Plan
tools.approval.check_all_command_guardsto identify which branch swallows the call before notify fires.Out of scope
Deeper investigation now would be guesswork; the load hypothesis is concrete and easily falsifiable once the sibling fix lands.