Repository navigation
fix(host): fall back to latest when the sandbox image isn't published - #62
Merged
Merged
Conversation
`fctl host image pull` pulled only the image of the host's version, so in the hour between a release and its image it failed with "manifest unknown", and the host's pull at startup only warned. Sessions already start from `latest` then. Both pulls now fall back to it the same way, when the version's image can't be pulled and isn't on the host, and the pull command and `fctl host doctor` say that sessions start from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kalaspuff
deleted the
fctl/28-when-running-fctl-host-image-pull-it-tri
branch
October 18, 2026 13:24
This was referenced Oct 18, 2026
Closed
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.
fctl host image pullon a 0.4.0 host failed right after the release:Hosts on the default image use their own version's tag,
ghcr.io/hyperstructure/sandbox:<version>. hyperstructure/sandboxpublishes that tag within the hour after a release: its Image workflow
checks fctl.sh for new releases every hour (ADR 0012).
v0.4.0 came out at 12:44 UTC. GitHub didn't start the workflow's scheduled
runs, so ghcr.io had only
0.3.0,0.3andlatestuntilsomeone started the workflow by hand at 13:31. Sessions already handle that gap: they start
from
latestand say so in their log. The pull command didn't. Neither didthe host's background pull at startup, which only logged a warning, so the
first session had to wait for
latestto download.What changed
Driver::pull_or_fallback(the container drivers) pulls an image.When that fails and the image isn't on the host either, it pulls the
fallback instead, because that is what sandboxes start from then. A log
callback says when it falls back.
fctl host image pulluses it with the host's fallback:latestforthe default image, none for an image set in
host.toml:With
--json,imageis the image it pulled, andinstead_ofnames thehost's image when it fell back (null otherwise):
{"image": "ghcr.io/hyperstructure/sandbox:latest", "instead_of": "ghcr.io/hyperstructure/sandbox:0.4.0"}.The host's pull at startup falls back the same way, but never pulls
over a
latestthat is already on the host: the host pulls a tag once.fctl host doctorsays when sessions start fromlatestbecause theversion's image isn't on the host yet.
If the version's image is already on the host (built with
fctl host image build, for example), sessions use it, so a failed pulldoesn't fall back. It fails as it did before.
docs/sandbox-images.mdsays that the host andfctl host image pullpull
latestuntil the version's image is published, and that the firstsession after that pulls it.
The
latestpulled during the gap stays on the host after sessions move tothe version's image, like other old images (#47).
Why not always pull
latestHosts pull their own version's tag on purpose (ADR 0012). The image
carries that release's fctl, and a change to the image's layout ships in an
fctl release first, so a host that is a version behind keeps an image it
knows how to use.
lateststays what it already was for sessions: thestand-in until a release's image exists.
Verification
pulling_the_default_image_falls_back_to_the_latest_published_one,uses the stand-in CLI from the driver tests. It covers five cases: the
version's image is published and is pulled; it isn't published, so
latestis pulled instead and the log says so; a build of it is on thehost, so nothing falls back; neither image can be pulled, and the error
names both and suggests
fctl host image build; an image fromhost.tomlhas no fallback.:0.4.0wasn't publishedyet, using a stand-in
dockerwhosepullasks ghcr.io for the tag'smanifest:
fctl host image pullprinted the output above and exited 0.--jsonprinted{"image": "ghcr.io/hyperstructure/sandbox:latest", "instead_of": "ghcr.io/hyperstructure/sandbox:0.4.0"}.fctl host doctorthen said "sandbox imageghcr.io/hyperstructure/sandbox:0.4.0: not here yet; sessions start from
ghcr.io/hyperstructure/sandbox:latest until it is …".
fctl host run, on its first start, logged the failed pull of0.4.0and then pulled
latest. On the second start, withlatestalreadythere, it tried only
0.4.0.:0.4.0was published at 13:31 UTC, the same stand-in pulled itdirectly:
✓ Pulled ghcr.io/hyperstructure/sandbox:0.4.0, and--jsonprinted
{"image": "ghcr.io/hyperstructure/sandbox:0.4.0", "instead_of": null}.cargo xtask check --quickpasses.Refs #2
Session: https://app.fctl.sh/s/ses_01M57GZ9DXXAGA0CF8QW9DS5XZ