Skip to content

ateapi: stamp the golden tag into the created Actor's source_tag - #2290

Open
Luomu (cloudonly) wants to merge 2 commits into
agent-substrate:mainfrom
cloudonly:create-actor-golden-source-tag
Open

Luomu (cloudonly) wants to merge 2 commits into
agent-substrate:mainfrom
cloudonly:create-actor-golden-source-tag

Conversation

@cloudonly

@cloudonly Luomu (cloudonly) commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Refs #2210

CreateActor already borrows the template's golden snapshot when the caller omits source_tag, but the stored Actor does not name the tag it used. Record the golden tag in the stored Actor's source_tag so snapshot provenance is visible through the API and kubectl ate get actor.

Apply the default to a copy of the request. Explicit source tags keep their existing behavior, and successful and rejected calls leave the caller's message unchanged. Golden tags use the template's atespace and preserve their MEMORY, VOLUMES, or ROOTFS fidelity.

Whole-object UpdateActor requests must retain the recorded source_tag under the existing immutability rule. The API guide and proto field comment describe the default.

This records provenance only. Resume still resolves the template, and template deletion deletes its golden tag and releases the snapshot; recording source_tag does not preserve that snapshot after template deletion.

Validation

Based on main d2b97509, which includes the golden atespace and fidelity changes. Regression coverage includes default and explicit tags, request immutability on success and failure, VOLUMES/ROOTFS snapshot fidelity, and creation without a golden snapshot.

Passed locally with Go 1.27.1:

  • git diff --check.
  • Dependency boundary, boilerplate, code generation, Go modules/vendor consistency, and gofmt checks from hack/verify-all.sh.
  • All five benchmarking Python suites: 147 tests plus 34 subtests.

The controlapi package compiled with race instrumentation. The local test run did not reach execution: test-binary linking was stopped under host memory and disk pressure. Docker, required by the PostgreSQL-backed tests, is also unavailable on this host. The full race suite, remaining lint/verifier checks, and runtime cluster E2E have not been completed for this revision.

The PR test workflow requires maintainer approval before its jobs can run.

Latest rebase (2026-10-23): rebased onto main 4ebd668d at f36c2a8f. Focused race regressions passed three shuffled runs; affected binaries and test packages compiled. Earlier validation entries describe prior revisions. Cluster E2E was not rerun. Codex assisted with this rebase and validation.

@cloudonly

Copy link
Copy Markdown
Contributor Author

Julian Gutierrez Oschmann (@juli4n) gentle ping — this implements #2210 under the GA lifecycle umbrella #2069. It's rebased on latest main (no conflicts) and CI is green. Could you take a look when you have a cycle, or suggest a better reviewer? Happy to adjust scope if it helps.

@cloudonly
Luomu (cloudonly) force-pushed the create-actor-golden-source-tag branch 4 times, most recently from bc9821c to 94d8c2b Compare October 20, 2026 00:50
@cloudonly

Copy link
Copy Markdown
Contributor Author

Zoe Zhao (@zoez7) could you review this when you have time? It records the template's golden tag in the created Actor's source_tag for #2210. Validation details are in the PR description.

Creating an Actor from a template with a golden snapshot borrows the
golden tag's snapshot into Status.ExternalSnapshot without recording
which tag it borrowed. The template's golden_tag pointer was the only
record of that reference, so deleting the template left never-resumed
actors with no way to name their snapshot source.

Default the request's source_tag to the template's golden tag so the
stored Actor carries the reference itself. The stamp is applied to a
copy of the request, so the caller's message and the RPC log keep
reflecting what was sent. Explicit source tags and golden-scope
validation are unchanged.

Recording the reference also tightens updates: a whole-object
UpdateActor that omits source_tag on such an Actor now fails the
existing immutability rule. Resume still resolves the template
unconditionally, so consuming the recorded reference is future work.
@cloudonly
Luomu (cloudonly) force-pushed the create-actor-golden-source-tag branch from 94d8c2b to f36c2a8 Compare October 23, 2026 08:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api-machinery area/scheduling kind/bug Something isn't working / bugfixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants