Preserve error status when run events exceed the capture limit - #123
Open
larissaschiavo wants to merge 1 commit into
Open
larissaschiavo wants to merge 1 commit into
larissaschiavo wants to merge 1 commit into
Conversation
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.
An HTTP 429 error can contain the full request body. When that pushes a model-response event past the 64 KiB capture limit, the event currently clears
errorentirely, leaving observers unable to distinguish the provider failure from an oversized successful response.Retain a truncated-error marker with validated HTTP status, a short identifier-shaped provider code, and boolean retryability when available. These fields are selected after redaction; messages, request/response bodies, headers, causes, and arbitrary nested values are discarded. Tight capture limits reduce the summary to a marker or the existing envelope. Ordinary events, successful-response truncation, returned errors, and execution/retry behavior stay unchanged.
Validation:
mix test test/run_observation_test.exs test/run_test.exs --seed 0— 22 tests pass, including secret exclusion, newline/oversized code rejection, tight limits, and unchanged ordinary/successful events.mix checkpasses on the final commit: formatting, warnings-as-errors compilation, 54 doctests, 9 properties, 2912 tests, zero failures (13 skipped, 261 excluded).