Pull worker image on demand at spawn, with progress in the workspace-creation UI #38
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lz/agent-nexus#38
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Spun out of #37. Once the claude-session probe no longer depends on the worker image (the #37 fix makes onboarding read the volume directly), the only place a worker image must exist locally is the actual worker spawn. That's where image availability should be handled.
Problem
Today
spawnWorkerinspects the configuredworker_imageand throwsworker image '…' not found locallyif it's absent (nexus/src/lib/server/workers/service.ts:178). The operator has no in-product way to obtain a missing image — they mustdocker pull/build it out of band.Proposal
When the configured image isn't present locally at spawn time,
docker.pull()it instead of throwing, and surface pull progress in the workspace-creation UI.tecnativa/docker-socket-proxyhasIMAGES: 1+POST: 1(docker-compose.yml), which coversPOST /images/create. No allowlist change needed for anonymous/public pulls. (Private-registry auth viaX-Registry-Authis out of scope for v1.)POST → 201with no progress channel (nexus/src/routes/api/workers/+server.ts). Introduce astatus='pulling'worker state so the POST can return immediately while the pull runs.docker.modem.followProgresslayer/% events to a real progress bar inNewWorker.svelte. One-way, no WebSocket upgrade plumbing.Notes / open questions for its own spec
listWorkerImagesfilters byorg.nexus.worker=true): a freshly-pulled image must carry the label to be spawnable; decide whether to validate the label post-pull.status='pulling'interacts with the 10s health reconcile loop (don't reap a worker mid-pull).Relationship