feat: payload limits validation visitor#1327
Merged
Merged
Conversation
438ac14 to
d2ddd07
Compare
d2ddd07 to
55c894c
Compare
Sushisource
reviewed
Jun 12, 2026
Sushisource
approved these changes
Jun 12, 2026
Sushisource
left a comment
Member
There was a problem hiding this comment.
Nice, glad that zip suggestion reduced things a lot
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.
What was changed
Add a SDK-internal, build-time generated payload/memo limit visitor:
temporal.api.*rpc input message)PayloadLimitsValidatableimplementations to report each payload-bearing field size and classification to aPayloadLimitsSinkimplementation.PAYLOAD_LIMITS_TABLEinbuild.rsto map each payload-bearing message and field combination to a classification. The build will fail if there are any missing or stale entries. This allows us to classify new combinations as they are added to the API. Initial classification answers built from inspection oftemporal/temporalrepository.Payload,Payloads,Memo,Failure,Any,SearchAttributes, andHeaderleaf fields.PayloadLimitSinkreceives callbacks from visitor to consume the size and classification information for each visited message and field combination.validation_payload_limitsfunc to log errors and warnings and returns the first error-levelPayloadLimitViolation. Each violation carries a proto-field-name path that is relative to the root message.Approximately 370 lines of
build.rsis the classification table itself.Approximately 300 lines of
payload_limits.rsis tests.Why?
Create a foundational element that will be later integrated to allow clients and workers to validate payload limits and proactively issue WFT / AT failures.
Checklist