Skip to content

workerservice: validate RequestActorSuspend requests - #2023

Merged
Julian Gutierrez Oschmann (juli4n) merged 1 commit into
agent-substrate:mainfrom
shrutiyam-glitch:ateapi-dv-follow-up
Oct 1, 2026
Merged

Julian Gutierrez Oschmann (juli4n) merged 1 commit into
agent-substrate:mainfrom
shrutiyam-glitch:ateapi-dv-follow-up

Conversation

@shrutiyam-glitch

@shrutiyam-glitch Shrutiya Mohan (shrutiyam-glitch) commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Follow up on #2007

This switches the remaining two WorkerService RPCs (RequestActorSuspend and SetWorkerCapacity) to declarative validation via cmd/ateapi/internal/apivalidation, completing declarative request validation across ateapi.

Removes the hand-written checks in workerservice (validateActorRef, validateReportedCapacity) and the now-unused resources.ValidateGlobalObjectRef.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

if req.GetActorUid() == "" {
return nil, status.Error(codes.InvalidArgument, "actor_uid is required")
if errs := apivalidation.ValidateRequestActorSuspendRequest(ctx, req); len(errs) > 0 {
return nil, status.Error(codes.InvalidArgument, errs.ToAggregate().Error())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Use resources.ToGRPCStatusError.

@shrutiyam-glitch
Shrutiya Mohan (shrutiyam-glitch) force-pushed the ateapi-dv-follow-up branch 2 times, most recently from f364d67 to 06e7867 Compare October 1, 2026 17:25
…laratively

Wire apivalidation.ValidateRequestActorSuspendRequest and ValidateSetWorkerCapacityRequest into WorkerService, add +k8s:format=k8s-uuid to RequestActorSuspendRequest.actor_uid, and remove the hand-written checks and now-unused resources.ValidateGlobalObjectRef.
Merged via the queue into agent-substrate:main with commit 148df4b Oct 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api-machinery kind/feature An enhancement / feature request or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants