test(doctor): make scrubbed probes cross-platform#4561
Conversation
Scan every HTTP header for Content-Length in the local doctor probe server. The prior first-colon lookup could miss the body length, close with unread request bytes, and reset the Windows client before it received the response. Add a regression with ordinary headers preceding Content-Length. Signed-off-by: Hunter B <hmbown@gmail.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @Hmbown's task in 1m 16s —— View job Review: test(doctor): read request bodies across header orderings
Summary: This is a real bug fix disguised as a test-only PR. In .find_map(|line| line.split_once(':'))
.filter(|(name, _)| name.eq_ignore_ascii_case("content-length"))
The fix ( fn http_content_length(headers: &str) -> usize {
headers
.lines()
.filter_map(|line| line.split_once(':'))
.find(|(name, _)| name.eq_ignore_ascii_case("content-length"))
.and_then(|(_, value)| value.trim().parse::<usize>().ok())
.unwrap_or(0)
}
By review area:
No issues found. This is a small, well-scoped, correctly-tested fix. |
Replace the one-shot handwritten socket responder with wiremock for the process-level doctor probe. The fixture now drains and records the complete request before replying, avoiding Windows connection-reset timing while preserving exact authorization and read-only assertions. Signed-off-by: Hunter B <hmbown@gmail.com>
|
Claude finished @Hmbown's task in 2m 15s —— View job Review: test(doctor): use protocol-aware probe fixture (update)
Summary: The new commit supersedes the earlier fix entirely rather than building on it. Commit By review area:
Note on verification: I was not able to run No blocking issues found. |
Keep the wiremock server and Tokio runtime on a dedicated owner thread while the diagnostic subprocess runs. An explicit control channel snapshots requests and shuts the server down, avoiding Windows connection-refused races without weakening the real HTTP or authorization assertions. Signed-off-by: Hunter B <hmbown@gmail.com>
|
Claude finished @Hmbown's task in 2m 18s —— View job Review: test(doctor): read request bodies across header orderings (update)
Summary: Commit By review area:
Verification note: I could not run No blocking issues found. |
Replace wiremock in the process-level doctor fixture with an explicitly bound Axum server. The handler drains the complete request body, records only headers for the credential assertion, and shuts down gracefully without the wiremock connect-and-drop readiness probe or accept-loop failure behavior. Signed-off-by: Hunter B <hmbown@gmail.com>
|
Claude finished @Hmbown's task in 1m 24s —— View job Review: test(doctor): read request bodies across header orderings (update)
Summary: Commit By review area:
Verification note: I could not run No blocking issues found. |
Keep credential-isolated diagnostic subprocesses scrubbed while retaining the non-secret SystemRoot and WINDIR values required by Windows networking. This lets the real loopback probe reach its local fixture without restoring ambient credentials or proxy state. Signed-off-by: Hunter B <hmbown@gmail.com>
|
Claude finished @Hmbown's task in 56s —— View job Review: test(doctor): read request bodies across header orderings (update)
Summary: Commit By review area:
Verification note: I could not run No blocking issues found across the full PR history ( |
Summary
Evidence
Signed-off-by: Hunter B hmbown@gmail.com