UAT: Global --data-dir and --config-path options missing from main CLI callback — spec requires path override flags on all commands #2525

Closed
opened 2026-04-03 18:46:52 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/cli-global-path-options
  • Commit Message: fix(cli): add global --data-dir and --config-path options to main callback
  • Milestone: v3.6.0
  • Parent Epic: #945

Description

The specification defines two global options that should be available on every agents command:

  • --data-dir <DATA_PATH>: Overrides the global data directory
  • --config-path <CONFIG_PATH>: Overrides the global configuration file path

What was tested:
Code analysis of /app/src/cleveragents/cli/main.py — specifically the main_callback function decorated with @app.callback().

Expected behavior (from spec):
The main CLI callback should accept --data-dir and --config-path as global options, allowing users to override the default data directory and config file path for any command invocation.

Actual behavior:
The main_callback function (lines 292-310 of main.py) only accepts version and show_secrets options. Neither --data-dir nor --config-path are defined as global options. There is no mechanism to override the data directory or config path at the CLI level.

@app.callback()
def main_callback(
    version: bool = typer.Option(...),
    show_secrets: bool = typer.Option(...),
) -> None:

Code location:
/app/src/cleveragents/cli/main.py lines 292-310

Steps to reproduce:

  1. Run agents --data-dir /tmp/mydata version → error: unrecognized option
  2. Run agents --config-path /tmp/myconfig.toml info → error: unrecognized option

Impact:
Users cannot override the data directory or config file path, making it impossible to run multiple isolated CleverAgents instances or use non-default config locations from the CLI.

Suggested fix:
Add --data-dir and --config-path options to main_callback and wire them to the container/config system:

@app.callback()
def main_callback(
    version: bool = ...,
    show_secrets: bool = ...,
    data_dir: Path | None = typer.Option(None, "--data-dir", help="Override global data directory"),
    config_path: Path | None = typer.Option(None, "--config-path", help="Override global config file path"),
) -> None:

Subtasks

  • Add --data-dir option to main_callback in main.py
  • Add --config-path option to main_callback in main.py
  • Wire options to the DI container/config system
  • Add Behave unit tests for path override behavior
  • Add Robot Framework integration tests
  • Update PR and close this issue

Definition of Done

  • --data-dir and --config-path are accepted as global options on all commands
  • Options correctly override the data directory and config file path
  • Unit test coverage ≥ 97%
  • All nox sessions pass
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/cli-global-path-options` - **Commit Message**: `fix(cli): add global --data-dir and --config-path options to main callback` - **Milestone**: v3.6.0 - **Parent Epic**: #945 ## Description The specification defines two global options that should be available on every `agents` command: - `--data-dir <DATA_PATH>`: Overrides the global data directory - `--config-path <CONFIG_PATH>`: Overrides the global configuration file path **What was tested:** Code analysis of `/app/src/cleveragents/cli/main.py` — specifically the `main_callback` function decorated with `@app.callback()`. **Expected behavior (from spec):** The main CLI callback should accept `--data-dir` and `--config-path` as global options, allowing users to override the default data directory and config file path for any command invocation. **Actual behavior:** The `main_callback` function (lines 292-310 of `main.py`) only accepts `version` and `show_secrets` options. Neither `--data-dir` nor `--config-path` are defined as global options. There is no mechanism to override the data directory or config path at the CLI level. ```python @app.callback() def main_callback( version: bool = typer.Option(...), show_secrets: bool = typer.Option(...), ) -> None: ``` **Code location:** `/app/src/cleveragents/cli/main.py` lines 292-310 **Steps to reproduce:** 1. Run `agents --data-dir /tmp/mydata version` → error: unrecognized option 2. Run `agents --config-path /tmp/myconfig.toml info` → error: unrecognized option **Impact:** Users cannot override the data directory or config file path, making it impossible to run multiple isolated CleverAgents instances or use non-default config locations from the CLI. **Suggested fix:** Add `--data-dir` and `--config-path` options to `main_callback` and wire them to the container/config system: ```python @app.callback() def main_callback( version: bool = ..., show_secrets: bool = ..., data_dir: Path | None = typer.Option(None, "--data-dir", help="Override global data directory"), config_path: Path | None = typer.Option(None, "--config-path", help="Override global config file path"), ) -> None: ``` ## Subtasks - [ ] Add `--data-dir` option to `main_callback` in `main.py` - [ ] Add `--config-path` option to `main_callback` in `main.py` - [ ] Wire options to the DI container/config system - [ ] Add Behave unit tests for path override behavior - [ ] Add Robot Framework integration tests - [ ] Update PR and close this issue ## Definition of Done - [ ] `--data-dir` and `--config-path` are accepted as global options on all commands - [ ] Options correctly override the data directory and config file path - [ ] Unit test coverage ≥ 97% - [ ] All nox sessions pass - All nox stages pass - Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.6.0 milestone 2026-04-03 18:47:02 +00:00
Author
Owner

Closing as duplicate of #2409. Both issues report the same missing --data-dir and --config-path global CLI options.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Closing as duplicate of #2409. Both issues report the same missing `--data-dir` and `--config-path` global CLI options. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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#2525
No description provided.