Skip to content

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

Open
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-57095
Open

fix(cli): honor an explicit /journey --reveal 0 instead of rendering 100%#880
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-57095

Conversation

@hashbender

Copy link
Copy Markdown
Owner

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, which is falsy, so or 1.0 silently replaces it with the default — the exact opposite of what the flag's own help text documents ("0=oldest, 1=now"). Reachable from both hermes journey --reveal 0 and the interactive /journey --reveal 0. Every other value (0.25, 0.5, …) works, which makes the endpoint failure look 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 (NousResearch#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 (+ comment).
  • tests/hermes_cli/test_journey_render.py — 3 contract tests running the real args.func path and asserting the reveal value that reaches the frame renderer: --reveal 00.0, no flag → 1.0, --reveal 0.25 → passthrough.

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

Mirror-of: NousResearch#57095
NousResearch#57095

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant