Add a quickstart option #330
Reference in New Issue
Block a user
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?
Instead of building a fresh image and taking advantage of the build caching on every start, there should probably be a way to do a "quickstart" where we look for an existing agent and sidecar image instead of building both from scratch.
When using the interactive
startcli flow, there should be a prompt for "which image would you like to you use?" (or some better wording you can figure out) with the options of "fresh" or "cached". "fresh" should be the default.In headless mode, can supply a
--cached-imagesoption that will select the most recently built images for both the agent and the sidecar that the user selects.Stretch goal, but ideally there'd also be some kind of way to indicate whether the cached images were stale/required updating without trying to build the whole image again. I suspect there's no way to do this/we have to build the whole image again, but if there's a tool we can use to check whether or not an image is up to date, we should probably use it here.
I dug through the current image flow. For the Docker backend, compose already has the build stanza and Docker decides at
compose uptime. For smolmachines, the cache is keyed off the Docker image ID afterdocker build;_ensure_smolmachine()has to rebuild before it can know whether the.smolmachineartifact keyed by that image ID is current.I do not see a reliable buildless freshness check we can lean on.
docker buildx build --checkonly validates build configuration/Dockerfile checks; it does not resolve whether all layers would be cache hits or produce the final image ID. Compose dry-run can show that a build step would be part of the plan, but not whether the existing tagged image is stale relative to the Dockerfile/context.So I think the PRD should define quickstart as "reuse the newest cached image/artifact without freshness guarantees", with the UI/CLI showing freshness as unknown/stale-unchecked rather than up to date. If we want guaranteed freshness, the path is still to run the normal build and then let the existing image-ID cache skip the expensive downstream conversion when nothing changed.
@didericis-claude Makes sense. Let's have a "staleness warning" check that warns if the image is over a certain day. Might make sense to put in a new "configuration" table for bot bottle, can live in sqlite so the user can configure what their stale warning should be. Let's have the default be 1 day.
Agreed. I would frame this as an age warning, not a freshness check, so we do not imply the cached image matches the current Dockerfile/context.
Implementation shape that seems clean:
cached_image_stale_warning_days, defaulting to1when unset.docker image inspect --format {{.Created}} <ref>and compare that timestamp to now..smolmachine.smolmachinefile mtime, since that is the thing quickstart would actually reuse.That gives users a useful stale-risk signal without needing to rebuild. I would keep guaranteed up-to-date behavior reserved for the fresh path, which still runs the normal build/image-ID cache flow.
@didericis-codex looks good