Repository navigation
groundwater_at takes an API key; a keyless 401 says a key is needed - #1
Merged
Merged
Conversation
The well-record endpoint (/api/gw-wells/at) is signed-in only, so the guest call answered 401 and the client reported "invalid or revoked API key" although no key was sent (the daily CI's two groundwater tests, red since 2026-09-26). - groundwater_at(lat, lon, tol_deg=0.05, api_key=None): sends api_key or SWATGENX_API_KEY, as Client does; - a 401 on a keyless request now says the endpoint needs an API key; - the two groundwater tests run with SWATGENX_API_KEY and SKIP without it; a new test pins the keyless message. The workflow line that passes the SWATGENX_API_KEY secret follows separately (it needs a workflow-scoped token). Local run without a key: 14 passed, 2 skipped. With the old client the new test fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0165nvw7C6jpq45EnoiEHE7S
SWATGenX
pushed a commit
that referenced
this pull request
Sep 28, 2026
…un again (#2) * CI passes the SWATGENX_API_KEY secret, so the two groundwater tests run again The secret holds a dedicated test account's API key. Without it the two tests skip (PR #1); with it they call the signed-in well-record endpoint for real. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0165nvw7C6jpq45EnoiEHE7S * test_client_requires_key clears SWATGENX_API_KEY, which CI now sets Client falls back to the environment variable, so with the CI secret present Client(api_key="") no longer raised (run 36468776367: DID NOT RAISE). Clearing it keeps the test on the no-key path, as the keyless groundwater test does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0165nvw7C6jpq45EnoiEHE7S --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The well-record endpoint (
/api/gw-wells/at) now requires a signed-in account, so the guest call returns 401. The client reported that as "invalid or revoked API key", even though no key was sent. Those are the two groundwater tests in the daily CI, red since 2026-09-26.groundwater_at(lat, lon, tol_deg=0.05, api_key=None)sendsapi_key, orSWATGENX_API_KEYif unset, the same wayClientdoes.SWATGENX_API_KEYis set and skip without it. A new test pins the keyless message.Local run without a key: 14 passed, 2 skipped. With the old client, the new test fails.
Follow-up: a one-line workflow change to pass the
SWATGENX_API_KEYrepository secret (a dedicated test account's key), so the two groundwater tests run in CI again.🤖 Generated with Claude Code
https://claude.ai/code/session_0165nvw7C6jpq45EnoiEHE7S