Skip to content

fix(cli): fail status for an unregistered named gateway - #5379

Merged
TaylorMutch merged 2 commits into
ai-openshell:mainfrom
ericcurtin:fix/5250-status-unknown-gateway/ericcurtin
Nov 10, 2026
Merged

TaylorMutch merged 2 commits into
ai-openshell:mainfrom
ericcurtin:fix/5250-status-unknown-gateway/ericcurtin

Conversation

@ericcurtin

Copy link
Copy Markdown
Contributor

Summary

status now exits non-zero when --gateway <name> is not registered.

Related Issue

Closes #5250

Changes

  • Return the unknown gateway error when a gateway is named explicitly.
  • No-flag status still exits 0 with the registration hint.

Testing

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 8, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@TaylorMutch @krishicks could you please triage #5250 so the issue check can pass? PTAL when you get a chance. Thank you!

@TaylorMutch TaylorMutch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is appropriately scoped: it propagates the existing unknown-gateway error for an explicit gateway selector, preserves the registration hint for status without a configured gateway, and adds a regression test alongside the existing no-gateway test. I found no correctness issue in the code change. Issue #5250 is now accepted.

Please add the exit-code documentation required by #5250 before merge. The "Inspect Gateway Status" section in docs/how-it-works/gateways/overview.mdx should explain that an unregistered named gateway produces a nonzero exit, while status without a gateway configured and without a selector still succeeds. This also applies to a name supplied through OPENSHELL_GATEWAY. Clarify that exit 0 alone does not guarantee connectivity: registered but disconnected gateways can still return 0, so scripts checking reachability should inspect the structured status output.

Validation: source and regression-test review only; I did not run the tests locally. Required CI must pass before merge.

@TaylorMutch TaylorMutch self-assigned this Nov 9, 2026
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
@TaylorMutch

Copy link
Copy Markdown
Contributor

/ok to test

@copy-pr-bot

copy-pr-bot Bot commented Nov 10, 2026

Copy link
Copy Markdown

/ok to test

@TaylorMutch, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@TaylorMutch

Copy link
Copy Markdown
Contributor

/ok to test fd37a72

@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

1. cli — No explicit risk acceptance found

For an unregistered name, openshell --gateway org-a status --output json changed from exit 0 with {&quot;status&quot;:&quot;not_configured&quot;} to a nonzero unknown-gateway error without structured output, also affecting selection through OPENSHELL_GATEWAY.

  • Impact: Existing named-gateway JSON/YAML probes lose their status response, causing parsers to fail and set -e scripts to stop.
  • Action: Preserve the exit-0 structured not_configured response in v0.1.8; make strict errors opt-in or defer them to a minor release with migration guidance for named JSON/YAML probes.
  • PR: fix(cli): fail status for an unregistered named gateway #5379
Review details
  • Execution: complete
  • Candidate: PR #5379 (d49786ff0c55312abc00977b2765c42317e5c940)
  • Baseline: af8182f7b63da6dd8bbea8b3c313227764ee0dea (af8182f7b63da6dd8bbea8b3c313227764ee0dea)
  • Reviewed: rust-sdk, python-sdk, go-sdk, typescript-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

@TaylorMutch TaylorMutch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at fd37a72. I explicitly accept the compatibility impact identified by the advisory review: selecting an unregistered gateway through --gateway or OPENSHELL_GATEWAY now returns a nonzero unknown-gateway error, including for JSON/YAML output, instead of a successful not_configured response. Failing early prevents automation from treating an invalid gateway name as a successful status check and fulfills issue #5250. That benefit outweighs preserving the previous behavior for existing probes. The documentation explains the exit semantics, regression coverage includes environment selection and structured status output, and all PR checks passed.

@TaylorMutch
TaylorMutch added this pull request to the merge queue Nov 10, 2026
Merged via the queue into ai-openshell:main with commit c4a158c Nov 10, 2026
85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openshell --gateway <name> status exits 0 when the gateway was never registered

2 participants