Skip to content

[quality] 🧪 test(tui): cover zero-covered attach error types, KickResult.Queued, bare stub.View - #5459

Merged
clubanderson merged 1 commit into
v4from
quality/test-tui-zero-cov
Sep 1, 2026
Merged

[quality] 🧪 test(tui): cover zero-covered attach error types, KickResult.Queued, bare stub.View#5459
clubanderson merged 1 commit into
v4from
quality/test-tui-zero-cov

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Per-function coverage (go tool cover -func, main @ 92c4b6e, pkg-wide 92.9%) shows only ten 0% functions; four are in pkg/tui and none is claimed by any open PR. This PR covers three of them with tests only — no production changes:

Files/functions claimed (exact):

  • src/pkg/tui/attach_errors_test.go (new) → src/pkg/tui/attach.go: tmuxNotFoundError.Error/Unwrap, tmuxSessionMissingError.Unwrap — pins the exact footer messages (with/without tmux detail) and that errors.Is/errors.As chains reach the underlying cause.
  • src/pkg/tui/client/kick_result_test.go (new) → src/pkg/tui/client/actions.go: KickResult.Queued — the 🐛 Kick reports 504 while succeeding: the handler blocks up to 120s waiting for the CLI prompt #5325 async-kick seam; pins queued vs in-flight, empty, and case-sensitivity against the wire constant.
  • src/pkg/tui/panes/stub_view_test.go (new) → src/pkg/tui/panes/pane.go: stub.View — every shipped pane overrides View, so the shared fallback is only reachable by the next pane embedding stub; pinned directly (box fill + degenerate-size guard).

Left uncovered deliberately: app.Run (wraps tea.NewProgram().Run() on a live terminal; needs a production seam, out of quality scope).

Validation: go test -count=1 -short ./pkg/tui/... — all four packages ok.

Preflight vs open hold-gated PRs: disjoint from #5440 (pkg/agent), #5433 (pkg/config checkout_root + dashboard terminal_urls), #5428 (pkg/config entrypoint_boot), #5436 (systemd), #4032 (pkg/proxy//pkg/github auth inject). No shared files or functions.


Filed by quality agent (hold-gated mode). Human review required.

— hive: agent=quality backend=copilot model=claude-fable-5

…kResult.Queued, and bare stub.View

Per-function coverage showed four 0%% seams in pkg/tui that no open PR
claims:

- attach.go: tmuxNotFoundError.Error/Unwrap and
  tmuxSessionMissingError.Unwrap — the typed-error contract the attach
  preflight footer and errors.Is chains depend on. New
  attach_errors_test.go pins the exact messages (with/without tmux
  detail) and that both Unwrap methods expose the underlying cause.
- client/actions.go: KickResult.Queued — the #5325 async-kick seam
  distinguishing 'queued' from 'in-flight'. New kick_result_test.go
  pins both wire values, the empty case, and case-sensitivity.
- panes/pane.go: stub.View — every shipped pane overrides View, so the
  shared fallback is reachable only through the next pane that embeds
  stub; stub_view_test.go pins it directly (box fill + degenerate size).

app.Run stays uncovered: it wraps tea.NewProgram().Run() on the live
terminal and needs a seam, not a test-only workaround.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: hive-quality <quality@hive.local>
@kubestellar-hive kubestellar-hive Bot added the hold label Sep 1, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 1, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hanthor for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Changelog: this PR changes code but does not touch CHANGELOG.md.

If it is user-visible — a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking —
please add a line under ## Unreleased. If it is a refactor, a
test-only change, or dependency churn, no entry is needed and you can
ignore this.

This is a reminder, not a gate; it never blocks a merge.

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 1, 2026
@clubanderson
clubanderson merged commit a6b57db into v4 Sep 1, 2026
51 of 52 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-tui-zero-cov branch September 1, 2026 13:00
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot dco-signoff: yes Indicates the PR's author has signed the DCO. hold size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant