UAT: agents actor run missing spec-required "Actor Run" output panel — outputs raw text instead of structured panel with Actor, Tokens, Duration #3611

Open
opened 2026-04-05 20:28:03 +00:00 by freemo · 0 comments
Owner

Background and Context

The specification defines that agents actor run should produce a structured "Actor Run" panel showing the actor name, output file (if specified), token count, and duration. The current implementation in src/cleveragents/cli/commands/actor.py outputs raw text with no panel, no token count, and no duration display — a clear deviation from the spec.

Current Behavior

In src/cleveragents/cli/commands/actor.py, the run() function (~line 183-200) outputs the result as raw text:

result = asyncio.run(_execute())
...
if output:
    output.write_text(result)
    typer.echo(f"Output written to {output}")
else:
    typer.echo(result)

There is no "Actor Run" panel, no token count, no duration display, and no structured output format.

Expected Behavior

Per the specification, agents actor run local/reviewer "Write a code review report" should produce:

Rich output:

╭─ Actor Run ───────────────╮
│ Actor: local/reviewer     │
│ Output: review.md         │
│ Tokens: 4,120             │
│ Duration: 6.8s            │
╰───────────────────────────╯

✓ OK Output written to review.md (2.4 KB)

JSON output (with --format json):

{
  "data": {
    "actor_run": {
      "actor": "local/reviewer",
      "output": "review.md",
      "tokens": 4120,
      "duration_s": 6.8
    }
  }
}

Code Location

  • src/cleveragents/cli/commands/actor.pyrun() function (~line 183-200): outputs raw text instead of structured panel

Metadata

  • Branch: fix/actor-run-output-panel
  • Commit Message: fix(cli/actor): render spec-required "Actor Run" panel with tokens and duration
  • Milestone: (none — backlog)
  • Parent Epic: #392

Subtasks

  • Capture wall-clock duration around the asyncio.run(_execute()) call in run()
  • Extract token usage from the LLM response object and surface it through the return value or a side-channel
  • Implement a Rich Panel renderer for the "Actor Run" summary (Actor, Output, Tokens, Duration)
  • Wire the panel into the existing --format dispatch (rich / json / yaml / plain)
  • Add actor_run key to the JSON/YAML structured output schema
  • Write Behave unit-test scenarios covering: panel rendered, token count displayed, duration displayed, --format json output shape
  • Write Robot Framework integration test asserting the panel appears on a real agents actor run invocation
  • Ensure all nox sessions pass (lint, typecheck, unit_tests, integration_tests, coverage_report)

Definition of Done

  • agents actor run renders a Rich "Actor Run" panel containing Actor, Output (when --output is given), Tokens, and Duration fields
  • Token count is captured from the LLM response and displayed correctly
  • Duration is measured end-to-end and displayed in seconds (one decimal place)
  • --format json produces {"data": {"actor_run": {...}}} with actor, output, tokens, duration_s keys
  • --format yaml and --format plain produce equivalent structured output
  • Behave scenarios cover all new rendering paths with ≥ 97% unit coverage
  • Robot Framework integration test validates panel output on a live run
  • All nox stages pass
  • Coverage >= 97%
  • PR is reviewed, approved (≥ 2 approvals), and merged; this issue is closed

Backlog note: This issue was discovered during autonomous operation
on milestone v3.2.0. 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: Acting on behalf of: UAT Testing | Agent: ca-new-issue-creator

## Background and Context The specification defines that `agents actor run` should produce a structured "Actor Run" panel showing the actor name, output file (if specified), token count, and duration. The current implementation in `src/cleveragents/cli/commands/actor.py` outputs raw text with no panel, no token count, and no duration display — a clear deviation from the spec. ## Current Behavior In `src/cleveragents/cli/commands/actor.py`, the `run()` function (~line 183-200) outputs the result as raw text: ```python result = asyncio.run(_execute()) ... if output: output.write_text(result) typer.echo(f"Output written to {output}") else: typer.echo(result) ``` There is no "Actor Run" panel, no token count, no duration display, and no structured output format. ## Expected Behavior Per the specification, `agents actor run local/reviewer "Write a code review report"` should produce: **Rich output:** ``` ╭─ Actor Run ───────────────╮ │ Actor: local/reviewer │ │ Output: review.md │ │ Tokens: 4,120 │ │ Duration: 6.8s │ ╰───────────────────────────╯ ✓ OK Output written to review.md (2.4 KB) ``` **JSON output (with `--format json`):** ```json { "data": { "actor_run": { "actor": "local/reviewer", "output": "review.md", "tokens": 4120, "duration_s": 6.8 } } } ``` ## Code Location - `src/cleveragents/cli/commands/actor.py` — `run()` function (~line 183-200): outputs raw text instead of structured panel --- ## Metadata - **Branch**: `fix/actor-run-output-panel` - **Commit Message**: `fix(cli/actor): render spec-required "Actor Run" panel with tokens and duration` - **Milestone**: *(none — backlog)* - **Parent Epic**: #392 --- ## Subtasks - [ ] Capture wall-clock duration around the `asyncio.run(_execute())` call in `run()` - [ ] Extract token usage from the LLM response object and surface it through the return value or a side-channel - [ ] Implement a Rich `Panel` renderer for the "Actor Run" summary (Actor, Output, Tokens, Duration) - [ ] Wire the panel into the existing `--format` dispatch (rich / json / yaml / plain) - [ ] Add `actor_run` key to the JSON/YAML structured output schema - [ ] Write Behave unit-test scenarios covering: panel rendered, token count displayed, duration displayed, `--format json` output shape - [ ] Write Robot Framework integration test asserting the panel appears on a real `agents actor run` invocation - [ ] Ensure all nox sessions pass (`lint`, `typecheck`, `unit_tests`, `integration_tests`, `coverage_report`) --- ## Definition of Done - [ ] `agents actor run` renders a Rich "Actor Run" panel containing Actor, Output (when `--output` is given), Tokens, and Duration fields - [ ] Token count is captured from the LLM response and displayed correctly - [ ] Duration is measured end-to-end and displayed in seconds (one decimal place) - [ ] `--format json` produces `{"data": {"actor_run": {...}}}` with `actor`, `output`, `tokens`, `duration_s` keys - [ ] `--format yaml` and `--format plain` produce equivalent structured output - [ ] Behave scenarios cover all new rendering paths with ≥ 97% unit coverage - [ ] Robot Framework integration test validates panel output on a live run - [ ] All nox stages pass - [ ] Coverage >= 97% - [ ] PR is reviewed, approved (≥ 2 approvals), and merged; this issue is closed > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.2.0. 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: Acting on behalf of: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 20:29:25 +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.

Blocks
#392 Epic: Actor YAML & Compiler
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3611
No description provided.