fix(config): coerce quoted-boolean config gates consistently - #18220
Merged
Merged
Conversation
Widens #16528 to two sibling sites that had the same quoted-boolean bug: a YAML string "false" (or "0", "no", "off") silently evaluated truthy under bool() / if-check. - gateway/run.py _load_show_reasoning: is_truthy_value wrap - tools/skill_manager_tool.py _guard_agent_created_enabled: is_truthy_value wrap - regression tests for both
1 task
This was referenced Aug 3, 2026
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.
Salvages #16528 onto current main and widens the fix to two sibling sites with the same bug class.
Summary
Quoted YAML booleans (
display.tool_progress_command: "false") were slipping through as truthy becauseif val:andbool(val)treat any non-empty string as true. Every call site that reads a user-writable bool config now routes throughutils.is_truthy_value.Root cause
bool("false") == True. YAML writes from manual edits, env-expanded values, or CLIhermes config setcan all produce string values where a bool is expected.Changes
cfg_get(...)helper:hermes_cli/commands.py_resolve_config_gatesgateway/run.py_handle_verbose_commandgateway/run.pyonboardingprogress_callbackgatetests/gateway/test_verbose_command.pyandtests/hermes_cli/test_commands.pygateway/run.py_load_show_reasoning— same bug fordisplay.show_reasoningtools/skill_manager_tool.py_guard_agent_created_enabled— same bug forskills.guard_agent_createdValidation
scripts/run_tests.sh tests/tools/test_skill_manager_tool.py tests/gateway/test_reasoning_command.py tests/gateway/test_verbose_command.py tests/hermes_cli/test_commands.py→ 232 passed"false"/"true"/bare-bool values, called_guard_agent_created_enabled()and theshow_reasoningpath end-to-end — all coerced correctly.Closes #16528.
Credit to @johnncenae for the original diagnosis and fix.