Skip to content

fix(cli): honor an explicit /journey --reveal 0 instead of rendering 100% - #57095

Open
golldyck wants to merge 1 commit into
NousResearch:mainfrom
golldyck:fix/journey-reveal-zero
Open

fix(cli): honor an explicit /journey --reveal 0 instead of rendering 100%#57095
golldyck wants to merge 1 commit into
NousResearch:mainfrom
golldyck:fix/journey-reveal-zero

Conversation

@golldyck

@golldyck golldyck commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Makes an explicit /journey --reveal 0 render the oldest (0%) frame instead of the fully-revealed (100%) one.

_cmd_show (hermes_cli/journey.py) coerces the flag with:

reveal = _clamp(float(getattr(args, "reveal", 1.0) or 1.0), 0.0, 1.0)

--reveal 0 parses (argparse type=float) to 0.0. That's falsy, so or 1.0 swaps 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 both hermes journey --reveal 0 and 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.0 clamps through unchanged.

Related Issue

None filed; introduced with the /journey feature (#55555).

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Changes Made

  • hermes_cli/journey.py: replace the falsy-swallowing or 1.0 with an explicit None-check (plus a comment).
  • tests/hermes_cli/test_journey_render.py: 3 contract tests that run the real args.func path and assert the reveal value that reaches the frame renderer. --reveal 0 gives 0.0, no flag gives 1.0, and --reveal 0.25 passes through.

How to Test

scripts/run_tests.sh tests/hermes_cli/test_journey_render.py

test_reveal_zero_renders_oldest_frame fails on current main (renderer receives 1.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.py clean.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (N/A, behavior now matches the existing help text)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes

…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.
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard tool/memory Memory tool and memory providers tool/skills Skills system (list, view, manage) P3 Low — cosmetic, nice to have labels Jul 2, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused regression fix. Current main still applies the falsy fallback at hermes_cli/journey.py:209, while the option documents 0=oldest at hermes_cli/journey.py:316-321. Both hermes journey and interactive /journey use register_cli() and invoke the parsed args.func (hermes_cli/main.py:13383-13397; hermes_cli/cli_commands_mixin.py:314-330), so the change covers both reported paths.

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.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/memory Memory tool and memory providers tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants