UAT: agents actor context has two conflicting sub-apps registered — actor_context.py and context.py both registered under same name #6030

Open
opened 2026-04-09 13:52:36 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: context-assembly-cli
Severity: Critical — undefined behavior for all agents actor context subcommands
Spec Reference: §agents actor context (spec lines 5767–6354)


What Was Tested

Code-level analysis of CLI command registration in src/cleveragents/cli/main.py and src/cleveragents/cli/commands/actor.py.

Expected Behavior (from spec)

agents actor context should have a single, consistent set of subcommands: remove, list, show, export, import, clear.

Actual Behavior

Two different Typer sub-apps are registered under the name "context" within the actor app:

  1. actor_context.py (actor_context_app) — registered in actor.py line 966:

    app.add_typer(actor_context_app, name="context")
    

    Contains: remove, export, import

  2. context.py (context.app) — registered in main.py lines 116–119:

    actor.app.add_typer(
        context.app,
        name="context",
        help="Actor context management commands",
    )
    

    Contains: add, load, remove, rm, list, show, export, import, delete, clear

This creates a naming conflict where agents actor context has two different apps registered under the same name. Typer's behavior when two sub-apps share the same name is undefined — one will shadow the other, leading to inconsistent command availability depending on registration order.

Code Locations

  • src/cleveragents/cli/commands/actor.py line 966: app.add_typer(actor_context_app, name="context")
  • src/cleveragents/cli/main.py lines 116–119: actor.app.add_typer(context.app, name="context", ...)
  • src/cleveragents/cli/commands/actor_context.py — the actor_context_app
  • src/cleveragents/cli/commands/context.py — the context.app

Impact

  • All agents actor context subcommands may behave inconsistently
  • The actor_context.py app (which implements the spec-correct named-context paradigm) may be shadowed by context.py (which implements a project-based file context paradigm)
  • The two apps have different command signatures for the same subcommand names (e.g., remove, export, import)

Steps to Reproduce

  1. Inspect src/cleveragents/cli/main.py lines 115–120
  2. Inspect src/cleveragents/cli/commands/actor.py line 966
  3. Both register a Typer app named "context" under the actor app

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area**: context-assembly-cli **Severity**: Critical — undefined behavior for all `agents actor context` subcommands **Spec Reference**: §agents actor context (spec lines 5767–6354) --- ## What Was Tested Code-level analysis of CLI command registration in `src/cleveragents/cli/main.py` and `src/cleveragents/cli/commands/actor.py`. ## Expected Behavior (from spec) `agents actor context` should have a single, consistent set of subcommands: `remove`, `list`, `show`, `export`, `import`, `clear`. ## Actual Behavior Two different Typer sub-apps are registered under the name `"context"` within the `actor` app: 1. **`actor_context.py`** (`actor_context_app`) — registered in `actor.py` line 966: ```python app.add_typer(actor_context_app, name="context") ``` Contains: `remove`, `export`, `import` 2. **`context.py`** (`context.app`) — registered in `main.py` lines 116–119: ```python actor.app.add_typer( context.app, name="context", help="Actor context management commands", ) ``` Contains: `add`, `load`, `remove`, `rm`, `list`, `show`, `export`, `import`, `delete`, `clear` This creates a naming conflict where `agents actor context` has two different apps registered under the same name. Typer's behavior when two sub-apps share the same name is undefined — one will shadow the other, leading to inconsistent command availability depending on registration order. ## Code Locations - `src/cleveragents/cli/commands/actor.py` line 966: `app.add_typer(actor_context_app, name="context")` - `src/cleveragents/cli/main.py` lines 116–119: `actor.app.add_typer(context.app, name="context", ...)` - `src/cleveragents/cli/commands/actor_context.py` — the `actor_context_app` - `src/cleveragents/cli/commands/context.py` — the `context.app` ## Impact - All `agents actor context` subcommands may behave inconsistently - The `actor_context.py` app (which implements the spec-correct named-context paradigm) may be shadowed by `context.py` (which implements a project-based file context paradigm) - The two apps have different command signatures for the same subcommand names (e.g., `remove`, `export`, `import`) ## Steps to Reproduce 1. Inspect `src/cleveragents/cli/main.py` lines 115–120 2. Inspect `src/cleveragents/cli/commands/actor.py` line 966 3. Both register a Typer app named `"context"` under the `actor` app --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 14:31:51 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
HAL9000 modified the milestone from v3.2.0 to v3.4.0 2026-04-09 15:01:04 +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.

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