Vendored IMAP test expects provider bytes removed by the privacy patch #625

Open
opened 2026-10-01 10:35:37 +00:00 by kayg · 4 comments
Owner

The standalone vendored client gate fails in client::tests::test_parsing_error.

Command: cargo test -p async-imap

Verbatim output:

assertion failed: session.noop().await.unwrap_err().to_string().contains("220 mail.example.org ESMTP Postcow")
test result: FAILED. 69 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s

The test in crates/plugins/mail/vendor/async-imap/src/client.rs:2718 expects raw provider response bytes. The existing privacy patch in src/imap_stream.rs returns fixed text (malformed IMAP response). Neither file changed in #613, and their contents match base 5882b4340. The failure exercises NOOP, not the FETCH parser changed by #613.

Keep provider data out of errors. Review and approve a separate update to the upstream test expectation. The #613 job preserves the expectation under the owner rule. Mail crate tests and the real TLS 2,000-message provider test pass. Vendor clippy also passes.

The standalone vendored client gate fails in `client::tests::test_parsing_error`. Command: `cargo test -p async-imap` Verbatim output: ``` assertion failed: session.noop().await.unwrap_err().to_string().contains("220 mail.example.org ESMTP Postcow") test result: FAILED. 69 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s ``` The test in `crates/plugins/mail/vendor/async-imap/src/client.rs:2718` expects raw provider response bytes. The existing privacy patch in `src/imap_stream.rs` returns fixed text (`malformed IMAP response`). Neither file changed in #613, and their contents match base 5882b4340. The failure exercises NOOP, not the FETCH parser changed by #613. Keep provider data out of errors. Review and approve a separate update to the upstream test expectation. The #613 job preserves the expectation under the owner rule. Mail crate tests and the real TLS 2,000-message provider test pass. Vendor clippy also passes.
Author
Owner

Starting work on branch job/imaptest-625 from base 687ff70313. I will update the vendored test to assert the fixed privacy-safe error text and the absence of provider bytes.

Starting work on branch job/imaptest-625 from base 687ff703136e71e89f8dfba139e93cd0788b25c1. I will update the vendored test to assert the fixed privacy-safe error text and the absence of provider bytes.
Author
Owner

The first post-merge test run confirms the IMAP error wrapper renders the privacy-safe message as (the initial bare-string equality failed at client.rs:2728). I am updating the expected rendered error while retaining the explicit provider-byte exclusion assertion.

The first post-merge test run confirms the IMAP error wrapper renders the privacy-safe message as (the initial bare-string equality failed at client.rs:2728). I am updating the expected rendered error while retaining the explicit provider-byte exclusion assertion.
Author
Owner

The first post-merge test run confirms the IMAP error wrapper renders the privacy-safe message as io: malformed IMAP response (the initial bare-string equality failed at client.rs:2728). I am updating the expected rendered error while retaining the explicit provider-byte exclusion assertion.

The first post-merge test run confirms the IMAP error wrapper renders the privacy-safe message as `io: malformed IMAP response` (the initial bare-string equality failed at client.rs:2728). I am updating the expected rendered error while retaining the explicit provider-byte exclusion assertion.
Author
Owner

Finished issue #625.

  • Built: updated the vendored test_parsing_error to assert the exact privacy-safe rendered error (io: malformed IMAP response) and assert that the provider's SMTP banner is absent. The privacy patch in imap_stream.rs is unchanged.
  • File: crates/plugins/mail/vendor/async-imap/src/client.rs
  • Head: f811d7aa4bf922ceb3948ddb5b6241944fb5cbd3
  • Synced origin/dev once before final gates; it fast-forwarded to c4a61e8cf.
  • Decision: DESIGN §§45 and 53 describe Mail and the IMAP proxy, but do not define malformed-response error rendering. The test uses the existing Error::Io display prefix (io: ) plus the fixed privacy message.
  • Known gaps: none in scope. No route or API changed, so adversarial endpoint probing does not apply. The web build output directories were absent. UX checks are not applicable to this test-only change.

Final gates:

cargo fmt --check -p async-imap
Output: empty; exit status 0.

cargo clippy -p async-imap --all-targets -- -D warnings

    Checking async-imap v0.11.3 (/home/kayg/Developer/calternal-wt/imaptest-625/crates/plugins/mail/vendor/async-imap)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.73s

cargo test -p async-imap

   Compiling async-imap v0.11.3 (/home/kayg/Developer/calternal-wt/imaptest-625/crates/plugins/mail/vendor/async-imap)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 13.18s
     Running unittests src/lib.rs (/mnt/hdd/targets/jobs/imaptest-625/debug/deps/async_imap-c5bbf4bfcbd10794)

running 70 tests
test client::tests::append ... ok
test client::tests::authenticate ... ok
test client::tests::check ... ok
test client::tests::close ... ok
test client::tests::capability ... ok
test client::tests::copy ... ok
test client::tests::create ... ok
test client::tests::delete ... ok
test client::tests::examine ... ok
test client::tests::expunge ... ok
test client::tests::fetch ... ok
test client::tests::fetch_body ... ok
test client::tests::login ... ok
test client::tests::login_with_capabilities ... ok
test client::tests::fetch_unexpected_eof ... ok
test client::tests::quote_backslash ... ok
test client::tests::noop ... ok
test client::tests::get_metadata ... ok
test client::tests::quote_dquote ... ok
test client::tests::readline_delay_read ... ok
test client::tests::readline_eof ... ok
test client::tests::login_without_capabilities ... ok
test client::tests::logout ... ok
test client::tests::search ... ok
test client::tests::rename ... ok
test client::tests::status ... ok
test client::tests::store ... ok
test client::tests::test_parsing_error ... ok
test client::tests::readline_err - should panic ... ok
test client::tests::select ... ok
test client::tests::uid_fetch ... ok
test client::tests::uid_mv ... ok
test client::tests::mv ... ok
test client::tests::uid_search ... ok
test client::tests::uid_copy ... ok
test extensions::id::tests::test_format_identification ... ok
test client::tests::uid_store ... ok
test client::tests::uid_expunge ... ok
test client::tests::unsubscribe ... ok
test client::tests::uid_search_unordered ... ok
test client::tests::validate_carriage_return ... ok
test client::tests::validate_newline ... ok
test client::tests::validate_random ... ok
test error::tests::test_send ... ok
test imap_stream::tests::test_buffer_debug ... ok
test imap_stream::tests::test_buffer_empty ... ok
test imap_stream::tests::test_buffer_ensure_capacity ... ok
test imap_stream::tests::test_buffer_extend_use ... ok
test imap_stream::tests::test_buffer_reset_with_data ... ok
test imap_stream::tests::test_buffer_take_and_return_block ... ok
test imap_stream::tests::test_imap_stream_error ... ok
test imap_stream::tests::test_buffer_grow ... ok
test imap_stream::tests::test_buffer_write_read ... ok
test parse::tests::parse_capability_case_insensitive_test ... ok
test parse::tests::parse_capabilities_w_unilateral ... ok
test parse::tests::parse_capability_test ... ok
test parse::tests::parse_capability_invalid_test - should panic ... ok
test parse::tests::parse_fetches_empty ... ok
test parse::tests::parse_ids_search ... ok
test parse::tests::parse_fetches_test ... ok
test parse::tests::parse_mailbox_does_not_exist_error ... ok
test parse::tests::parse_names_test ... ok
test client::tests::subscribe ... ok
test parse::tests::parse_ids_w_unilateral ... ok
test parse::tests::parse_names_w_unilateral ... ok
test parse::tests::parse_fetches_w_unilateral ... ok
test client::tests::test_get_quota_root ... ok
test parse::tests::parse_ids_test ... ok
test imap_stream::tests::test_ensure_capacity_loop ... ok
test client::tests::large_fetch ... ok

test result: ok. 70 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s

   Doc-tests async_imap

running 7 tests
test crates/plugins/mail/vendor/async-imap/src/client.rs - client::Client<T>::authenticate (line 244) ... ignored
test crates/plugins/mail/vendor/async-imap/src/client.rs - client::Client<T>::login (line 158) ... ignored
test crates/plugins/mail/vendor/async-imap/src/lib.rs - (line 18) ... ignored
test crates/plugins/mail/vendor/async-imap/src/lib.rs - (line 27) ... ignored
test crates/plugins/mail/vendor/async-imap/src/lib.rs - (line 35) ... ignored
test crates/plugins/mail/vendor/async-imap/src/lib.rs - (line 48) ... ignored
test crates/plugins/mail/vendor/async-imap/src/client.rs - client::Session<T>::store (line 816) - compile ... ok

test result: ok. 1 passed; 0 failed; 6 ignored; 0 measured; 0 filtered out; finished in 0.06s

Cleanup: cargo clean removed 979 files (363.6 MiB); no web build output was present.

Finished issue #625. - Built: updated the vendored `test_parsing_error` to assert the exact privacy-safe rendered error (`io: malformed IMAP response`) and assert that the provider's SMTP banner is absent. The privacy patch in `imap_stream.rs` is unchanged. - File: `crates/plugins/mail/vendor/async-imap/src/client.rs` - Head: `f811d7aa4bf922ceb3948ddb5b6241944fb5cbd3` - Synced `origin/dev` once before final gates; it fast-forwarded to `c4a61e8cf`. - Decision: DESIGN §§45 and 53 describe Mail and the IMAP proxy, but do not define malformed-response error rendering. The test uses the existing `Error::Io` display prefix (`io: `) plus the fixed privacy message. - Known gaps: none in scope. No route or API changed, so adversarial endpoint probing does not apply. The web build output directories were absent. UX checks are not applicable to this test-only change. Final gates: `cargo fmt --check -p async-imap` Output: empty; exit status 0. `cargo clippy -p async-imap --all-targets -- -D warnings` ```text Checking async-imap v0.11.3 (/home/kayg/Developer/calternal-wt/imaptest-625/crates/plugins/mail/vendor/async-imap) Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.73s ``` `cargo test -p async-imap` ```text Compiling async-imap v0.11.3 (/home/kayg/Developer/calternal-wt/imaptest-625/crates/plugins/mail/vendor/async-imap) Finished `test` profile [unoptimized + debuginfo] target(s) in 13.18s Running unittests src/lib.rs (/mnt/hdd/targets/jobs/imaptest-625/debug/deps/async_imap-c5bbf4bfcbd10794) running 70 tests test client::tests::append ... ok test client::tests::authenticate ... ok test client::tests::check ... ok test client::tests::close ... ok test client::tests::capability ... ok test client::tests::copy ... ok test client::tests::create ... ok test client::tests::delete ... ok test client::tests::examine ... ok test client::tests::expunge ... ok test client::tests::fetch ... ok test client::tests::fetch_body ... ok test client::tests::login ... ok test client::tests::login_with_capabilities ... ok test client::tests::fetch_unexpected_eof ... ok test client::tests::quote_backslash ... ok test client::tests::noop ... ok test client::tests::get_metadata ... ok test client::tests::quote_dquote ... ok test client::tests::readline_delay_read ... ok test client::tests::readline_eof ... ok test client::tests::login_without_capabilities ... ok test client::tests::logout ... ok test client::tests::search ... ok test client::tests::rename ... ok test client::tests::status ... ok test client::tests::store ... ok test client::tests::test_parsing_error ... ok test client::tests::readline_err - should panic ... ok test client::tests::select ... ok test client::tests::uid_fetch ... ok test client::tests::uid_mv ... ok test client::tests::mv ... ok test client::tests::uid_search ... ok test client::tests::uid_copy ... ok test extensions::id::tests::test_format_identification ... ok test client::tests::uid_store ... ok test client::tests::uid_expunge ... ok test client::tests::unsubscribe ... ok test client::tests::uid_search_unordered ... ok test client::tests::validate_carriage_return ... ok test client::tests::validate_newline ... ok test client::tests::validate_random ... ok test error::tests::test_send ... ok test imap_stream::tests::test_buffer_debug ... ok test imap_stream::tests::test_buffer_empty ... ok test imap_stream::tests::test_buffer_ensure_capacity ... ok test imap_stream::tests::test_buffer_extend_use ... ok test imap_stream::tests::test_buffer_reset_with_data ... ok test imap_stream::tests::test_buffer_take_and_return_block ... ok test imap_stream::tests::test_imap_stream_error ... ok test imap_stream::tests::test_buffer_grow ... ok test imap_stream::tests::test_buffer_write_read ... ok test parse::tests::parse_capability_case_insensitive_test ... ok test parse::tests::parse_capabilities_w_unilateral ... ok test parse::tests::parse_capability_test ... ok test parse::tests::parse_capability_invalid_test - should panic ... ok test parse::tests::parse_fetches_empty ... ok test parse::tests::parse_ids_search ... ok test parse::tests::parse_fetches_test ... ok test parse::tests::parse_mailbox_does_not_exist_error ... ok test parse::tests::parse_names_test ... ok test client::tests::subscribe ... ok test parse::tests::parse_ids_w_unilateral ... ok test parse::tests::parse_names_w_unilateral ... ok test parse::tests::parse_fetches_w_unilateral ... ok test client::tests::test_get_quota_root ... ok test parse::tests::parse_ids_test ... ok test imap_stream::tests::test_ensure_capacity_loop ... ok test client::tests::large_fetch ... ok test result: ok. 70 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s Doc-tests async_imap running 7 tests test crates/plugins/mail/vendor/async-imap/src/client.rs - client::Client<T>::authenticate (line 244) ... ignored test crates/plugins/mail/vendor/async-imap/src/client.rs - client::Client<T>::login (line 158) ... ignored test crates/plugins/mail/vendor/async-imap/src/lib.rs - (line 18) ... ignored test crates/plugins/mail/vendor/async-imap/src/lib.rs - (line 27) ... ignored test crates/plugins/mail/vendor/async-imap/src/lib.rs - (line 35) ... ignored test crates/plugins/mail/vendor/async-imap/src/lib.rs - (line 48) ... ignored test crates/plugins/mail/vendor/async-imap/src/client.rs - client::Session<T>::store (line 816) - compile ... ok test result: ok. 1 passed; 0 failed; 6 ignored; 0 measured; 0 filtered out; finished in 0.06s ``` Cleanup: `cargo clean` removed 979 files (363.6 MiB); no web build output was present.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#625
No description provided.