fix(cli): consolidate Bitwarden startup warning handling - #46641
Closed
konsisumer wants to merge 1 commit into
Closed
fix(cli): consolidate Bitwarden startup warning handling#46641konsisumer wants to merge 1 commit into
konsisumer wants to merge 1 commit into
Conversation
This was referenced Jun 15, 2026
Contributor
Author
|
Closing - on reflection, |
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?
Consolidates the Bitwarden startup warning fixes for #32715. If
secrets.bitwarden.enabledis true but neitherBWS_ACCESS_TOKENnorproject_idis configured, Hermes treats Bitwarden as not set up and stays silent. If setup is partial and a status line is actionable, Hermes still emits it once and suppresses duplicate inherited child-process prints during startup.Related Issue
Fixes #32715
Supersedes
Supersedes #32784, #34314
Type of Change
Changes Made
agent/secret_sources/bitwarden.py: return a clean empty result when Bitwarden is enabled but both the access token and project id are absent, so fresh or untouched Bitwarden config does not print a warning.hermes_cli/env_loader.py: add an inherited process-environment marker for Bitwarden status output so child startup processes suppress duplicate status lines while still applying secrets and source tracking.tests/test_bitwarden_secrets.py: cover the enabled-but-unconfigured silent no-op case while preserving warnings for partial setup.tests/test_env_loader_secret_sources.py: cover inherited status suppression and first-process marker creation for actionable warnings.How to Test
/opt/homebrew/bin/timeout -k 30 480 pytest tests/test_bitwarden_secrets.py tests/test_env_loader_secret_sources.py -q-> 53 passed./opt/homebrew/bin/timeout -k 30 480 sh -c 'pytest tests/ -q -x --timeout=60 "$@"' shstopped during collection before reaching this change because localfastapiis missing fortests/hermes_cli/test_dashboard_auth_401_reauth.py; one deselect rerun then stopped on the same missing dependency intests/hermes_cli/test_dashboard_auth_cookies.py.tests/tools/test_transcription_dotenv_fallback.py::TestTranscribeCallSitesReadDotenv::test_transcribe_mistral_forwards_dotenv_key(PEP 668 blocks lazymistralaiinstall in the system Python) andtests/tui_gateway/test_goal_command.pygoal-state assertions.python scripts/check-windows-footguns.py agent/secret_sources/bitwarden.py hermes_cli/env_loader.py tests/test_bitwarden_secrets.py tests/test_env_loader_secret_sources.py-> no Windows footguns found.ruff check-> all checks passed.git diff --check-> clean.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
N/A