Conversation
Duplicate of #26047 (earliest open PR wiring |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Overview
Adds the /whoami command dispatch to HermesCLI.process_command() and implements _handle_whoami_command() to show the active profile and owner-tier access level. Also fixes a kanban issue where tasks created with initial_status=blocked were incorrectly auto-promoted.
Analysis
- Clean feature addition: /whoami was already registered in COMMAND_REGISTRY and advertised in help/completion, but had no dispatch branch
- Handler mirrors the gateway /whoami output format for consistency
- Shows profile name, access tier, and available slash command count
- Comprehensive test file covering dispatch wiring, output format, and registry status
- Kanban fix:
create_tasknow emits a "blocked" event for created-blocked tasks sorecompute_readyrespects the sticky status
Tests
test_whoami_command.py: 6 tests covering dispatch, output content, registry status- Kanban: 3 new tests for created-blocked task behavior
Looks Good
- Minimal, well-scoped feature
- Good test coverage
- Kanban fix is a separate concern but correctly implemented
Reviewed by Hermes Agent
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Adds a /whoami CLI command handler so the command returns the authenticated user identity instead of "Unknown".
Changes (5 files, +191/-0)
hermes_cli/cli_commands_mixin.py: +22/-0 for whoami handlerhermes_cli/kanban_db.py: +5/-0tests/cli/test_whoami_command.py: +106 lines test coveragetests/hermes_cli/test_kanban_blocked_sticky.py: +56 linescli.py: +2/-0
Quality
- Good test coverage
- Clear fix for missing command handler
- No security concerns
Reviewed by Hermes Agent
Every non-gateway_only CommandDef must have a handler branch in process_command(). Without this gate, commands can be added to the registry — appearing in /help, autocomplete, and platform surfaces — but returning "Unknown command" at runtime because no one wired the dispatch. Currently FAILS on main due to two pre-existing gaps: indicator — NousResearch#22960, NousResearch#50618 (5 open PRs) whoami — NousResearch#51190 This PR is blocked until those handlers are merged. Once they land, the gate self-resolves and any future handler-less CommandDef fails CI immediately. Prior art in this codebase: test_commands_dict_includes_all_cli_commands and tests/providers/test_provider_profiles.py use the same enumeration- gate pattern against their respective registries.
Fixes #51009
Problem
The
/whoamislash command is registered inCOMMAND_REGISTRY, listed in/help, offered by tab-completion, and advertised by the tips system — butprocess_command()incli.pyhad no dispatch branch for it. Typing/whoamiin the CLI, TUI, or Desktop app fell through to the prefix matcher and printed "Unknown command: /whoami".The same command works correctly on gateway platforms (Telegram/Discord/Slack) because those route through
gateway/slash_commands.py, which has a_handle_whoami_commandhandler.Root Cause
/whoamihas nogateway_onlyflag — it's a user-facing "Info" command that should work everywhere. But when the command registry was added (including thewhoamientry), no correspondingelif canonical == "whoami"branch was added to the CLI dispatch chain incli.py. The command definition exists, the help text exists, but the handler was never wired up.Fix
cli.py: Addelif canonical == "whoami"dispatch branch that callsself._handle_whoami_command().hermes_cli/cli_commands_mixin.py: Add_handle_whoami_command()method. In the CLI context there is no platform-mediated slash-access policy — the operator is always the owner. The handler mirrors the gateway's/whoamioutput shape (surface, profile, tier) so users see a familiar format regardless of which surface they're on.tests/cli/test_whoami_command.py: Tests covering:Changes
cli.py: Addedelif canonical == "whoami"dispatch branchhermes_cli/cli_commands_mixin.py: Added_handle_whoami_command()methodtests/cli/test_whoami_command.py: New test file (8 tests, all passing)Impact
/whoamicommand in CLI, TUI, and Desktop app surfaces/whoamicorrectly)