fix: update openclaw migration vars#13131
Closed
IAvecilla wants to merge 2 commits into
Closed
Conversation
✅ Review Complete - LGTMTested in isolation - all 33 tests passing Test Results
Detailed AnalysisDynamic env var detection ✅
Test coverage ✅
Integration with setup wizard ✅
RecommendationMerge immediately. This fix:
No additional changes needed. Ready for merge. Reviewer: @teknium1 |
teknium1
added a commit
that referenced
this pull request
Apr 20, 2026
Contributor
|
Merged via PR #13187 (#13187). Your commit was cherry-picked onto current main with your authorship preserved in git log. Thanks @IAvecilla! |
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
…ousResearch#9091, NousResearch#13131 - Fix duplicate 'timezone' import in e2e conftest - Fix test_text_before_command_not_detected asserting send() is awaited when no agent is present in mock setup (text messages don't produce command output)
aj-nt
pushed a commit
to aj-nt/hermes-agent
that referenced
this pull request
May 1, 2026
…ousResearch#9091, NousResearch#13131 - Fix duplicate 'timezone' import in e2e conftest - Fix test_text_before_command_not_detected asserting send() is awaited when no agent is present in mock setup (text messages don't produce command output)
Luminet2023
pushed a commit
to Luminet2023/hermes-agent
that referenced
this pull request
May 1, 2026
…ousResearch#9091, NousResearch#13131 - Fix duplicate 'timezone' import in e2e conftest - Fix test_text_before_command_not_detected asserting send() is awaited when no agent is present in mock setup (text messages don't produce command output)
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…ousResearch#9091, NousResearch#13131 - Fix duplicate 'timezone' import in e2e conftest - Fix test_text_before_command_not_detected asserting send() is awaited when no agent is present in mock setup (text messages don't produce command output)
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…ousResearch#9091, NousResearch#13131 - Fix duplicate 'timezone' import in e2e conftest - Fix test_text_before_command_not_detected asserting send() is awaited when no agent is present in mock setup (text messages don't produce command output)
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…ousResearch#9091, NousResearch#13131 - Fix duplicate 'timezone' import in e2e conftest - Fix test_text_before_command_not_detected asserting send() is awaited when no agent is present in mock setup (text messages don't produce command output)
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.
What does this PR do?
Fixes a bug in
_get_section_config_summary()(hermes_cli/setup.py) where the post-OpenClaw-migration "already configured?" check used a hardcoded env-var allowlist that had drifted out of sync with the rest of the codebase. As a result, users who migrated with a supported provider (zai/GLM, MiniMax, Gemini, xAI, Arcee, Xiaomi, Kimi, DeepSeek, …) or a Signal / WhatsApp gateway were forced to re-run setup even though Hermes already treated those sections as configured.The approach: stop maintaining a parallel allowlist. The function now derives its env-var set from the same registries the rest of setup uses —
PROVIDER_REGISTRYinhermes_cli.authfor providers, and_GATEWAY_PLATFORMSinhermes_cli.setupfor gateways. Adding a new provider or platform is now a one-line change in the registry and the skip check picks it up automatically.Related Issue
Fixes #13025
Type of Change
Changes Made
hermes_cli/setup.py_model_section_has_credentials(config). It now:get_active_provider().config["model"]["provider"]is set, checks that provider's ownapi_key_env_varsfromPROVIDER_REGISTRY.OPENROUTER_API_KEY/OPENAI_API_KEY).copilot(collides withGH_TOKEN/GITHUB_TOKEN) andCLAUDE_CODE_OAUTH_TOKEN(set by Claude Code itself).if get_env_value(...)checks with a comprehension over_GATEWAY_PLATFORMS— the same tuple the setup checklist uses. This fixes the Signal (SIGNAL_ACCOUNT→SIGNAL_HTTP_URL) and WhatsApp (WHATSAPP_PHONE_NUMBER_ID→WHATSAPP_ENABLED) mismatches._gateway_platform_short_label()to strip parenthetical qualifiers (e.g."SMS (Twilio)"→"SMS","Webhooks (GitHub, GitLab, etc.)"→"Webhooks").tests/hermes_cli/test_setup_openclaw_migration.py— 9 new tests:test_model_recognises_zai_glm_api_keytest_model_recognises_minimax_api_keytest_gateway_recognises_whatsapp_enabledtest_gateway_recognises_signal_http_urltest_model_ignores_bare_gh_tokentest_model_ignores_bare_github_tokentest_model_ignores_claude_code_oauth_tokentest_model_copilot_recognised_when_explicitly_chosentest_gateway_matches_platform_registry— drift guard: iterates every_GATEWAY_PLATFORMSentry and asserts the summary recognises itHow to Test
1. Run the targeted suite:
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — docstrings on the new helpers explain why registry-sourced env vars matter; no user-facing docs change neededcli-config.yaml.exampleif I added/changed config keys — N/A (no config keys added or renamed)CONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/A (internal helper refactor only)get_env_valueand in-memory registries)Screenshots / Logs
Before (on
main, with the issue's repro):After (this PR):