Repository navigation
fix(runner): log bodies with --verbose_http, show the last exchange on failure, count per test - #140
Open
segiodongo wants to merge 1 commit into
Conversation
…n failure, count per test Attach httpx request and response hooks to BaseIntegrationTest so --verbose_http logs identifying headers and pretty-printed bodies (clipped at 4 KB, credentials redacted) and failures/errors append the test's last HTTP exchange via RecordingResult. Count console summary outcomes once per test ID rather than once per failing subtest, document --verbose_http in README.md, and add unit tests.
segiodongo
force-pushed
the
upstream/u4-http-logging-and-counts
branch
from
November 18, 2026 20:20
3850ea6 to
f120adf
Compare
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.
Description
Improves HTTP diagnostics and console summary accuracy in the conformance runner:
--verbose_httpand attach the last exchange on failure: Previously,--verbose_httponly raised thehttpxlogger toINFO(logging a single request/status line without bodies), and an unexpected response shape (for example, an in-band HTTP 200 refusal followed by aKeyError) showed none of the payload that triggered it.BaseIntegrationTestnow attacheshttpxrequest and response event hooks. Under--verbose_http, they log each request (method, URL, identifying UCP headers, body) and response (status,Content-Type, body), pretty-printing JSON, clipping bodies at 4 KB, and redactingAuthorization,Signature, andSignature-Input.--verbose_http, the response hook retains the test's last response, andRecordingResultappends"Last HTTP exchange:"to every failure, error, and failing subtest output.unittest'sresult.failureslist contains one entry per failingsubTest, so a single test method failing two subtests previously incrementedFailurestwice and subtracted fromPassed.runner.pynow runs underRecordingResult(framework/outcomes.py) and counts one consolidated outcome per test ID.--verbose_httpand automatic failure-exchange output inREADME.md, addstests/http_and_summary_test.py, and wiresuv run pytest testsinto CI.Verification
uv run pytest tests: 8 passeduv run ucp-conformance --suite=allagainst the Flower Shop sample server: 83 executed, 81 passed, 2 skipped, 0 failures, 0 errorsType of change
Checklist