agent-substrate / agent-substrate/substrate

Some improvements to ActorTemplate

Open
#16 11 comments 0 reactions 1 assignee Claimed by @juli4n View on GitHub
area/api kind/feature prio/P0
Dominant language
Go
Stars
1.8k
Forks
316
Avg merge
2d 43m
Merged PRs (30d)
287

Description

There are a few cases where updating / deleting ActorTemplate resources can lead to a broken system.

* Deleting an `ActorTemplate` that is currently in use by an actor breaks the `ResumeActor` and `SuspendActor` RPCs.
* If an `ActorTemplate` is updated, the golden snapshot becomes stale and actors using the template diverge. Although `ActorTemplate`s are conceptually immutable, this is not enforced today.
* Deleting an `ActorTemplate` leaks its associated golden actor.

We should discuss whether we want to allow an actor to outlive its template. Assuming we don't, a possible path forward would be:

* The Substrate controller manages `ActorTemplate` resources.
* `ActorTemplate`s are immutable (enforced via CEL validation).
* Each `ActorTemplate` owns the lifecycle of a “golden actor”. The golden actor is created when the template is created, and deleted when the template is deleted.
* An `ActorTemplate` cannot be deleted if there are actors using it (this will require `ate-apiserver` to expose an efficient way to check if there are active actors referencing a given template).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.