From 8672302cb8485f9075fb5a3af6f1c6c778d66735 Mon Sep 17 00:00:00 2001 From: Duncan Date: Tue, 25 Aug 2026 13:32:20 -0400 Subject: [PATCH] test(desktop): keep pending policy true in failed-deploy setup failed_deploy_preserves_pending_policy stamped applied_permission_policy via a setup deploy whose owner-only payload matched the record's default respond_to, clearing provider_policy_pending before the failure it meant to test. Make the setup deploy stale (respond_to=anyone) so pending stays true, mirroring successful_stale_deploy_preserves_newer_pending_policy. Co-authored-by: Will Pfleger Signed-off-by: Will Pfleger --- desktop/src-tauri/src/commands/agents/provider_deploy.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop/src-tauri/src/commands/agents/provider_deploy.rs b/desktop/src-tauri/src/commands/agents/provider_deploy.rs index b617827bf6..d462fa5424 100644 --- a/desktop/src-tauri/src/commands/agents/provider_deploy.rs +++ b/desktop/src-tauri/src/commands/agents/provider_deploy.rs @@ -364,6 +364,10 @@ mod tests { #[test] fn failed_deploy_preserves_pending_policy() { let mut record = record(); + // Stamp a confirmed `applied_permission_policy` via a stale (mismatched) + // deploy so `provider_policy_pending` stays true going into the failure: + // the payload's `owner-only` audience differs from this record's `anyone`. + record.respond_to = crate::managed_agents::RespondTo::Anyone; apply_deploy_result( &mut record,