Repository navigation
perf: verify webhook signatures in chunks - #4324
Open
marcuswood-oai wants to merge 1 commit into
Open
marcuswood-oai wants to merge 1 commit into
marcuswood-oai wants to merge 1 commit into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
marcuswood-oai
enabled auto-merge
November 24, 2026 00:31
markstuart-oai
approved these changes
Nov 24, 2026
markstuart-oai
left a comment
Contributor
There was a problem hiding this comment.
The chunked HMAC signs the same bytes and keeps strict UTF-8 validation. The new tests cover split characters and truncated input.
The memory test could run in a fresh process so an existing tracemalloc session cannot skew its result.
Static review only. Hosted checks were still running.
yoni-oai
approved these changes
Nov 24, 2026
This branch has not been 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.
Changes being requested
Feed the webhook header prefix and body chunks into the same HMAC. Validate byte payloads with an incremental UTF-8 decoder. The signature format is unchanged and there is no new payload size limit. For malformed input, Unicode error offsets can be relative to the chunk.
Additional context & links
All 238 webhook tests passed, including sync and async cases with split UTF-8 characters, truncated input, and large text and byte payloads. Ruff and ty passed for the changed files. With a synthetic 4 MB ASCII byte payload, peak extra traced memory during verification dropped from 12 MB to 132 KB.