UAT: Unicode symbols (✓, ✗, •, ⚠, →) in CLI success/status messages are not guarded by format checks, breaking plain/JSON output and screen reader compatibility #4088

Open
opened 2026-04-06 10:12:47 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/cli-unicode-symbols-format-guard
  • Commit Message: fix(cli): guard Unicode symbols in success/status messages behind format checks
  • Milestone: (none — backlog)
  • Parent Epic: #399 (Post-MVP Server & Clients — nearest applicable CLI epic)

Bug Report

What was tested: Whether CLI success/status messages containing Unicode symbols (✓, ✗, •, ⚠, →) are properly guarded by format checks, so that plain-format output and screen reader users receive ASCII-only text.

Expected behavior (from spec, line 393):

The spec states that plain format provides "Plain text with no color codes or non-ASCII characters". When --format plain is used (or NO_COLOR is set), success messages should use ASCII equivalents:

  • OK or [OK]
  • FAIL or [FAIL]
  • - or *
  • [WARN]
  • ->

Actual behavior (from code analysis):

Approximately 35 console.print() calls across CLI command modules emit Unicode symbols without checking the current output format. These symbols appear even when --format plain is specified, because the commands use direct console.print() calls rather than the render_success()/render_warning() helpers that do format-check.

Affected files (representative sample):

src/cleveragents/cli/commands/skill.py:

console.print(f"[green]✓ OK[/green] Skill {verb} with {total_tools} tools")  # line 225
console.print("[green]✓ OK[/green] Skill loaded")  # line 383
console.print(f"[green]✓ OK[/green] {summary.total_tools} tools listed")  # line 448
console.print(f"[red]✗ Error:[/red] {error_msg}")  # line 527
console.print("[green]✓ OK[/green] Skill removed")  # line 624
console.print(f"[green]✓ OK[/green] {len(skills)} skills listed")  # line 744

src/cleveragents/cli/commands/actor.py:

console.print("[green bold]✓ OK[/green bold] Actor added")  # line 416
console.print("[green bold]✓ OK[/green bold] Actor removed")  # line 710
console.print(f"[green bold]✓ OK[/green bold] {total_actors} actors listed")  # line 788

src/cleveragents/cli/commands/session.py:

console.print("[green]✓ OK[/green] Session created")  # line 250
console.print(f"[green]✓ OK[/green] {len(sessions)} sessions listed")  # line 345
console.print("[green bold]✓ OK[/green bold] Session details loaded")  # line 441
console.print("[green]✓ OK[/green] Session deleted")  # line 523

src/cleveragents/cli/commands/context.py:

console.print(f"  • {file}")  # line 269 — bullet point in file lists
console.print(f"  • {file_path}")  # line 275

src/cleveragents/cli/commands/config.py:

console.print(f"  {src:14s}{display_val}{marker}")  # line 367 — arrow in config resolution chain

src/cleveragents/cli/commands/plan.py:

console.print(f"  • {p.identity.plan_id}: {p.namespaced_name}")  # line 2135
console.print(f"[green bold]✓ OK[/green bold] {total_plans} {plan_word} listed")  # line 2680

Contrast with correct pattern: The render_success(), render_warning(), and render_error() helpers in src/cleveragents/cli/renderers.py correctly check the format and use ASCII prefixes (OK:, WARNING:, ERROR:) for plain format. However, these helpers are never used by any command module — all commands use direct console.print() calls.

Screen reader impact: Screen readers and braille displays may not correctly vocalize Unicode symbols like ✓ (U+2713 CHECK MARK) or ✗ (U+2717 BALLOT X). Plain ASCII alternatives (OK, FAIL, [OK], [FAIL]) are universally readable.

Steps to reproduce:

agents actor list --format plain
# Expected: "OK: 3 actors listed" (ASCII)
# Actual: "✓ OK 3 actors listed" (Unicode symbol present)

Subtasks

  • Audit all console.print() calls containing Unicode symbols (✓, ✗, •, ⚠, →) in CLI command modules
  • Add format checks to each affected call site, using ASCII alternatives for plain/table formats
  • Alternatively, migrate affected call sites to use the existing render_success()/render_warning() helpers which already handle format-aware output
  • Add BDD test scenarios verifying --format plain output contains no non-ASCII characters in success messages

Definition of Done

  • agents <any-command> --format plain produces output with no Unicode symbols in status/success messages
  • NO_COLOR set + default format produces ASCII-only status messages
  • All existing tests pass
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done
  • All nox stages pass
  • Coverage >= 97%

Backlog note: This issue was discovered during autonomous operation
on milestone v3.8.0 (Post-MVP Server & Clients). It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/cli-unicode-symbols-format-guard` - **Commit Message**: `fix(cli): guard Unicode symbols in success/status messages behind format checks` - **Milestone**: (none — backlog) - **Parent Epic**: #399 (Post-MVP Server & Clients — nearest applicable CLI epic) ## Bug Report **What was tested:** Whether CLI success/status messages containing Unicode symbols (✓, ✗, •, ⚠, →) are properly guarded by format checks, so that plain-format output and screen reader users receive ASCII-only text. **Expected behavior (from spec, line 393):** The spec states that `plain` format provides "Plain text with no color codes or **non-ASCII characters**". When `--format plain` is used (or `NO_COLOR` is set), success messages should use ASCII equivalents: - `✓` → `OK` or `[OK]` - `✗` → `FAIL` or `[FAIL]` - `•` → `-` or `*` - `⚠` → `[WARN]` - `→` → `->` **Actual behavior (from code analysis):** Approximately 35 `console.print()` calls across CLI command modules emit Unicode symbols **without checking the current output format**. These symbols appear even when `--format plain` is specified, because the commands use direct `console.print()` calls rather than the `render_success()`/`render_warning()` helpers that do format-check. **Affected files (representative sample):** `src/cleveragents/cli/commands/skill.py`: ```python console.print(f"[green]✓ OK[/green] Skill {verb} with {total_tools} tools") # line 225 console.print("[green]✓ OK[/green] Skill loaded") # line 383 console.print(f"[green]✓ OK[/green] {summary.total_tools} tools listed") # line 448 console.print(f"[red]✗ Error:[/red] {error_msg}") # line 527 console.print("[green]✓ OK[/green] Skill removed") # line 624 console.print(f"[green]✓ OK[/green] {len(skills)} skills listed") # line 744 ``` `src/cleveragents/cli/commands/actor.py`: ```python console.print("[green bold]✓ OK[/green bold] Actor added") # line 416 console.print("[green bold]✓ OK[/green bold] Actor removed") # line 710 console.print(f"[green bold]✓ OK[/green bold] {total_actors} actors listed") # line 788 ``` `src/cleveragents/cli/commands/session.py`: ```python console.print("[green]✓ OK[/green] Session created") # line 250 console.print(f"[green]✓ OK[/green] {len(sessions)} sessions listed") # line 345 console.print("[green bold]✓ OK[/green bold] Session details loaded") # line 441 console.print("[green]✓ OK[/green] Session deleted") # line 523 ``` `src/cleveragents/cli/commands/context.py`: ```python console.print(f" • {file}") # line 269 — bullet point in file lists console.print(f" • {file_path}") # line 275 ``` `src/cleveragents/cli/commands/config.py`: ```python console.print(f" {src:14s} → {display_val}{marker}") # line 367 — arrow in config resolution chain ``` `src/cleveragents/cli/commands/plan.py`: ```python console.print(f" • {p.identity.plan_id}: {p.namespaced_name}") # line 2135 console.print(f"[green bold]✓ OK[/green bold] {total_plans} {plan_word} listed") # line 2680 ``` **Contrast with correct pattern:** The `render_success()`, `render_warning()`, and `render_error()` helpers in `src/cleveragents/cli/renderers.py` correctly check the format and use ASCII prefixes (`OK:`, `WARNING:`, `ERROR:`) for plain format. However, these helpers are **never used** by any command module — all commands use direct `console.print()` calls. **Screen reader impact:** Screen readers and braille displays may not correctly vocalize Unicode symbols like ✓ (U+2713 CHECK MARK) or ✗ (U+2717 BALLOT X). Plain ASCII alternatives (`OK`, `FAIL`, `[OK]`, `[FAIL]`) are universally readable. **Steps to reproduce:** ```bash agents actor list --format plain # Expected: "OK: 3 actors listed" (ASCII) # Actual: "✓ OK 3 actors listed" (Unicode symbol present) ``` ## Subtasks - [ ] Audit all `console.print()` calls containing Unicode symbols (✓, ✗, •, ⚠, →) in CLI command modules - [ ] Add format checks to each affected call site, using ASCII alternatives for `plain`/`table` formats - [ ] Alternatively, migrate affected call sites to use the existing `render_success()`/`render_warning()` helpers which already handle format-aware output - [ ] Add BDD test scenarios verifying `--format plain` output contains no non-ASCII characters in success messages ## Definition of Done - [ ] `agents <any-command> --format plain` produces output with no Unicode symbols in status/success messages - [ ] `NO_COLOR` set + default format produces ASCII-only status messages - [ ] All existing tests pass - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done - All nox stages pass - Coverage >= 97% > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.8.0 (Post-MVP Server & Clients). It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
HAL9000 added this to the v3.5.0 milestone 2026-04-09 03:11:14 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#4088
No description provided.