Skip to content

fix: Update secret lookup tests for uppercase provider token names - #1208

Merged
jlav merged 5 commits into
mainfrom
fix-secret-lookup-lowercase-provider-alias
Nov 5, 2026
Merged

jlav merged 5 commits into
mainfrom
fix-secret-lookup-lowercase-provider-alias

Conversation

@tofarr

@tofarr tofarr commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

HUMAN:

  • A human has tested these changes.

AGENT:


Why

ProviderHandler.get_provider_env_key was deliberately changed to return the uppercase name (GITHUB_TOKEN), so the provider token is only ever uppercase. The secret lookup tests still expected a lowercase github_token alias, which broke test_signs_one_reference_per_name_and_lists_the_rest and test_the_lowercase_alias_names_the_provider_token_without_a_custom_secret. The tests were stale; the service is unchanged.

Summary

  • Tests only: drop github_token from the provider expectations. A lowercase github_token is now an ordinary custom secret name, and with no such secret it is reported as missing.
  • No changes to server/services/secret_lookup_service.py.

Issue Number

N/A

How to Test

uv run pytest tests/unit/server/routes/test_secret_lookups.py (needs a Docker daemon for the PostgreSQL test container).

Not run by the agent: the sandbox has no Docker daemon. Only ruff check was run on the test file. Pre-commit hooks were bypassed (--no-verify) at the user's request; CI will run them.

Video/Screenshots

N/A

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

The branch history contains earlier commits that touched the service and were reverted; squash on merge. Net diff is the test file only.

This PR was created by an AI agent (OpenHands) on behalf of the user.


Enterprise server image for this PR:

ghcr.io/openhands/enterprise-server:sha-258467b

get_provider_env_key now returns the uppercase name, so the lowercase <provider>_token alias no longer resolved. Build it explicitly.

Co-authored-by: openhands <openhands@all-hands.dev>
@tofarr
tofarr marked this pull request as ready for review November 5, 2026 16:56
The provider token is only ever GITHUB_TOKEN, so drop the lowercase alias from secret lookups and update the tests to match.

Co-authored-by: openhands <openhands@all-hands.dev>
@tofarr tofarr changed the title Fix lowercase provider alias in secret lookups Drop stale lowercase github_token alias from secret lookups Nov 5, 2026
@tofarr tofarr changed the title Drop stale lowercase github_token alias from secret lookups fix: Drop stale lowercase github_token alias from secret lookups Nov 5, 2026
@github-actions github-actions Bot added the type: fix A bug fix label Nov 5, 2026
Co-authored-by: openhands <openhands@all-hands.dev>
@tofarr tofarr changed the title fix: Drop stale lowercase github_token alias from secret lookups Update secret lookup tests for uppercase provider token names Nov 5, 2026

@hieptl hieptl 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.

Thank you! 🙏

@tofarr tofarr changed the title Update secret lookup tests for uppercase provider token names fix: Update secret lookup tests for uppercase provider token names Nov 5, 2026
@jlav
jlav merged commit f49272b into main Nov 5, 2026
20 checks passed
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@jlav
jlav deleted the fix-secret-lookup-lowercase-provider-alias branch November 5, 2026 19:46
@openhands-release-bot openhands-release-bot Bot added the released: 1.87.0 Shipped in 1.87.0 label Nov 5, 2026
@openhands-release-bot

Copy link
Copy Markdown
Contributor

🚀 Released in 1.87.0.

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

Labels

released: 1.87.0 Shipped in 1.87.0 type: fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants