Tighten request handling in Guardian approval tests (#46041)

## What changed

- Wait for a request tagged with `x-openai-subagent: guardian` before triggering cancellation, disconnection, or timeout in network approval tests.
- Read the last yielded parent request in the tool cancellation test, with an explicit error if no request was captured.
- Disable WebSockets in the issuing-step permissions test to use its HTTP mock server.

GitOrigin-RevId: 35c021e3931ff4a66ca3970f8e39e1d20257be88
This commit is contained in:
jgershen-oai
2026-09-16 22:25:29 +00:00
committed by copyberry
parent 515530d9b2
commit 78e7825a47
3 changed files with 21 additions and 4 deletions
@@ -332,6 +332,7 @@ async fn request_permissions_uses_issuing_step_policy_and_reviewer() {
config.permissions.approval_policy = Constrained::allow_any(AskForApproval::Never);
config.approvals_reviewer = ApprovalsReviewer::User;
config.model_provider.base_url = Some(format!("{}/v1", server.uri()));
config.model_provider.supports_websockets = false;
config
.features
.enable(Feature::GuardianApproval)