Repository navigation
Runner pull agent - #637
Merged
Merged
Conversation
mayawang
reviewed
Nov 17, 2026
mayawang
left a comment
Collaborator
There was a problem hiding this comment.
Great progress, the privilege drop and event loop look solid. Two things before merge:
- Resume lockout: task actors snapshot volumes only, so /var/lib/ax (token + state) is gone after resume. The runner then claims with no token and a new nonce, Claim returns Unauthorized because the token is already confirmed, and it retries forever, so suspend/resume (and any follow-up after completion) never runs again. Needs a decision across #633/#635: re-mint per actor incarnation/resume, or persist somewhere that survives.
- /workspace/.ax is owned by uid 1000, so the agent can symlink .ax/output to /var/lib/ax/runner_token (or any root file) and the root runner ships it as CommandExited.output. Open with O_NOFOLLOW + owner check, or read as uid 1000.
Non-blocking: could we drop the /workspace/.ax goal/config copies and keep #621's /run/ax files as the one source?
itssimrank
force-pushed
the
runner-http-handler
branch
2 times, most recently
from
November 17, 2026 23:45
ae2485f to
291f5d8
Compare
itssimrank
force-pushed
the
runner-pull-agent
branch
from
November 18, 2026 01:08
70c59ed to
a16c12d
Compare
itssimrank
force-pushed
the
runner-pull-agent
branch
from
November 18, 2026 01:10
a16c12d to
f7814bd
Compare
mayawang
approved these changes
Nov 18, 2026
mayawang
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, the O_NOFOLLOW + owner check and dropping the .ax copies look right, LGTM. The resume lockout is covered by #639's token reset, so these two should land together. Also heads up, #639's E2E shows ax ssh/guest exec 404ing, which looks like pull mode never starting the spec.debug guest services.
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.
Summary
Stacked on #635. Adds the pull-based runner loop to
ax-task-runner(runner/pull.go) while preserving legacyAX_TASK_YAML/--task-filemode for existing tests.Key Changes
runner/pull.go,runner/output_buffer.go: Claims assignments on:80/readyzwakeup, persists/var/lib/ax/{runner_token,state.json}keyed by/run/ate/actor-uid, executesSETUP/RUN/RESUME/IDLE, writes/workspace/.ax/{goal.md,config.json}and launcher contract files, drops to UID1000when running as root, and reportsCommandStarted/CommandExited($AX_OUTPUT_FILEor 64 KiB stdout/stderr tail).internal/metadata/server.go: AddsOnReadyzwakeup hook,UpdateAssignment, andGET /metadata/v1alpha1/ax/goal.runner/runner.go,cmd/ax-task-runner/main.go: EnablesPullModewhenAX_TASK_YAMLand--task-fileare both unset.Testing
go test -count=1 ./internal/metadata/... ./runner/...(includingTestPullModeTaskRunAndCompletionandTestPullModeWorkspaceSetup)go build ./cmd/ax-task-runnergolangci-lint run ./internal/metadata/... ./runner/... ./cmd/ax-task-runner/...(0 issues)