mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-10 10:13:50 +08:00
Fixes #1507 Golden snapshots currently remain owned by the temporary golden actor, so another resume/suspend cycle or actor deletion can collect a snapshot still referenced by its template. The controller now copies the warmed snapshot into a published tag, deletes the golden actor, and records the tag reference on the template. Interrupted tag creation and cleanup remain retryable; template deletion cleans up both resources. `CreateActor` resolves an explicit `sourceTag` or the template's golden tag into the actor's initial snapshot. Actors created before the golden tag is ready retain their cold-boot behavior. The golden tag uses the template UID as its name in `ate-golden`. The proto replaces `golden_snapshot` with `golden_tag` at field 1, without backward compatibility. This PR is based directly on `main` and does not depend on #1521. Follow-up recommendation: move the create → resume → wait → suspend → tag → delete sequence into a golden-template workflow using the existing workflow conventions. The reconciler now coordinates multiple recoverable steps; it could retain scheduling and retries while delegating that sequence to the workflow. This refactor is outside this PR. - [x] Tests pass - [x] Appropriate changes to documentation are included in the PR Validation: full `env -u NO_COLOR make verify` passed after rebasing onto `main`. After the final proto field-number change, bindings were regenerated and the control API unit/functional tests plus proto-format and Go-format checks passed. --------- Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>