From a64ad5959339ed480bdab023b35c0ff88a9e06ba Mon Sep 17 00:00:00 2001 From: William Dunn Date: Wed, 11 Nov 2026 23:44:44 -0500 Subject: [PATCH] craft-esign make the outstanding-send regression test actually outstanding The send helper submitted the create immediately, consuming the captured context before the status request ran. The test now queues and takes document A's send without submitting it, leaving the context pending. That pending context is the scenario the guard exists for. --- crates/ui/src/esign/coderabbit_round2_repro.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/ui/src/esign/coderabbit_round2_repro.rs b/crates/ui/src/esign/coderabbit_round2_repro.rs index 8eae9a84b..190ca1fa9 100644 --- a/crates/ui/src/esign/coderabbit_round2_repro.rs +++ b/crates/ui/src/esign/coderabbit_round2_repro.rs @@ -81,9 +81,13 @@ fn status_for_the_current_document_is_not_consumed_by_an_outstanding_send_from_a let (mut dialog, hold) = ready(); // Document A's send is taken by the app but never submitted: its captured - // context stays pending. + // context stays pending. The `send` helper would submit the create and + // consume that context, which is exactly what this test must avoid. dialog.open("doc-A".into(), "A.pdf".into(), None, who("alice")); - send(&mut dialog, b"A bytes"); + dialog.add_email("bob@example.com".into()); + dialog.queue_send(); + let taken = dialog.take_send_request(); + assert!(taken.is_some(), "A's send request was taken, leaving its context pending"); // The dialog moves on to document B, which already has an envelope the // host wants a status for.