Repository navigation
test(signing): accept any HTTP status in the real TLS handshake check - #1576
Conversation
The test proves the pinned transport still validates the hostname; a certificate mismatch raises before any response. Asserting 200 made it fail whenever example.com answered 503, which happened twice this week on main and on #1557. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — single test-only change widens a TLS-handshake sanity assertion from == 200 to 100 <= status < 600 in tests/conformance/signing/test_ip_pinned_transport.py. This is correct: a cert/hostname mismatch raises before any response exists, so any HTTP status proves the handshake and hostname check passed. It decouples the test from example.com's origin availability (which flaked to 503), not a test disable — the validation proof is intact. The test(signing): prefix is appropriate (no public surface, wire shape, or semver signal). No findings.
No blocking or escalation triggers: no critical/high/medium findings, gated_paths is false, high_risk is false, no author team gate, no prior decision. Falls through the decision table to row 9 → approve. (review_decision is REVIEW_REQUIRED, but row 2 only forces escalate when gated_paths is true, which it is not here.)
test_real_tls_handshake_still_validates_hostnamechecks that the IP-pinned transport still validates the hostname against the certificate. A mismatch raises before any response exists, so any HTTP status proves the handshake passed. Asserting== 200made the test fail whenever example.com answered 503. That happened on main at4e9c12316and on #1557's Python 3.10 lane this week, and the release workflow needs a green CI run on the exact release commit.tests/conformance/signing/test_ip_pinned_transport.py: 393 passed.🤖 Generated with Claude Code