fix(cli): honor an explicit /journey --reveal 0 instead of rendering 100% - #57095
Open
golldyck wants to merge 1 commit into
Open
fix(cli): honor an explicit /journey --reveal 0 instead of rendering 100%#57095golldyck wants to merge 1 commit into
golldyck wants to merge 1 commit into
Conversation
…100% _cmd_show coerced the reveal argument with float(... or 1.0). An explicit --reveal 0 (documented as "0=oldest" in the flag's help text) parses to 0.0, which is falsy, so the 'or' swallowed it and rendered the fully-revealed frame — the exact opposite of the request. Reachable from both 'hermes journey --reveal 0' and the interactive /journey --reveal 0. Treat only a missing value as the fully-revealed default and clamp the rest unchanged.
8 tasks
Contributor
|
Thanks for the focused regression fix. Current main still applies the falsy fallback at The added tests exercise the real parser/function route and assert the renderer receives 0.0, 1.0, and a fractional value. No changes requested. Automated hermes-sweeper review. |
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?
Makes an explicit
/journey --reveal 0render the oldest (0%) frame instead of the fully-revealed (100%) one._cmd_show(hermes_cli/journey.py) coerces the flag with:--reveal 0parses (argparsetype=float) to0.0. That's falsy, soor 1.0swaps it for the default. This is the opposite of what the flag's own help text documents ("0=oldest, 1=now"). It's reachable from bothhermes journey --reveal 0and the interactive/journey --reveal 0. Every other value (0.25, 0.5, …) works, so the failure at the endpoint looks like a rendering bug rather than an argument-parsing one.The fix treats only a missing value as the fully-revealed default.
0.0clamps through unchanged.Related Issue
None filed; introduced with the /journey feature (#55555).
Type of Change
Changes Made
hermes_cli/journey.py: replace the falsy-swallowingor 1.0with an explicit None-check (plus a comment).tests/hermes_cli/test_journey_render.py: 3 contract tests that run the realargs.funcpath and assert therevealvalue that reaches the frame renderer.--reveal 0gives0.0, no flag gives1.0, and--reveal 0.25passes through.How to Test
test_reveal_zero_renders_oldest_framefails on current main (renderer receives1.0) and passes with the fix. The other 4 tests, including the two pre-existing ANSI-routing contracts, pass on both. macOS 15.scripts/check-windows-footguns.pyclean.Checklist