Repository navigation
Conversation
Fixes #722. `RUN_LIVE_STEPS=1 ./hack/hero-demo/run.sh` hung in Steps 3, 4 and 5: `finish_task` waited for `ax describe task` to report `Completed` or `Failed` with `Output:`, but since #688 nothing sets either, and `COMPLETED` is reserved until #690. Tasks stay `Running` with no `status.outcome` after their command exits. This change only touches `hack/hero-demo/`. ## Manifests - `task-starter.yaml` sets `spec.commands` to a wrapper around the image's launcher (`/usr/local/bin/ax-launcher`, or `ax-harness` on images from before the rename). Commands still get the goal, config, MCP and session files of the launcher contract. The wrapper writes the launcher's exit status to `/workspace/.ax/hero-demo-exit-code`, and does not run the agent again once a status is recorded. This also avoids depending on the runner's `launcher-done` marker, which the runner cannot write (root without `CAP_DAC_OVERRIDE` in a UID 1000-owned `/workspace/.ax`). - `task-custom.yaml` writes the unit test output to `$AX_OUTPUT_FILE` and its exit status to the same file. ## run.sh - `finish_task` waits for the exit-code file over `ax ssh` (both tasks set `spec.debug`), fails on a non-zero status and shows the end of the output, and fails when `/workspace/.ax/output` is empty. - `ax ssh` calls take the global ax flags, so Step 5 reads the sandbox on `--context <remote>`. - Steps 3 and 5 fail fast when `kubectl` reports the `hero-demo-gemini` Secret as NotFound, instead of the agent getting `403 egress denied` while the task reads `Running`. - Comments and the README no longer say a finished task refuses suspend/resume. ## Not in this PR - The runner's `launcher-done` permission bug, which still makes a resumed task without `spec.commands` run its launcher again. - Reporting completion from AX itself (#690). ## Testing - `RUN_LIVE_STEPS=1 AX_TIMEOUT=300 ./hack/hero-demo/run.sh` on an `ax local` cluster built from `33b93cf`: Step 2 and Step 4 PASS, Step 3 runs the agent to completion (it added `subtract` and its test, exit status 0, output written); Steps 1, 3 and 5 report their existing STUBs. - The dry run (no `RUN_LIVE_STEPS`) is unchanged. - With a fake `ax` CLI: agent failure, empty output, missing Secret, failing unit tests, and Step 5 with `--context` each give the expected scoreboard line.
Member
Author
|
Thanks! Updated the description to point to #740 for the |
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 #722.
RUN_LIVE_STEPS=1 ./hack/hero-demo/run.shhung in Steps 3, 4 and 5:finish_taskwaited forax describe taskto reportCompletedorFailedwithOutput:, but since #688 nothing sets either, andCOMPLETEDis reserved until #690. Tasks stayRunningwith nostatus.outcomeafter their command exits.This change only touches
hack/hero-demo/.Manifests
task-starter.yamlsetsspec.commandsto a wrapper around theimage's launcher (
/usr/local/bin/ax-launcher, orax-harnessonimages from before the rename). Commands still get the goal, config,
MCP and session files of the launcher contract. The wrapper writes the
launcher's exit status to
/workspace/.ax/hero-demo-exit-code, anddoes not run the agent again once a status is recorded. This also
avoids depending on the runner's
launcher-donemarker, which therunner cannot write (root without
CAP_DAC_OVERRIDEin a UID1000-owned
/workspace/.ax).task-custom.yamlwrites the unit test output to$AX_OUTPUT_FILEand its exit status to the same file.
run.sh
finish_taskwaits for the exit-code file overax ssh(both tasksset
spec.debug), fails on a non-zero status and shows the end of theoutput, and fails when
/workspace/.ax/outputis empty.ax sshcalls take the global ax flags, so Step 5 reads the sandboxon
--context <remote>.kubectlreports thehero-demo-geminiSecret as NotFound, or the Secret lacks the
ax.io/credential=truelabel, instead of the agent getting
403 egress deniedwhile the taskreads
Running.suspend/resume.
Not in this PR
launcher-donepermission bug, which still makes aresumed task without
spec.commandsrun its launcher again: runner: launcher-done marker fails with permission denied #740.Testing
RUN_LIVE_STEPS=1 AX_TIMEOUT=300 ./hack/hero-demo/run.shon anax localcluster built from33b93cf: Step 2 and Step 4 PASS, Step 3runs the agent to completion (it added
subtractand its test, exitstatus 0, output written); Steps 1, 3 and 5 report their existing STUBs.
RUN_LIVE_STEPS) is unchanged.axCLI: agent failure, empty output, missing Secret,failing unit tests, and Step 5 with
--contexteach give the expectedscoreboard line.