Repository navigation
Conversation
Member
Author
|
We will bring |
yongruilin
reviewed
Nov 23, 2026
mayawang
approved these changes
Nov 23, 2026
mayawang
left a comment
Collaborator
There was a problem hiding this comment.
LGTM on the TaskState alignment and mirror test. Agree with @yongruilin on splitting the hero-demo change to land with #722.
TaskState values 1-7 now have the same names and numbers as Substrate's ActorState and are read from the task's actor without renaming: RUNNING (was WORKING), RESUMING and REVERTING (were QUEUED), CRASHED (was FAILED), and DELETING (was UNSPECIFIED). AX's own stored states start at 200, with 8-199 reserved for ActorState values Substrate may add: QUEUED (200) and FAILED (201), which are still needed until #698 and #695 land, and COMPLETED (202), reserved for #690. IDLE, REQUIRES_ACTION and CANCELLED are removed. Nothing set them. isExecutionTerminal is removed: no state it checked can be reached. Fixes #708
IsAXTaskState includes TASK_STATE_COMPLETED, so cover it in the loop of stored states.
Member
Author
|
Removed the hero demo fixes from the PR. We will follow up on that fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #708.
TaskStateused to rename and collapse Substrate'sActorStateon read (RUNNING→WORKING,RESUMING/REVERTING→QUEUED,CRASHED→FAILED,DELETING→UNSPECIFIED) and defined AX-only states that nothing set. This PR makesTaskStatemirrorActorStateand keeps only the AX states that current behavior needs.API (
pkg/apis/v1alpha1/task.proto)RESUMING,RUNNING,SUSPENDING,SUSPENDED,CRASHED,DELETING,REVERTINGActorStateActorStatevalues Substrate may addQUEUEDFAILEDCOMPLETEDTODO(#690); nothing sets it yetIDLE,REQUIRES_ACTION,WORKINGandCANCELLEDare removed.Breaking: enum numbers changed. Stored tasks are protojson, so states are stored by name, and the stored names
QUEUEDandFAILEDare unchanged.Server and CLI
actorTaskStatemaps eachActorStateto theTaskStateof the same name.IsAXTaskStatecoversQUEUED,FAILEDandCOMPLETED.FormatTaskStateprintsRunning,Crashed,Deleting, and so on.isExecutionTerminalis removed: it checkedCOMPLETED,CANCELLEDandFAILEDwith an outcome, none of which the server sets.ax sshrequires the task to beRunning.TestActorTaskStateMirrorsActorStatefails if the enums drift apart or an AX-only state goes below 200.TestStoredStatuscovers everyIsAXTaskStatestate.Docs
docs/concepts.md,docs/local_installer.mdandREADME.mduse the new state names.Not in this PR
The hero demo (
hack/hero-demo/) still waits for aCompletedstate that nothing sets. Its fix moves to #722, together with the runner'slauncher-donepermission fix.Testing
make verify,go build ./cmd/ax ./cmd/ax-server ./cmd/ax-runnerandgo test ./...pass.