Skip to content

Add additional standalone activity request validations#9285

Merged
fretz12 merged 11 commits intotemporalio:mainfrom
fretz12:fredtzeng/saa-validation-improvements
Feb 14, 2026
Merged

Add additional standalone activity request validations#9285
fretz12 merged 11 commits intotemporalio:mainfrom
fretz12:fredtzeng/saa-validation-improvements

Conversation

@fretz12
Copy link
Contributor

@fretz12 fretz12 commented Feb 11, 2026

What changed?

Add additional standalone activity request validations. Renamed blob error tags to be in line with existing workflow tags. Code cleanup. Refactor tests into grouped subtests.

Why?

After an audit of the standalone activity frontend validations, this PR provides additional coverage of missing corners.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

@fretz12 fretz12 requested review from a team as code owners February 11, 2026 00:25
@fretz12 fretz12 marked this pull request as draft February 11, 2026 03:26
@fretz12 fretz12 marked this pull request as ready for review February 11, 2026 16:21
@fretz12 fretz12 requested a review from Copilot February 11, 2026 16:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds additional request validation coverage for standalone activity APIs, aligning frontend behavior with stricter ID/size checks and reorganizing functional tests into grouped subtests.

Changes:

  • Added/expanded frontend request validations for Start/Terminate/RequestCancel standalone activity APIs (ID length, identity, run ID format, blob/reason/input size).
  • Refactored/centralized validation helpers in validator.go (including renaming/refactoring blob-size validation).
  • Restructured standalone activity functional tests into grouped validation subtests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/standalone_activity_test.go Adds new validation-focused subtests for Start/RequestCancel/Terminate and refactors existing validation tests into grouped subtests.
chasm/lib/activity/validator.go Introduces new request validators for cancel/terminate, refactors blob-size validation helper, and makes poll validation unexported.
chasm/lib/activity/frontend.go Wires new validators into frontend handlers and adjusts error messages to be more specific/consistent.
chasm/lib/activity/handler.go Updates poll handler to match updated response builder signature (no error return).
chasm/lib/activity/activity.go Simplifies response/info builders by removing unused error returns and updating call sites accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

tests/standalone_activity_test.go:3349

  • This subtest discards the DescribeActivityExecution response by assigning it to _ and then asserts on the outer describeResp variable (from a previous call). Capture the returned response into a local variable and assert against that, otherwise this test can pass even if the "NoCallerDeadline" behavior regresses.
		_, err = s.FrontendClient().DescribeActivityExecution(ctx, &workflowservice.DescribeActivityExecutionRequest{
			Namespace:     s.Namespace().String(),
			ActivityId:    activityID,
			RunId:         startResp.RunId,
			LongPollToken: describeResp.LongPollToken,
		})
		require.NoError(t, err)
		require.Empty(t, describeResp.GetInfo())

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fretz12 fretz12 marked this pull request as draft February 11, 2026 19:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fretz12 fretz12 marked this pull request as ready for review February 11, 2026 20:25
Copy link
Contributor

@dandavison dandavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, made a few suggestions

@fretz12 fretz12 enabled auto-merge (squash) February 13, 2026 23:13
@fretz12 fretz12 disabled auto-merge February 13, 2026 23:48
@fretz12 fretz12 enabled auto-merge (squash) February 13, 2026 23:48
@fretz12 fretz12 merged commit 93ce0c4 into temporalio:main Feb 14, 2026
44 checks passed
@fretz12 fretz12 deleted the fredtzeng/saa-validation-improvements branch February 14, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants