Skip to content

chore(substrate): bump substrate to v0.6.0 and update control/dataplane integration - #517

Merged
siyuanfoundation merged 1 commit into
google:mainfrom
siyuanfoundation:bump-substrate-v0.6.0
Oct 27, 2026
Merged

siyuanfoundation merged 1 commit into
google:mainfrom
siyuanfoundation:bump-substrate-v0.6.0

Conversation

@siyuanfoundation

Copy link
Copy Markdown
Collaborator

Summary

Upgrades agent-substrate from v0.5.0 to v0.6.0 (go.ate.dev/substrate v0.6.0) and updates AX's Substrate client, controller, CLI, deployment manifests, and E2E suite for the breaking changes in v0.6.0.

Why Substrate v0.6.0 Mandates These Changes

  1. Canonical module path rename (github.com/agent-substrate/substrate -> go.ate.dev/substrate)

    • Upstream change: Substrate v0.6.0 moved its module path to go.ate.dev/substrate and removed pkg/sandboxclass.
    • AX update: Updated go.mod, go.sum, and all ateapipb imports across internal/substrate, internal/controller, and test/e2e.
  2. ActorTemplate resource schema and removed proto fields

    • Upstream change: Substrate v0.6.0 replaced repeated ResourceLimit on ActorTemplate with ResourceRequirements{Limits: Resources{CpuMillicores: int64, MemoryBytes: int64}}, added ate-api-server validation requiring both cpu_millicores != 0 and memory_bytes != 0 on every ActorTemplate, and removed ActorTemplate.SandboxConfig and DeleteActorRequest.AnyState.
    • AX update: Added v1alpha1.ParseCPUMillicores and v1alpha1.ParseMemoryBytes, updated substrate.ResourceLimits, BuildActorTemplate, and EnsureActorTemplateWithImage to populate *ateapipb.ResourceRequirements (defaulting unset dimensions to DefaultCPUMillicores = 1000 and DefaultMemoryBytes = 512 << 20), and removed obsolete field references.
  3. Worker binary rename (cmd/ateom-gvisor -> cmd/ateworker-gvisor)

    • Upstream change: Substrate v0.6.0 renamed the gVisor worker binary entrypoint from cmd/ateom-gvisor to cmd/ateworker-gvisor.
    • AX update: Updated test/e2e/manifests/workerpool.yaml to ko://go.ate.dev/substrate/cmd/ateworker-gvisor.
  4. Dataplane (atenet-router) mandatory mTLS on port 443

    • Upstream change: Substrate v0.6.0 removed plaintext port 80 from atenet-router and now serves ingress exclusively over mTLS on port 443, verifying client SPIFFE certificates issued by podidentity.podcert.ate.dev/identity and presenting server certificates issued by servicedns.podcert.ate.dev/identity.
    • AX update:
      • Mounted the podidentity.podcert.ate.dev/identity projected volume into ax-server (deploy/ax-server.yaml and test/e2e/manifests/ax-server.yaml), updated ATENET_ROUTER_ADDR to https://atenet-router.ate-system.svc.cluster.local:443, and configured the task reconciler's readiness probe HTTP client (newProbeHTTPClient) to present the podidentity client certificate and trust the servicedns CA bundle.
      • Added guest.DialTargetTLS and tunnel.RouterTLSConfig (which loads the live servicedns ClusterTrustBundle and issues/caches a short-lived PodCertificateRequest for ax-server) so ax ssh connects to svc/atenet-router:443 over mTLS.
  5. E2E installer migration to cmd/ate-setup

    • Upstream change: Substrate v0.6.0 replaced the standalone install-ate-kind.sh implementation with a wrapper around go run ./cmd/ate-setup, requiring the deploy ate-system subcommand, --credential-provider, --ateapi-authz-bootstrap-owners, and --ingress-allowed-spiffe-ids.
    • AX update: Updated hack/setup-e2e-kind.sh to pass the new ate-setup flags and ensure fs.inotify.max_user_instances is sufficient on the Kind node.

Verification

  • go test ./... passes across all packages.
  • ./hack/run-e2e-kind.sh passes all 8 E2E tests against Substrate v0.6.0.

@siyuanfoundation

Copy link
Copy Markdown
Collaborator Author

/cc @mayawang

@rakyll

rakyll commented Oct 27, 2026

Copy link
Copy Markdown
Member

@siyuanfoundation What's the status of this change? It would be great to support 0.6.0.

@mayawang

Copy link
Copy Markdown
Collaborator

@siyuanfoundation #515 landed, so this needs a rebase on main. Happy to review right after. One heads-up: #521 builds its CI cache key from github.com/agent-substrate/substrate, so whichever of the two lands second should switch it to go.ate.dev/substrate.

…ne integration

Upgrade agent-substrate from v0.5.0 to v0.6.0 and adapt AX's Substrate
client, controller, CLI, manifests, and E2E harness to the breaking
changes introduced in Substrate v0.6.0:

1. Module path rename (github.com/agent-substrate/substrate -> go.ate.dev/substrate):
   - Substrate v0.6.0 moved its canonical Go module path to go.ate.dev/substrate
     and dropped pkg/sandboxclass.
   - Update go.mod, go.sum, and all ateapipb imports across internal/substrate,
     internal/controller, and test/e2e.

2. ActorTemplate resource requirements and proto removals:
   - Substrate v0.6.0 replaced the repeated ResourceLimit slice on ActorTemplate
     with ResourceRequirements{Limits: Resources{CpuMillicores, MemoryBytes}}
     and enforces in ate-api-server validation that every ActorTemplate sets
     both non-zero cpu_millicores and memory_bytes. It also removed
     ActorTemplate.SandboxConfig and DeleteActorRequest.AnyState.
   - Add v1alpha1.ParseCPUMillicores and v1alpha1.ParseMemoryBytes to convert
     Kubernetes resource quantity strings to int64 millicores and bytes.
   - Update substrate.ResourceLimits, BuildActorTemplate, and
     EnsureActorTemplateWithImage to populate *ateapipb.ResourceRequirements,
     defaulting unset CPU/memory dimensions to DefaultCPUMillicores (1000m) and
     DefaultMemoryBytes (512Mi).

3. Worker binary rename (cmd/ateom-gvisor -> cmd/ateworker-gvisor):
   - Substrate v0.6.0 renamed the gVisor worker entrypoint from cmd/ateom-gvisor
     to cmd/ateworker-gvisor.
   - Update test/e2e/manifests/workerpool.yaml to use
     ko://go.ate.dev/substrate/cmd/ateworker-gvisor.

4. Dataplane (atenet-router) mandatory mTLS on port 443:
   - Substrate v0.6.0 removed plaintext port 80 from atenet-router and now
     serves ingress exclusively over mTLS on port 443 using certificates signed
     by servicedns.podcert.ate.dev/identity (server) and
     podidentity.podcert.ate.dev/identity (client SPIFFE ID).
   - Mount the podidentity.podcert.ate.dev/identity projected volume into
     ax-server (deploy/ax-server.yaml and test/e2e/manifests/ax-server.yaml),
     configure ATENET_ROUTER_ADDR to https://atenet-router.ate-system.svc.cluster.local:443,
     and update the task reconciler's readiness probe client to present the
     podidentity client certificate and verify the servicedns trust bundle.
   - Add guest.DialTargetTLS and tunnel.RouterTLSConfig (which loads the live
     servicedns ClusterTrustBundle and issues/caches a short-lived
     PodCertificateRequest for ax-server) so 'ax ssh' connects to
     svc/atenet-router:443 over mTLS.

5. E2E setup CLI migration to cmd/ate-setup:
   - Substrate v0.6.0 replaced the standalone install-ate-kind.sh logic with a
     thin wrapper around 'go run ./cmd/ate-setup', requiring the 'deploy ate-system'
     subcommand, explicit '--credential-provider', '--ateapi-authz-bootstrap-owners'
     (to authorize ax-server's ServiceAccount alongside ate-client), and
     '--ingress-allowed-spiffe-ids' (to permit ax-server's SPIFFE ID at the
     Envoy router).
   - Update hack/setup-e2e-kind.sh to pass the new ate-setup flags and raise
     fs.inotify.max_user_instances on the Kind node.

Signed-off-by: siyuanfoundation <[email protected]>

@mayawang mayawang left a comment

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.

Thanks @siyuanfoundation, big upgrade and tests pass on main including e2e. Approving. Two notes for follow-ups: tasks without limits now get 1 CPU / 512 MiB by default, which is worth documenting (and maybe configurable, since active coding agents can need more); and with SandboxConfig gone, choosing gVisor vs microVM now only works through the worker selector, so #344 and #368 become the same piece of work.

@siyuanfoundation
siyuanfoundation merged commit 353f650 into google:main Oct 27, 2026
10 checks passed
siyuanfoundation added a commit to siyuanfoundation/ax that referenced this pull request Oct 28, 2026
…ne integration (google#517)

Upgrade agent-substrate from v0.5.0 to v0.6.0 and adapt AX's Substrate
client, controller, CLI, manifests, and E2E harness to the breaking
changes introduced in Substrate v0.6.0:

1. Module path rename (github.com/agent-substrate/substrate -> go.ate.dev/substrate):
   - Substrate v0.6.0 moved its canonical Go module path to go.ate.dev/substrate
     and dropped pkg/sandboxclass.
   - Update go.mod, go.sum, and all ateapipb imports across internal/substrate,
     internal/controller, and test/e2e.

2. ActorTemplate resource requirements and proto removals:
   - Substrate v0.6.0 replaced the repeated ResourceLimit slice on ActorTemplate
     with ResourceRequirements{Limits: Resources{CpuMillicores, MemoryBytes}}
     and enforces in ate-api-server validation that every ActorTemplate sets
     both non-zero cpu_millicores and memory_bytes. It also removed
     ActorTemplate.SandboxConfig and DeleteActorRequest.AnyState.
   - Add v1alpha1.ParseCPUMillicores and v1alpha1.ParseMemoryBytes to convert
     Kubernetes resource quantity strings to int64 millicores and bytes.
   - Update substrate.ResourceLimits, BuildActorTemplate, and
     EnsureActorTemplateWithImage to populate *ateapipb.ResourceRequirements,
     defaulting unset CPU/memory dimensions to DefaultCPUMillicores (1000m) and
     DefaultMemoryBytes (512Mi).

3. Worker binary rename (cmd/ateom-gvisor -> cmd/ateworker-gvisor):
   - Substrate v0.6.0 renamed the gVisor worker entrypoint from cmd/ateom-gvisor
     to cmd/ateworker-gvisor.
   - Update test/e2e/manifests/workerpool.yaml to use
     ko://go.ate.dev/substrate/cmd/ateworker-gvisor.

4. Dataplane (atenet-router) mandatory mTLS on port 443:
   - Substrate v0.6.0 removed plaintext port 80 from atenet-router and now
     serves ingress exclusively over mTLS on port 443 using certificates signed
     by servicedns.podcert.ate.dev/identity (server) and
     podidentity.podcert.ate.dev/identity (client SPIFFE ID).
   - Mount the podidentity.podcert.ate.dev/identity projected volume into
     ax-server (deploy/ax-server.yaml and test/e2e/manifests/ax-server.yaml),
     configure ATENET_ROUTER_ADDR to https://atenet-router.ate-system.svc.cluster.local:443,
     and update the task reconciler's readiness probe client to present the
     podidentity client certificate and verify the servicedns trust bundle.
   - Add guest.DialTargetTLS and tunnel.RouterTLSConfig (which loads the live
     servicedns ClusterTrustBundle and issues/caches a short-lived
     PodCertificateRequest for ax-server) so 'ax ssh' connects to
     svc/atenet-router:443 over mTLS.

5. E2E setup CLI migration to cmd/ate-setup:
   - Substrate v0.6.0 replaced the standalone install-ate-kind.sh logic with a
     thin wrapper around 'go run ./cmd/ate-setup', requiring the 'deploy ate-system'
     subcommand, explicit '--credential-provider', '--ateapi-authz-bootstrap-owners'
     (to authorize ax-server's ServiceAccount alongside ate-client), and
     '--ingress-allowed-spiffe-ids' (to permit ax-server's SPIFFE ID at the
     Envoy router).
   - Update hack/setup-e2e-kind.sh to pass the new ate-setup flags and raise
     fs.inotify.max_user_instances on the Kind node.

Signed-off-by: siyuanfoundation <[email protected]>
siyuanfoundation added a commit to siyuanfoundation/ax that referenced this pull request Oct 28, 2026
Substrate v0.6.0 requires every ActorTemplate to specify non-zero CPU and
memory limits (google#517). Update the 'Sizing the sandbox' section in
docs/manifests.md and the ValidateResources doc comment in
pkg/apis/v1alpha1/resources.go to reflect that omitted CPU and memory
limits default to 1 CPU (1000m) and 512Mi memory.

Signed-off-by: siyuanfoundation <[email protected]>
siyuanfoundation added a commit that referenced this pull request Oct 28, 2026
Substrate v0.6.0 requires every ActorTemplate to specify non-zero CPU and
memory limits (#517). Update the 'Sizing the sandbox' section in
docs/manifests.md and the ValidateResources doc comment in
pkg/apis/v1alpha1/resources.go to reflect that omitted CPU and memory
limits default to 1 CPU (1000m) and 512Mi memory.

Signed-off-by: siyuanfoundation <[email protected]>
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.

3 participants