Conversation
The four identity packages were near-identical copies of one another and the architecture test package duplicated what a linter should do (DEC-012, DEC-015). Nothing here is reused; the specs govern the rewrite.
Cocoon-shaped layout: main.go at the root, cmd/ with a cobra command tree (cmd/doctor), and flat capability packages at the top level (config/, layout/, host/, version/) instead of an internal/ tree of abstract packages. doctor judges each requirement against the phase being worked on, so KVM, Cloud Hypervisor and CNI show as not-required on a laptop while the root and free-space checks decide the exit code. --fix only creates KumaBox-owned directories; installing packages stays in the install script (DEC-014). Tests run on macOS with no root and no KVM.
doctor/check.sh is Cocoon's doctor/check.sh with Cocoon's parts replaced: KumaBox root, run and log directories, kumabox0 bridge and 10-kumabox.conflist, the KumaBox database and staging directories, and the KumaBox version floors (cloud-hypervisor >= v43, erofs-utils >= 1.8). Sections that do not apply to KumaBox are gone: firecracker, ch-remote, zstd, the JSON metadata backend and the JSON snapshot inspection. Store health now reports rows stuck mid-flight and stray staging entries, which is what 'kumabox gc' reclaims. doctor/check_test.sh tests the checker against a throwaway root and a PATH of fake tools, so it needs no root, no KVM and no Cloud Hypervisor. Two knobs, KUMABOX_KVM_DEVICE and KUMABOX_NETNS_DIR, exist so the checks can run off-host; arm64 is accepted alongside aarch64. The Go side keeps only the CLI skeleton in Cocoon's shape: main.go, cmd/root.go and version/. The Go doctor command is removed -- doctor is the script, as in Cocoon.
Restores Makefile and doctor/ to the state that matches Cocoon's README: the checker is doctor/check.sh, built into bin/kumabox-check, installed next to the kumabox binary, and covered by 'make test' through doctor/check_test.sh. The Go rewrite of doctor (cmd/doctor) is dropped: it duplicated the script, changed the command surface, and clobbered the Makefile targets that build and install the checker.
Move dependency assembly to core and organize CLI commands and image adapters by responsibility. Keep metadata contract tests in their owning package and preserve SQLite cancellation errors after automatic rollback. Validated with make verify, Linux/macOS make lint, and 30 repeated cancellation regression runs.
Add aligned image tables, indented JSON, and terminal-aware progress for import, pull, verification, and removal. Document module responsibilities, API contracts, resource ownership, and workflow boundaries with ASCII diagrams.
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.
No description provided.