Add richer help and isobox doctor skeleton - #63
Merged
Merged
Conversation
isobox --help, -h, and help now print what isobox is, list every command with a short purpose, and use the project glossary terms (Task, Workspace, Sandbox, Task Record, Task Result, Promotion, Workload Command) the documentation uses. isobox <command> --help for init, run, tool, promote, version, and doctor prints command-specific usage and examples so users can copy a minimal command without reading the README. Unknown commands and the no-argument case still return a concise actionable usage line that points the user at 'isobox --help'. A stub doctorCmd exists so the binary builds; the real doctor implementation lands in the next slice (issue #49). Integration tests cover the externally visible CLI shape for both the top-level and per-command help surfaces and assert the unknown-command usage stays concise.
…s (issue #49) isobox doctor is a new read-only diagnostic command. The 0.1.1 first slice establishes the command surface, the Doctor Check / Doctor Finding model, and the exit-code behavior the parent PRD #48 needs. This slice ships: - isobox doctor [path] with [path] validation (one existing directory; usage error otherwise) - Doctor Finding severities ok, warning, and error - Highest() / ExitCode() aggregation (1 only when any error finding) - Grouped human-readable output (Global checks / Project checks) so the shape is stable when richer checks land in follow-up issues - The first demoable check: isobox version metadata reported as ok - Read-only enforcement: doctor never mutates host or project state The internal/doctor package is the home for the Check / Report / Severity model. The cmd/isobox/doctor.go file owns CLI argument parsing and exit- code wiring. Integration tests cover argument parsing, severity aggregation, the read-only guarantee, and the externally visible output shape.
- README: add a 'Run A Diagnostic' section that documents isobox doctor as the recommended first step on a fresh install and points users at the richer help surface. - CHANGELOG: list the new help surface and the isobox doctor command under Unreleased. - docs_test: assert the README documents the doctor command and the richer help surface so future changes cannot silently drop them. - help_integration_test: drop the unused helpTextFor helper now that the tests use buildIsobox directly.
The site landing page is a separate JS project whose node_modules directory happens to ship a Go port of 'flatted' as a transitive dependency. 'go test ./...' was walking into that tree and reporting a [no test files] line for the unrelated Go package, which made the test output noisier and could pull in a future site dependency. Filter the test package list through 'grep -v /node_modules/' via a small go-isobox-packages Make target. The build target keeps 'go build ./...' because the site Go package compiles cleanly and the noise is only on the test side.
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
isobox --help,isobox -h, andisobox helpnow explain what isobox is, list every command with a short purpose, and use the project glossary terms (Task, Workspace, Sandbox, Task Record, Task Result, Promotion, Workload Command).isobox <command> --helpforinit,run,tool,promote,version, anddoctorprints command-specific usage and examples. Unknown commands and the no-argument case still return a concise actionable usage line.isobox doctorfrom issue Add isobox doctor skeleton with findings and exit semantics #49: a read-only diagnostic command with[path]argument parsing, a Doctor Check / Doctor Finding model,ok/warning/errorseverity aggregation, grouped human-readable output, and exit-code behavior where onlyerrorfindings return status 1. The first demoable check is isobox version metadata reported asok. The grouped output distinguishes global checks from project checks so richer checks can land in follow-up slices without changing the CLI shape.Update Target,Doctor Check, andDoctor Findingterms to the project domain language inCONTEXT.mdand document the newdoctorcommand in the README.site/node_modules/JS dependency tree from the isobox test run (it ships a Go port offlattedthat is not isobox code).Closes #57, closes #49.
Validation
make test,make lint,make build.go test -count=1 -race $(make go-isobox-packages)from the feature branch.CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /tmp/isobox ./cmd/isoboxand thearm64equivalent.isobox --help,isobox doctor,isobox doctor <dir>,isobox doctor <missing>,isobox doctor <file>, andisobox doctor <a> <b>invocations to confirm the externally visible shape matches the issue acceptance criteria.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.