fix: add missing validation to UpdateSchedule#9874
Open
chaptersix wants to merge 2 commits intotemporalio:mainfrom
Open
fix: add missing validation to UpdateSchedule#9874chaptersix wants to merge 2 commits intotemporalio:mainfrom
chaptersix wants to merge 2 commits intotemporalio:mainfrom
Conversation
053e259 to
7a63764
Compare
chaptersix
commented
Apr 10, 2026
- Extract validateSchedulePayloadSize helper shared by CreateSchedule and UpdateSchedule (both CHASM and V1 paths) - Move request ID length check and header size metric to shared UpdateSchedule handler - Remove duplicate checks from updateScheduleWorkflow - Add functional tests for oversized request ID and blob size limit
7a63764 to
01071b4
Compare
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.
Summary
The CHASM
UpdateSchedulecodepath was missing several validation checksthat exist on the V1 path and on CreateSchedule CHASM:
Payload size check (memo + action input): CreateSchedule CHASM validates
this explicitly since it bypasses StartWorkflowExecution. UpdateSchedule CHASM
had no equivalent check. Now both use a shared
validateSchedulePayloadSizehelper in the common UpdateSchedule handler, so it applies to both V1 and CHASM.
Request ID length check: Was only inside
updateScheduleWorkflow(V1).Moved to the shared
UpdateSchedulehandler so CHASM gets it too.Header size metric: Was only recorded on the V1 Update path. Now recorded
in the shared UpdateSchedule and CreateSchedule handlers for both paths.
Also removes duplicate checks from
updateScheduleWorkflowthat are nowhandled in the shared path, and refactors the inline blob size check in
createScheduleCHASMto use the same shared helper.Test plan
TestUpdateScheduleRequestIDTooLong-- oversized request ID rejected with InvalidArgumentTestUpdateScheduleBlobSizeLimit-- oversized memo rejected with InvalidArgumentTestScheduleCHASMandTestScheduleV1suites pass