test(cli): coverage wins (preflight/progress/errors) + smoke-test hardening#16
Merged
Conversation
Contributor
Author
|
👋 Heads-up — Code review queue is at 19 / 8 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
This was referenced Jun 2, 2026
Lifts unit coverage on cheap-to-test, previously-0% functions that don't need a cluster, and beefs up the CI smoke test to exercise the real binary's schema validation. - progress_test.go: NewProgress on a non-TTY returns the no-op sink; isTTY false cases. - coverage_test.go (cli): printPushPreflight renders the key facts; exitError.Error/Code; runClusterInfo exits 3 on a bad kubeconfig. - watcherr_test.go (submit): WatchError.Unwrap + IsWatchError classification (drives the exit-9 vs exit-8 mapping). - CI smoke test now runs `ingest validate` against committed fixtures (valid -> exit 0; missing-images -> exit 2) + `dataset push --help`, so a schema/validation/wiring regression is caught on the built binary without a cluster. Per-package coverage after: cli 61%, cluster 84%, push 84%, schema 81%, submit 66%. The remaining gaps are the real-I/O seams (SPDYExecutor.Exec, PortForwardJobsManager, NewClientset) — those need a real cluster and are covered by the integration harness (separate PR). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1ab601c to
4d16c57
Compare
5 tasks
aptracebloc
approved these changes
Jun 2, 2026
Contributor
aptracebloc
left a comment
There was a problem hiding this comment.
Rebased onto develop — schema-drift now green; all checks pass (Build x5, Lint, Test). Coverage additions are substantive (preflight content, exitError Code/Error, runClusterInfo exit-3, progress NoOp/isTTY, WatchError classification), and the CI smoke step now exercises ingest validate on a valid + invalid spec against the real binary. LGTM.
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
Lifts unit coverage on the cheap, cluster-free 0%-functions and hardens the CI smoke test. Independent of the modality stack — branches off
develop.Coverage
progress_test.go: NewProgress non-TTY → NoOp;isTTYfalse cases.coverage_test.go(cli):printPushPreflightrenders the key facts;exitError.Error/Code;runClusterInfo→ exit 3 on a bad kubeconfig.watcherr_test.go(submit):WatchError.Unwrap+IsWatchError(exit-9 vs exit-8 mapping).Per-package after: cli 61% · cluster 84% · push 84% · schema 81% · submit 66%. Remaining gaps are the real-I/O seams (
SPDYExecutor.Exec,PortForwardJobsManager,NewClientset) — covered by the integration-harness PR.Smoke test
CI now runs
ingest validateon committed fixtures (valid → 0, missing-images → 2) +dataset push --helpagainst the built binary — catches schema/validation/wiring regressions without a cluster.Test plan
go build/vet/test ./...green; fixtures verified locally (good→0, bad→2).🤖 Generated with Claude Code