test: tie loopback server lifetime to client work - #259
Merged
Conversation
smiggleworth
marked this pull request as ready for review
August 25, 2026 13:59
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why are you making this contribution?
The downstream Windows Platform workflow failed twice while finishing the documentation release work. The first failure lost the scripted provider listener before the S3 error-shape request; after a failed-job rerun passed, the next merged
mainrun lost two executor listeners before their clients were scheduled. In each failure, reqwest reported a loopback connection error instead of receiving the scripted HTTP response.These test servers started a fixed five- or ten-second lifetime before the parallel Windows test runner necessarily scheduled the client. Server lifetime should follow the client operation, not wall-clock scheduling latency.
Linked issues
No issue: follow-up to repeatable downstream Windows Platform failures discovered while finishing PR #257 and PR #258.
Acceptance audit
Evidence:
cargo test --workspace --all-featurespasses the complete library, integration, and doctest suite after the change. Before the change, Platform run 32852891765 lost the shared scripted listener and Platform run 32854634319 lost two executor listeners under Windows scheduling load.Production entry point: Test-only loopback fixtures in
storage::cloud::executor::testsandstorage::providers::test_support; shipping storage behavior is unchanged.Resolution: Replaces arbitrary pre-request deadlines with explicit completion signals from the caller.
Evidence:
should_not_retry_conditional_mutation_given_ambiguous_transient_response,should_not_retry_unconditional_mutation_given_ambiguous_transient_response, andshould_not_retry_generation_not_match_mutation_given_transient_responsepass with their exactrequest_count == 1assertions.Production entry point: The tests exercise
CloudExecutor::execute_requestthrough real loopback HTTP requests.Resolution: Preserves a bounded 250 ms idle observation after the client completes, while removing only the unsafe pre-request expiry.
Evidence: The shared server's
finishandDroppaths signal cancellation before joining; all provider and hybrid all-feature tests pass in the full workspace gate.Production entry point: Test-only provider fixture used by AWS, Azure, GCS, resolver, and hybrid classification tests.
Resolution: Makes shutdown caller-driven and keeps the nonblocking accept loop bounded to its owning test.
Risk and compatibility
Low risk and test-only. No public API, storage behavior, persistence format, dependency, or runtime timeout changes. The main risk is a fixture thread waiting indefinitely; explicit completion signaling plus the existing nonblocking poll prevents that, including during unwind.
Verification
cargo test --lib storage::cloud::executor::tests::should_not_retry_conditional_mutation_given_ambiguous_transient_response -- --exact --nocapture— passedcargo test --lib storage::cloud::executor::tests::should_not_retry_generation_not_match_mutation_given_transient_response -- --exact --nocapture— passedcargo test --lib storage::hybrid::backend::tests::should_classify_real_s3_error_shapes_given_wal_catalog_operations --all-features -- --exact --nocapture— passedcargo test --workspace --all-features— passed; complete library, integration, and doctest suitecargo clippy --workspace --all-targets --all-features -- -D warnings -D clippy::pedantic— passedcargo fmt --check— passedcntryl-tools validate-tests— passed; 2,440/2,440 compliantgit diff --check— passedTool assistance disclosure
Codex correlated the repeated hosted Windows failures, replaced the test-server lifetime policy, reviewed the full diff, and ran the verification above.
Contributor responsibility
Review checklist