Skip to content

Add status fields to Substrate resources - #1025

Draft
Julian Gutierrez Oschmann (juli4n) wants to merge 3 commits into
agent-substrate:mainfrom
juli4n:status_field
Draft

Add status fields to Substrate resources#1025
Julian Gutierrez Oschmann (juli4n) wants to merge 3 commits into
agent-substrate:mainfrom
juli4n:status_field

Conversation

@juli4n

@juli4n Julian Gutierrez Oschmann (juli4n) commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Add status fields to all Substrate resources that need it. Move server-owned fields under it. Skip ActorTemplate and ActorTemplateVersion as those are still in-flux.

Partially fixes #1006 .

@thockin

Tim Hockin (thockin) commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Nevermind, I see.

What is "partial" about this?

@thockin Tim Hockin (thockin) 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.

LGTM overall - as you said "mechanical"

// once at creation and immutable afterward.
ObjectRef source_snapshot_tag = 6;

ActorStatus status = 7;

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.

Should we give status a high tag number (e.g. 1024)? Presumably we are going to add more fields in these resources. ISTR the tags are encoded as varint, so that has some downside...

}

message ActorStatus {
enum State {

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.

Aside: the resulting Go names for these are awful - WDYT about moving this to a file-level ActorState ?

string actor_template_uid = 7;
SnapshotContentScope content_scope = 8;
string snapshot_uri = 9;
// Immutable reference to the actor_template_version where the snapshot was created from.

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.

You lost the only comment in this whole section

Comment thread docs/architecture.md
3. **Hydration**: The `atelet` supervisor coordinates with the `ateom` process inside the worker pod to restore the ActorTemplate's golden `ActorSnapshot` (for first-run) or the Actor's latest `ActorSnapshot` (for recurring runs) into the sandbox.

4. **Status**: Status transitions to `STATUS_RUNNING`. The actor now has an
4. **Status**: Status transitions to `STATE_RUNNING`. The actor now has an

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.

State?

if actor.Status != ateapipb.Actor_STATUS_SUSPENDED {
t.Errorf("expected actor status to be SUSPENDED, got %v", actor.Status)
if actor.Status.State != ateapipb.ActorStatus_STATE_SUSPENDED {
t.Errorf("expected actor status to be SUSPENDED, got %v", actor.Status.State)

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.

state

I found a few of these, I am sure it's not all of them. Maybe git grep -i 'actor.*status' and see what hits?

Comment thread docs/architecture.md
3. **Reclaim**: The physical worker is wiped and returned to the `WorkerPool`.

4. **Status**: Status transitions back to `STATUS_SUSPENDED`, now pointing to
4. **Status**: Status transitions back to `STATE_SUSPENDED`, now pointing to

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.

State

// phase string the UI's badge logic understands (running / suspended
// / etc).
func actorStatusString(s ateapipb.Actor_Status) string {
func actorStatusString(s ateapipb.ActorStatus_State) string {

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.

actorStateString

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.

Encapsulate all output-only fields into a top-level status field

2 participants