Repository navigation
ref(core): Replace ad hoc record guards with schemas - #1153
Merged
Merged
Conversation
Use typed logging options for internal callers and validate unknown API and tool payloads at their boundaries. Preserve the existing tolerant behavior for partially malformed response data while removing duplicated generic record guards. Co-Authored-By: Codex CLI Agent <noreply@openai.com>
Model events validation and trace attribute responses from the current Sentry endpoint types instead of recovering from impossible malformed shapes. Update mocks and regression fixtures to match those contracts, and avoid recording raw OAuth state values while fixing typed logging. Co-Authored-By: Codex CLI Agent <noreply@openai.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b828368. Configure here.
This branch was previously deployed
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.

Unknown API, replay, and tool-result payloads now cross explicit Zod schemas, while generic object inspection is limited to formatting code that genuinely accepts arbitrary records.
Events validation and trace-item attribute schemas match the required fields emitted by the current Sentry source instead of fabricating defaults for impossible response shapes. Replay recordings remain selectively parsed because the upstream endpoint intentionally exposes arbitrary RRWeb dictionaries. The related mocks and regression fixtures now use those source-backed contracts.
Logging also accepts one typed options object, and the OAuth callback records only state-presence booleans rather than raw CSRF state values.