Pin ANTHROPIC_API_KEY empty in the client smoke tests

The client tests drive the path where no key is set: each client prints a
notice and exits. They did not isolate the variable, so a key exported in
the environment or sitting in a local .env sent the client into its
interactive chat loop instead. Observed with a .env in mcp-client-ruby: the
run reached "Query:" and waited on stdin.

Empty rather than unset, because dotenv skips a name already present in ENV.
All three clients check `nil? || empty?`, so an empty value takes the early
exit.

CI never hit this, having no key set. It affects local runs, and a run fed
input rather than /dev/null would issue real API requests.

Applied to the Python and TypeScript client tests too; all three share the
pattern.

Also correct the Ruby version comment: 3.3 is supported until March 2027, so
3.4 is not the oldest supported series. The tested version is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
olaservo 2026-08-18 19:44:09 -07:00
commit ecc1138647

View file

@ -41,8 +41,8 @@ jobs:
with:
go-version: "1.25"
# 3.4 is the oldest series still supported; 3.2 reached end of life in
# March 2026.
# 3.4 is the current stable series. 3.3 is supported until March 2027; 3.2
# reached end of life in March 2026.
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with: