Repository navigation
Cap error fields in every error event and build release notes from CHANGELOG.md - #99
Merged
Merged
Conversation
The integrations cut error messages to ERROR_MSG_MAX_LEN and provider codes to PROVIDER_ERROR_CODE_MAX_LEN before calling track_error(). Manual calls sent the full text. ErrorEvent now applies both limits when serializing, so every error event gets them.
Measured across 37 typical failures, 9 messages were over 200 characters. Several put their cause at the end. mlx-whisper audio errors start with the ffmpeg banner, and torch state_dict errors end with the shapes. The integrations kept only the first 200 characters. ErrorEvent now keeps the start and the end of a message over 500 characters, with an ellipsis between. The integrations and decorators no longer cut the message themselves, so the limit is applied once.
The notes listed every commit subject since the previous tag, including merge commits and release housekeeping such as changelog moves. They are now the curated CHANGELOG.md section for the version. A missing or empty section fails the build instead of publishing empty notes.
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.
For 0.3.0. Merging this into
release/0.3.0adds it to the release PR #98.Problem
error_messageto its first 200 characters. The publichandle.track_error()applied no limit, so apps that track errors by hand had to truncate the message themselves.load_state_dicterrors (301) end with the mismatched shapes.Fix
ErrorEvent.to_dict()applies the limits, so every error event gets them, from an integration or from a manualtrack_error()call.ERROR_MSG_MAX_LENgoes from 200 to 500. A longer message keeps its start and its end, with…between them.provider_error_codeis capped at 64.ERROR_MSG_MAX_LENto cap server responses in logs, so those can now be up to 500 characters.Note
The Android and Swift SDKs still use 200 with a head-only cut. They should follow.
Testing
tests/test_event_serialization.pycover the cap, start-and-end truncation and short messages.Release notes from CHANGELOG.md
The changelog preview on #98, and the GitHub release notes the tag build creates, listed every commit subject since
v0.2.2. That included merge commits ("Merge 6c3a54e… into c3896d9…") and release housekeeping such as changelog moves.scripts/build_changelog_comment.pynow uses the version's section ofCHANGELOG.mdinstead. A missing or empty section fails the build rather than publishing empty notes. A test checks that the current version has a section, andCONTRIBUTING.mdsays to move the Unreleased entries at release time.Full suite after both changes: 917 passed, 28 skipped.
After the release
Merge
mainback intodevel(as inbf806c9), so this and the changelog commit onrelease/0.3.0reachdevel.🤖 Generated with Claude Code