fix: 4 small surgical bugs

Salvages #23302 by @Bartok9. Four independent one-area fixes:

1. kanban boards delete alias now hard-deletes (not archives) — the
   alias didn't carry --delete, so getattr(args, 'delete', False)
   returned False. Detect boards_action=='delete' explicitly.
2. Gateway auto-title failures no longer leak as user-visible
   warnings — debug-log only since they're not actionable.
3. Background process completion notification snaps truncation to
   the next newline boundary, prepends a marker when content is
   dropped.
4. _cprint() schedules the run_in_terminal coroutine via
   asyncio.ensure_future so output isn't silently dropped from
   background threads (fixes #23185 Bug A). Skips the
   double-print fallback that would fire for mock paths.
This commit is contained in:
Bartok9 2026-05-18 20:54:46 -07:00 committed by Teknium
parent 3a7ed7be08
commit 365da2d2df
3 changed files with 47 additions and 14 deletions

View file

@ -951,8 +951,13 @@ def _cmd_boards_create(args: argparse.Namespace) -> int:
def _cmd_boards_rm(args: argparse.Namespace) -> int:
# When the user runs `hermes kanban boards delete <slug>` (alias), the
# boards_action is 'delete' but args.delete is never set to True because
# the --delete flag belongs to the 'rm' subparser only. Detect the alias
# and treat it identically to `boards rm --delete` (fixes #23139).
force_delete = getattr(args, "delete", False) or getattr(args, "boards_action", "") == "delete"
try:
res = kb.remove_board(args.slug, archive=not getattr(args, "delete", False))
res = kb.remove_board(args.slug, archive=not force_delete)
except ValueError as exc:
print(f"kanban boards rm: {exc}", file=sys.stderr)
return 1