You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TaskStatus reports how a task ended in several overlapping places. With the push runner (#686), nothing outside the sandbox writes most of them. We don't trust anything an actor reports, so the control plane should only report what it can observe from Substrate.
Redundant
TaskResult (SUCCEEDED/FAILED/CANCELLED) maps one to one onto the terminal TaskState values (COMPLETED/FAILED/CANCELLED). Non-test code never sets it, and only ax describe reads it (cmd/ax/task.go).
TaskStatusDetail and TaskStatusReason (PROVISIONING_FAILED, SANDBOX_CRASHED) duplicate the Ready condition's reason and message. On a crash, internal/server/server.go writes the same message to both. TaskStatusDetail also outlives the failure, while conditions are recomputed from Substrate on every read.
TaskOutcome.status (google.rpc.Status) is a third place for the same failure.
Not written with the push runner
TaskOutcome (result, status, exit_code, output). Only the pull runner reported it. ax promote uses Outcome != nil to decide whether a task finished (cmd/ax/promote.go).
attempt is always 1, and previous_failure is never set. Both only make sense with spec.retry, which is rejected.
resolved_argv is copied from spec.commands only, so the documented fallback to the image's ENTRYPOINT + CMD never happens.
Proposal
Remove TaskResult, TaskStatusDetail, and TaskStatusReason. Terminal TaskState plus the Ready condition (reasons such as ProvisioningFailed and SandboxCrashed) become the single answer to how a task ended.
Remove TaskOutcome, attempt, and previous_failure until something trusted can fill them in. If we want exit codes or output, Substrate should observe them; the runner should not report them.
Remove resolved_argv, or document it as spec.commands only.
Switch ax promote to check for a terminal TaskState, and update ax describe and docs/manifests.md.
v1alpha1 is pre-release, so field numbers can be reused, as in #605.
Activity