Repository navigation
task: update v1alpha1 Task and ObjectMeta schema and update codebase - #587
Conversation
yongruilin
left a comment
There was a problem hiding this comment.
The critical one is for the new Task State: TASK_STATE_QUEUED now means 2 cases which may have potential risk..
mayawang
left a comment
There was a problem hiding this comment.
Big step, nice to see the Sobi-aligned states land. One ask before approving: this reuses field numbers with new meanings (e.g. TaskSpec 1 was image string, now profile; TaskStatus 1 was phase, now actor). Both are length-delimited, so an older ax CLI against a new server gets misparsed instead of a clean error. Could we reserve the old numbers/names and give the new fields fresh ones? Also worth a release note that existing stored tasks lose image/command/resources and need recreating.
We should still allow breaking changes on the v1alpha1 API for now. |
|
Totally agree on breaking changes, not asking to keep compatibility. Reserving the old numbers still breaks old clients, it just makes them fail cleanly instead of silently misreading a string as a message. Cheap to do while we're renumbering anyway |
e97240a to
ae25e6e
Compare
Thanks for pointing this out. Added reserved field numbers. But we don't have releases/release notes yet. Adding them in plain docs also seems out of the context. So I think just cli apply error should be fine. |
mayawang
left a comment
There was a problem hiding this comment.
Thanks, the reserved numbers look right. Fair on release notes, LGTM
* examples: add the v0.1 hero demo harness Add examples/hero-demo/, one script and three manifests for the 5-step v0.1 hero demo, so each step's DRI wires their piece into run.sh on main instead of keeping a separate demo branch. - run.sh runs the five steps in order and prints a scoreboard (PASS / STUB / FAIL). By default it makes no cluster calls. With RUN_LIVE_STEPS=1 it runs what works on main today: ax get workspaces, ax apply of both manifests, and resume/suspend/resume of the starter task; with --remote-context it applies the manifests to that cluster. Everything else is a STUB with a TODO(@owner). - workspace.yaml, task-starter.yaml and task-custom.yaml use the v1alpha1 schema on main (metadata.atespace, spec.profile and spec.setup on Workspace, spec.image/command/resources/workspace on Task; the starter goal goes in spec.config.prompt until #587). - The setup test is a unittest.TestCase, so the custom task's python3 -m unittest discover finds it without pytest. Verification: ./examples/hero-demo/run.sh # prints the scoreboard, exit 0 ./examples/hero-demo/run.sh --step 3 RUN_LIVE_STEPS=1 AX_BIN=<ax> ./examples/hero-demo/run.sh --remote-context <ctx> The manifests decode with the strict v1alpha1 YAML decoder and pass ValidateWorkspace/ValidateTask. Live mode was exercised against stub ax binaries, not a real cluster. * hack: move the hero demo harness out of examples examples/ is where developers learn AX, and this is a development harness that stays mostly stubs until its pieces land, so it moves to hack/hero-demo/ next to the other dev and CI scripts. - The README now just says what the harness does and how to run it. - TODOs name GitHub handles; Step 2 (warm snapshots) is YoyinZyc. - The starter image is a registry.example.com placeholder, and the workspace uses the server's default task image, instead of unpublished image names. Verification: ./hack/hero-demo/run.sh # prints the scoreboard, exit 0 ./hack/hero-demo/run.sh --step 2 RUN_LIVE_STEPS=1 AX_BIN=<ax> ./hack/hero-demo/run.sh --remote-context <ctx> The manifests still decode with the strict v1alpha1 YAML decoder and pass ValidateWorkspace/ValidateTask. Live mode was exercised against stub ax binaries, not a real cluster. * hack: name the Step 3 and Studio owners, and use a starter image placeholder TODOs now name aprajitaarora13 for the Session turn and Raji14 for the Studio health check. The starter image is <starter-image>@sha256:<digest>, pointing at github.com/agentexecutor/images, until the first digest is published. Verification: ./hack/hero-demo/run.sh # prints the scoreboard, exit 0 The manifests still decode with the strict v1alpha1 YAML decoder and pass ValidateWorkspace/ValidateTask.
- Update ObjectMeta in common.proto with uid, labels, owner, update_time,
and delete_time.
- Update TaskSpec and TaskStatus in task.proto to match the v1alpha1 API
design (profile, commands, goal, retry, session_id; state, status_detail,
outcome, attempt, ate_actor_template, generation, resolved_argv,
previous_failure), omitting deferred fields and removing deprecated
spec.{image,command,resources} and status.{phase,id,worker_ip}.
- Keep TaskStatusReason minimal (UNSPECIFIED, PROVISIONING_FAILED,
SANDBOX_CRASHED) and add buf.build/googleapis/googleapis for
google/rpc/status.proto.
- Replace field-level MergeProfile with whole-profile EffectiveProfile so
Task.spec.profile is used as-is when set and falls back to
Workspace.spec.profile only when omitted; document warm vs. cold startup
semantics across protos, Go docstrings, and docs/manifests.md.
- Adapt validation, memory/postgres stores, controller, server, runner,
claude-code-runner, CLI, E2E harness, examples, and docs end to end.
Signed-off-by: siyuanfoundation <[email protected]>
Signed-off-by: siyuanfoundation <[email protected]>
ae25e6e to
250e488
Compare
Part of #563
I left some fields out like
Budgetandstart_timebecause they are not necessary for 0.1 and we can add them incrementally.This just updates the proto and make existing codes functional with the changes. Task still creates one template per task.