Skip to content

fix: Gateway CLI consistency — ANSI stripping, missing tests, --kubeconfig #17

Description

@robbycochran

Problems

ProviderList missing ANSI stripping

cli.go ProviderList does not strip ANSI codes before parsing. SandboxList, GatewayList, InferenceModel, and ActiveGateway all do. ProviderList is the only parser that skips this.

Fix: Add cleaned := ansiRE.ReplaceAllString(line, "") before strings.Fields(line) in ProviderList.

Missing tests for output-parsing methods

cli_test.go has tests for ProviderList, ProviderGet, InferenceGet, SandboxCreate, SandboxDelete — but zero coverage for:

  • GatewayList (complex branching for * active marker)
  • SandboxList (ANSI stripping)
  • InferenceModel (Model: line parsing)
  • ActiveGateway (* prefix parsing)
  • CLIVersion, CLIPath

Fix: Add stub-script tests using the existing writeStub pattern.

deploy --remote --kubeconfig not forwarded

Bash deploy.sh accepts --kubeconfig and exports it. Go deploy.go hardcodes only --remote when delegating to the bash script. Users running harness deploy --remote --kubeconfig /path get an unknown-flag error.

Fix: Forward all extra args to the bash script, or add --kubeconfig flag and pass it through.

Severity: Medium

Found by: 5-dimension code audit (gateway interface + equivalence review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions