Repository navigation
Description
Workspace git clones never work on Substrate with egress enabled. The task still comes up Ready, just without its repo.
Why
Substrate turns on an actor's egress only after its wakeup probe passes (ateom-gvisor calls tunnel.Activate after wakeupprobe.WaitAll). AX sets the wakeup probe to /readyz, which returns 503 until workspace setup is done, and setup is what clones the repos. So the clone always runs before the actor has any network. atunnel closes the connection and git fails:
fatal: unable to access 'https://github.com/chalk/chalk.git/': GnuTLS, handshake failed: The TLS connection was non-properly terminated.
After five retries SetupWorkspace gives up but returns nil, so the runner marks the workspace ready anyway. The probe passes, egress comes up, and the command starts. ax describe shows WorkspaceReady=True with nothing checked out. A git ls-remote from ax ssh a few seconds later works with the same egress policy, so it's not the policy.
Repro
kind with Substrate f6a1dc72 (the version in go.mod), a Workspace with any public repo in spec.git, and an egress policy on the task's actor allowing github.com (tlsPassthrough, port 443). Resume the task and check the runner logs for git fetch error (continuing setup).
Fix
I have a fix on my fork: zlareb1@1daf54a (branch fix-workspace-egress). It's small:
- the wakeup probe uses
/healthz, so egress is up during setup. The reconciler already polls/readyzitself forWorkspaceReady, so that condition is unchanged; SetupWorkspacereturns an error when a repo fails to fetch, so a failed clone isn't reported ready. The marker is still skipped, so the next boot retries;- the readyz poll in
Reconcilestops 2s before the caller's deadline. Without this, resuming a task whose workspace stays unready fails withupdating task status: getting task from redis: context deadline exceeded, since the poll takes the full 15sax resumeallows.
With it, the repo clones on the first try and the task is Ready. A repo that doesn't exist leaves WorkspaceReady=False (the command still starts), and ax resume returns normally in both cases. go test ./... passes and each new test fails without its fix.
I'd have opened a PR, but external PRs aren't accepted right now (#448), so I'm raising it here instead. Happy to open the PR once contributions are open, or feel free to pick up the commit directly.
Activity
Count a run's turns by their own time, time it on the server, and clo…
mayawang commentedon Oct 15, 2026
Thanks @zlareb1. This looks like the same root cause as #427 (workspace clones run before egress is allowed), so I'll link them. It's part of the workspace setup work on the roadmap.
mayawang commentedon Oct 15, 2026
Correction to my earlier note: same symptom as #427, but a different cause. Here egress waits on the wakeup probe, and /readyz waits on setup. Both are part of the workspace setup work, and #449 (AX never creates an egress policy) is needed alongside either fix.
Add run budgets and an example of Loom on AX, and drop the changelogs (…
zlareb1 commentedon Oct 16, 2026
@mayawang would it be possible to apply my merge my commit or you would take it up separately later?
mayawang commentedon Oct 16, 2026
Thanks @zlareb1. PRs are limited to collaborators for now (see #448). If you link the branch on your fork here, we can open the PR from it with your commit, alongside the egress policy work in #449.
zlareb1 commentedon Oct 16, 2026
Thanks @mayawang. Here is my branch: main...zlareb1:ax:fix-workspace-egress
fix: give workspace setup network access
fix: give workspace setup network access
rakyll commentedon Nov 25, 2026
Fixed: with the push model, /readyz passes while the runner waits, so egress is up before setup runs (#688).
We are closing this as part of a cleanup after the significant changes in v0.4.0, because it is probably obsolete or out of scope now. If you think this is a mistake, please reopen it (or leave a comment if you can't reopen it).