refactor: adopt cocoon v0.4.5 (cliutil + narrowed store constructors) - #8
Merged
Conversation
Upstream resolved our two issues, so drop the local workarounds: - cocoon#72: cmd/cliutil now holds the dependency-free CLI helpers — delete the cli package copy and import cliutil (OutputFormatted/OutputJSON/ AddFormatFlag/FormatSize/IsURL); home.Ctx falls to cliutil.CommandContext. FormatTime stays local in cmd/vm (records store RFC3339 strings; no upstream equivalent). - cocoon#73: cloudimg.New/NewConfig take a plain rootDir — home.OpenStore drops the cargo-culted config.Config; the CLOUDHV.fd placeholder path now comes from images.FirmwarePath.
CMGS
force-pushed
the
refactor/cocoon-v0.4.5
branch
from
July 2, 2026 07:37
c341fce to
69cbd2d
Compare
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
Upstream cocoon v0.4.5 closed both issues we filed, so the local workarounds go away (net −51 lines):
cmd/cliutil: the localcli/package (a deliberate copy of cmd/core's output helpers, kept to avoid the firecracker + go-containerregistry deps) is deleted; all call sites importcliutil(OutputFormatted/OutputJSON/AddFormatFlag/FormatSize/IsURL). Bonus:home.Ctxwas a verbatim copy of what is nowcliutil.CommandContext— deleted too. OnlyformatTimestays local in cmd/vm (our records store RFC3339 strings; no upstream equivalent).cloudimg.New(ctx, rootDir)—home.OpenStoreno longer builds aconfig.Config; the CLOUDHV.fd placeholder path uses the newimages.FirmwarePath(rootDir).Validation
go test -racegreen.vm listtable +-o json+image listall render identically through cliutil.grepconfirms zero references to the deletedcocoon-macos/clipackage remain.🤖 Generated with Claude Code