mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-12 10:35:06 +08:00
Follow up on issue #1168 and the base PR #1215 In this PR: **Actor read/lifecycle verbs — completes Actor end-to-end** * `Get`/`Delete`/`Suspend`/`Pause`/`Resume` `ActorRequest`: dropped the `+k8s:opaqueType` fence on the actor ref, added `+k8s:required` + `+k8s:subfield(atespace)=+k8s:required`. Combined with the recursion into `Validate_ObjectRef` this reproduces exactly what `resources.ValidateObjectRef` enforced (ref required, atespace required, name required, both DNS-1123 labels). * `ListActorsRequest`: tagged to match `ListAtespacesRequest` (atespace optional + short-name format, `page_size` minimum 1, `page_token` max length 256). * All six `validate*Request()` functions are now one-line calls to the generated validators. With this, every RPC verb on `Actor` and `Atespace` is fully declarative; `resources.ValidateObjectRef` has no callers left in `actor.go`. **Note:**`ListActorsRequest.page_token` now capped at 256 chars (parity with `ListAtespaces`). **Testing** * Existing verb tests updated to the generated error shapes (`field.ErrorMatcher` with origin matching). * New coverage: `page_token` boundary cases for `ListActors`; * `controlapi`, `functionaltest`, `actoridentity`, `store`, and `atepg` suites all pass; `go vet` and `gofmt` clean. - [ ] Tests pass - [ ] Appropriate changes to documentation are included in the PR --------- Co-authored-by: Michelle Au <msau42@users.noreply.github.com>