Repository navigation
refactor: extract apivalidation, resources, and server workspace handlers - #566
Merged
Merged
Conversation
YoyinZyc
requested review from
mayawang and
yongruilin
and removed request for
mayawang and
rakyll
November 10, 2026 23:45
yongruilin
reviewed
Nov 11, 2026
yongruilin
left a comment
Collaborator
There was a problem hiding this comment.
LGTM with only 2 nits.
And in task.proto it still documents the config check as "within MaxTaskConfigSize", which is no longer in that package. Maybe state the 16 KiB limit there?
Comment on lines
+40
to
+43
| // MaxTaskConfigSize is the largest spec.config a task may have, measured as | ||
| // its JSON encoding. The config travels inside AX_TASK_YAML, so it must fit | ||
| // within MaxTaskYAMLSize together with the rest of the spec; this limit leaves | ||
| // room for that and gives a more specific error than ValidateTaskSize. |
Collaborator
There was a problem hiding this comment.
The doc comments were reworded during the move and lost some context, e.g. this one no longer says a config near the limit can still be rejected by ValidateTaskSize. Could you carry them over verbatim?
Collaborator
Author
There was a problem hiding this comment.
Done, keep the comments unchanged across other files as well
…lers Keep pkg/apis/v1alpha1 focused strictly on generated protobuf types, constants, and YAML serialization (matching Agent Substrate's api/ateapi/v1 layout), and isolate Workspace RPC handlers for readability: - Extract server-side manifest admission validation into internal/apivalidation (common, task, workspace, model). - Extract Kubernetes CPU/memory quantity parsing into internal/resources. - Split Workspace RPC handlers out of internal/server/server.go into internal/server/workspace.go. - Update ax-server, TaskReconciler, and substrate.Client callers and sync AGENTS.md.
YoyinZyc
force-pushed
the
refactor/apivalidation
branch
from
November 11, 2026 04:28
4504e48 to
d129c9b
Compare
yongruilin
approved these changes
Nov 11, 2026
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.
Pure mechanical refactor with no wire, schema, or behavior changes:
pkg/apis/v1alpha1: Keep strictly focused on generated protobuf types, constants, and YAML serialization (matching Agent Substrate'sapi/ateapi/v1layout).internal/apivalidation: Extract server-side manifest admission validation (common.go,task.go,workspace.go,model.go).internal/resources: Extract Kubernetes CPU/memory quantity parsing (quantity.go).internal/server/workspace.go: Split Workspace gRPC handlers out ofinternal/server/server.gofor readability ahead of WS5 changes.