Skip to content

Mirror systemInfo volumes into the ActorTemplate substrate resource - #1134

Merged
Zoe Zhao (zoez7) merged 2 commits into
agent-substrate:mainfrom
thompsonmax:si-substrate-resource
Aug 26, 2026
Merged

Mirror systemInfo volumes into the ActorTemplate substrate resource#1134
Zoe Zhao (zoez7) merged 2 commits into
agent-substrate:mainfrom
thompsonmax:si-substrate-resource

Conversation

@thompsonmax

@thompsonmax Max Thompson (thompsonmax) commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Part of #1131.

The substrate ActorTemplate's Volume union (#824, #1026) predates the systemInfo volume source (#803, trustBundle in #941): it only had durableDir and externalVolumeTemplate, so a template created through the substrate API could not carry SystemInfo projections. This PR adds:

  • SystemInfoVolumeSource with the actorMetadata and trustBundle data sources, mirrored from the CRD types in the plain-field union shape (Remove oneofs from ate-apiserver API #962) that Volume already uses ("SystemInfo" joins the type discriminator).
  • Declarative validation tags (Use Kubernetes declarative validation #1215) mirroring the CRD's kubebuilder rules: the SystemInfoDataSource one-of union, list bounds, string lengths, and unique projected fields, with generated validators and tests in controlapi.
  • Store contract round-trip coverage: the shared fixture now carries a systemInfo volume through both the redis and postgres backends.

Not in this PR (tracked in #1131): the CRD's cross-item CEL rules (duplicate paths across data sources, at most one actorMetadata entry) and the clean-relative-path checks, which have no declarative tag equivalent and belong in the controlapi create/update handlers when ActorTemplate serving lands (#477), and conversion of the substrate resource in the actor-start path.

The substrate ActorTemplate (agent-substrate#824, aligned with the CRD in agent-substrate#1026) predates
the systemInfo volume source (agent-substrate#803, trustBundle in agent-substrate#941): its Volume union
had only durableDir and externalVolumeTemplate. Add systemInfo with the
actorMetadata and trustBundle data sources, following the plain-field union
shape (agent-substrate#962), and extend the store contract fixture so round-trips cover it.

The resource is schema+storage only today (no controlapi handlers), so the
CRD's CEL validation and defaulting move to the create/update path when
serving lands.
Comment thread pkg/proto/ateapipb/ateapi.proto
Mirror the CRD's kubebuilder rules onto the new ateapi.proto fields as
+k8s: declarative validation tags (agent-substrate#1215): the SystemInfoDataSource
one-of union, list bounds, string lengths, and unique projected fields.
The cross-item CEL rules (duplicate paths across data sources, at most
one actorMetadata entry) have no tag equivalent and stay with the
controlapi handlers (agent-substrate#1131).

CreateActorTemplateRequest.actor_template, ActorTemplate.volumes, and
Volume.system_info gain optionality tags because validation-gen's lint
requires them on every field on the path to a validated field; the rest
of ActorTemplate stays untagged for now.

@zoez7 Zoe Zhao (zoez7) 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.

Approved. waiting for tests to pass.

@zoez7
Zoe Zhao (zoez7) merged commit 843ca20 into agent-substrate:main Aug 26, 2026
9 checks passed
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