You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b0a600e
Browse filesBrowse the repository at this point in the historyBrowse files
fix: record http client requests as self-contained call/return pairs
An http client request used to emit its call event when the request was
sent and its return event when the response arrived. When two requests
overlap, the second response can arrive before the first one's, so the
events interleaved and a return event no longer closed the most recently
opened call, breaking the nesting the AppMap format requires.
Emit both events up front instead. Recording.httpClientRequest() now
writes the call event and an incomplete return event, and hands the
latter back to the caller. Once the response arrives the hook passes
that event to Recording.httpClientResponse(), which fills in the status
code, headers, body and elapsed time through the existing fixup
mechanism. The pair is therefore always adjacent, whatever order the
responses come in.
Until (and unless) the response arrives the return event simply carries
no http_client_response, so that field is now optional on
HttpClientResponseEvent. A request that is aborted, errors out or
outlives the recording ends up as a call/return pair with no response
data, which is both accurate and still properly nested.
Assisted-by: Claude:claude-opus-5
0 commit comments