Repository navigation
test(gateway): report unread response termination - #1544
Conversation
Role review
|
overtrue
left a comment
There was a problem hiding this comment.
Reviewed c56af24 against main da2fc77. No actionable finding in this test-only delta.
The extraction preserves the 400 ms per-read timeout, accumulated response bytes, and the prior acceptance of EOF or a read error as closed. Existing HTTP status, XML error code and connection-header assertions remain enforced. Reporting the error kind is useful evidence for #1531, but neither establishes the remote writer outcome nor repairs the intermittent truncation.
Independent verification compiled the unchanged ReadEnd definition, observer function and observer control test extracted from the actual source, using existing Tokio dependencies in a standalone test harness. The control passed. Five separately compiled faults (wrong EOF, wrong read-error classification, wrong timeout classification, discarded bytes, and bytes cleared on error) each failed the observer assertion; the restored control passed. git diff --check passed and the review worktree is clean. This was a focused observer check, not an independent full integration or four-command Cargo gate run.
CI run 40948622934 is still in progress on this head, with no failed jobs observed at review time. Merge must wait for the complete required checks and a fresh head/discussion check.
Role Verdicts
- simplicity-adversary: attacked termination classification, byte retention across reads and errors, per-read deadline equivalence and preserved closure assertions — no break found
CI evidenceRun 40948622934 on head |
Summary
When unread-body wire assertions fail, report whether the response read ended in EOF, an I/O error kind, or timeout. Preserve the original 400 ms read deadline, received bytes, and the existing closure assertion's acceptance of EOF or read error. A test-only reader exercises EOF, reset after response bytes, and an open peer that times out.
Related to #1531. This diagnostic does not reproduce or repair the intermittent truncated response and does not observe the server writer. The fixture is gateway-specific; no corresponding s3s change is identified.
Verification
On main
da2fc77d, with one Cargo build worker and incremental compilation disabled:cargo fmt --all --check: exit 0.cargo clippy --workspace --all-targets -- -D warnings: exit 0.cargo test --workspace: exit 0 on the final source.cargo xtask verify --crate rustfs-gateway: exit 0; 46.48 seconds wall time, including 15.78 seconds preparation and successful loops of 24.15 and 5.93 seconds. The complete command exceeded the 30-second target; see verify: conformance preparation exceeds command feedback budget #1504.Before the final test improvement, the first workspace attempt failed the unrelated conformance calibration peer with a reset while receiving its response. The identical main's separately compiled focused test and later workspace runs passed; cause is unknown. See #1543. A previous crate verification reported at least 73.61 seconds from its three stages without an independent whole-command timer; its warm repeat took 22.53 seconds. Neither replaces the final-source measurement above.
Role Verdicts
Breaking Change
Checklist
cargo xtask verify)went red. The PR description names which ones
BREAKINGand a migration pathunsafeintroducedinventory/linkmeintroduced#[non_exhaustive]added to a DTO