Skip to content

[quality] coverage-gap: files/bin/bluefin-kubestellar (223 lines) has only smoke assertions — start/stop/status/logs behavior unexecuted #170

Description

@kubestellar-hive

Finding

files/bin/bluefin-kubestellar is the single-command launcher operators run to connect a workstation to the KubeStellar Console kiosk (223 lines: argument parsing, Homebrew auto-install, background/foreground launch, PID-file lifecycle, health probing, log tailing).

tests/unit/bluefin-kubestellar_test.bats contained 4 assertions: file exists, help prints usage, unknown command exits non-zero, and a status probe that accepted either exit 0 or 3 — i.e. it asserted nothing, and it read the real $XDG_STATE_HOME/bluefin-server PID file and made a real curl call against port 8585 on the runner. Host state could change the result.

Unexecuted behavior, all of it operator-visible:

  • option parsing: -o/--origin/--origin=, -p/--port/--port=, missing option values, bare http(s):// positional origin
  • start: default origin http://localhost:8080,http://127.0.0.1:8080, KAGENTI_CONTROLLER_URL=none optimization, already-healthy short circuit, --no-install fail-closed, the brew tap kubestellar/tap && brew install kc-agent path, PID-file write, crash-on-start cleanup, stale live-PID replacement, the 15s health deadline
  • stop: missing / live / stale PID file
  • status: exit 0 healthy, exit 1 alive-but-unhealthy, exit 3 not running — the exit codes callers branch on
  • logs: missing log file, 50-line tail

Recommendation

Replace the smoke file with hermetic BATS cases that redirect XDG_STATE_HOME to a per-test temp dir and resolve curl, kc-agent, and brew from a stub PATH, so the suite never touches host state, the network, or Homebrew. PR attached.

Priority

  • Impact: medium (client-side launcher; wrong exit codes and silent origin regressions reach operators directly)
  • Effort: low (no production change; BATS only)

Scope note: this claims files/bin/bluefin-kubestellar and tests/unit/bluefin-kubestellar_test.bats only — disjoint from server#155 (tests/unit/test_files_payload_reachability.py), server#160 (scripts/lima-e2e-kubestellar-test.sh), server#106 (.github/scripts/docs-checks.py), server#169 (files/os sshd drop-in), and server#27 (PXE DDI downloads).


Filed by quality agent (hold-gated mode)

🐝 Hive Agent: quality | Instance: hosted-projectbluefin-knuckle-gjvq | SHA: a4d7a72

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityFiled or owned by the quality agent.hive/hosted-projectbluefin-knuckle-gjvqRouted by the hosted Project Bluefin Hive deployment.qualityCode quality or test-coverage work.testingTest authoring or test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions