test(hermes_constants): cover parse_reasoning_effort() - #21365
Merged
Conversation
xxxigm
force-pushed
the
test/parse-reasoning-effort
branch
from
May 7, 2026 15:34
ba79eaa to
56911cd
Compare
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?
Adds focused unit tests for parse_reasoning_effort() in
hermes_constants.py. The function is referenced from CLI / config code paths but had no direct tests intests/test_hermes_constants.py— the test file only covered get_default_hermes_root() and is_container().Tests are written as invariants, not snapshots, per the guidance in
AGENTS.md(“Don't write change-detector tests”). Each level inVALID_REASONING_EFFORTSis parametrized so the suite stays correct when new levels are added; the “documented levels” test asserts a subset relation rather than equality so adding a new level won't break CI.This change is test-only — no production code is modified.
Related Issue
N/A — opportunistic test-coverage improvement.
Type of Change
Changes Made
1. empty / whitespace input → None
2. literal "none" → {"enabled": False}
3. every level in VALID_REASONING_EFFORTS → {"enabled": True, "effort": }
4. case + surrounding whitespace normalization (MEDIUM, \tXHIGH\n, low , None, …)
5. unknown levels → None ("bogus", "very-high", "max", …)
6. invariant guard that the documented levels (minimal/low/medium/high/xhigh) remain a subset of VALID_REASONING_EFFORTS
How to Test
scripts/run_tests.sh tests/test_hermes_constants.py::TestParseReasoningEffort -vOptional — run the full file to confirm the existing tests still pass:
scripts/run_tests.sh tests/test_hermes_constants.py -vExpected: 34 passed (11 pre-existing + 23 new).
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/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs
$ scripts/run_tests.sh tests/test_hermes_constants.py::TestParseReasoningEffort -v
============================== 23 passed in 0.97s ==============================
$ scripts/run_tests.sh tests/test_hermes_constants.py -v
============================== 34 passed in 1.27s ==============================