#905 hwe logs_workflow is a dead command: decorated @cli.group() instead of @logs.command(), unreachable in both spellings

open medium bug cli Created 2026-08-22 11:57 · Updated 2026-08-22 11:57

Description

Edit
EARS SPEC: - The hwe CLI shall expose a working command for reading a workflow's logs. - A click command function that is never reachable from the CLI shall be treated as a defect, not dead weight to preserve. FOUND DURING #859 (split of enterprise/cli/hwe.py). PRE-EXISTING - preserved verbatim by that refactor because it was a pure move; NOT introduced by the split. DEFECT: in the pre-split file, line 683 decorated `logs_workflow` with @cli.group() instead of @logs.command(name="workflow") Consequences, both verified against the imported command tree: 1. It registers as a TOP-LEVEL group named `logs-workflow` (click derives the name from the function name, underscore -> hyphen), not as a subcommand of `logs`. 2. That group has ZERO subcommands. So `hwe logs-workflow <run_id>` parses as "group invoked with no subcommand" and click just prints help - `cmd_workflow` is NEVER called. 3. `hwe logs workflow <run_id>` does not exist at all. So the command is dead in both spellings: the intended path is unreachable, and the accidental path is inert. Whatever `cmd_workflow` does has never run via the CLI. WHY IT WENT UNNOTICED: `hwe --help` still lists `logs-workflow`, so the CLI looks complete. Only invoking it reveals it does nothing but print help. No test covers it. FIX: decorate as `@logs.command(name="workflow")` so it becomes `hwe logs workflow <run_id>`, then confirm by INVOKING it against a real run_id - not by checking it appears in --help, which is exactly the check that failed to catch this. DECIDE FIRST: `hwe logs-workflow` has been in --help for a long time. If anything scripts against that spelling it is currently a no-op, so nothing can depend on its BEHAVIOUR - but confirm before removing the top-level name.

Comments

Loading comments...

Context

Loading context...

Audit History

View All
Loading audit history...