UAT: CLI missing spec-required global options --data-dir and --config-path #3747

Closed
opened 2026-04-05 22:26:00 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/cli-missing-global-options-data-dir-config-path
  • Commit Message: fix(cli): add spec-required --data-dir and --config-path global options to main_callback
  • Milestone: (none — backlog)
  • Parent Epic: #3370

Backlog note: This issue was discovered during autonomous operation
on milestone v3.6.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Background

During UAT testing of src/cleveragents/cli/main.py, the global CLI options --data-dir and --config-path specified in docs/specification.md are absent from the implementation.

Expected Behavior (from spec)

Per docs/specification.md CLI Command Synopsis:

agents|cleveragents  [--data-dir <DATA_PATH>] [--config-path <CONFIG_PATH>]
                     [--format (rich|color|table|plain|json|yaml)]
                     ...

The spec defines:

  • --data-dir PATH: Overrides the global data directory (database, caches, sessions, logs). When omitted, the default data location is used.
  • --config-path PATH: Overrides the global configuration file path. When omitted, the default config path is used.

Both are listed as global options that apply to every subcommand.

Actual Behavior (from code)

In src/cleveragents/cli/main.py, the main_callback function only accepts:

  • --version
  • --show-secrets
  • --format / -f

Neither --data-dir nor --config-path are present in the callback signature or anywhere in the main CLI entry point.

Code Location

src/cleveragents/cli/main.pymain_callback function (lines ~180-220 approximately)

Steps to Reproduce

  1. Run agents --help
  2. Observe that --data-dir and --config-path are not listed in the global options

Impact

Users cannot override the data directory or config file path from the CLI, which is required for:

  • Running multiple isolated CleverAgents environments
  • CI/CD pipelines that need to specify custom config locations
  • Testing with non-default data directories

Subtasks

  • Add --data-dir PATH option to main_callback in src/cleveragents/cli/main.py
  • Add --config-path PATH option to main_callback in src/cleveragents/cli/main.py
  • Store both values in ctx.obj so subcommands can access them
  • Wire --data-dir to override the container's data directory configuration
  • Wire --config-path to override the container's config file path
  • Add unit tests (Behave) for both options
  • Verify agents --help shows both options

Definition of Done

  • agents --help shows --data-dir and --config-path as global options
  • Both options are wired to override the respective paths in the DI container
  • Unit test coverage >= 97% maintained
  • Associated PR is merged
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/cli-missing-global-options-data-dir-config-path` - **Commit Message**: `fix(cli): add spec-required --data-dir and --config-path global options to main_callback` - **Milestone**: *(none — backlog)* - **Parent Epic**: #3370 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.6.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Background During UAT testing of `src/cleveragents/cli/main.py`, the global CLI options `--data-dir` and `--config-path` specified in `docs/specification.md` are absent from the implementation. ## Expected Behavior (from spec) Per `docs/specification.md` CLI Command Synopsis: ``` agents|cleveragents [--data-dir <DATA_PATH>] [--config-path <CONFIG_PATH>] [--format (rich|color|table|plain|json|yaml)] ... ``` The spec defines: - `--data-dir PATH`: Overrides the global data directory (database, caches, sessions, logs). When omitted, the default data location is used. - `--config-path PATH`: Overrides the global configuration file path. When omitted, the default config path is used. Both are listed as global options that apply to every subcommand. ## Actual Behavior (from code) In `src/cleveragents/cli/main.py`, the `main_callback` function only accepts: - `--version` - `--show-secrets` - `--format` / `-f` Neither `--data-dir` nor `--config-path` are present in the callback signature or anywhere in the main CLI entry point. ## Code Location `src/cleveragents/cli/main.py` — `main_callback` function (lines ~180-220 approximately) ## Steps to Reproduce 1. Run `agents --help` 2. Observe that `--data-dir` and `--config-path` are not listed in the global options ## Impact Users cannot override the data directory or config file path from the CLI, which is required for: - Running multiple isolated CleverAgents environments - CI/CD pipelines that need to specify custom config locations - Testing with non-default data directories ## Subtasks - [ ] Add `--data-dir PATH` option to `main_callback` in `src/cleveragents/cli/main.py` - [ ] Add `--config-path PATH` option to `main_callback` in `src/cleveragents/cli/main.py` - [ ] Store both values in `ctx.obj` so subcommands can access them - [ ] Wire `--data-dir` to override the container's data directory configuration - [ ] Wire `--config-path` to override the container's config file path - [ ] Add unit tests (Behave) for both options - [ ] Verify `agents --help` shows both options ## Definition of Done - [ ] `agents --help` shows `--data-dir` and `--config-path` as global options - [ ] Both options are wired to override the respective paths in the DI container - [ ] Unit test coverage >= 97% maintained - [ ] Associated PR is merged - All nox stages pass - Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
Member

Duplicate — consolidated into #6785.

This ticket describes the same issue as #1367, #2409, #3615, #5192, #5497, #5712, and #6878: the global CLI options --data-dir, --config-path, and -v are missing from main_callback() in src/cleveragents/cli/main.py.

All content from this ticket has been aggregated into #6785, which is now the canonical tracking issue. This ticket is being closed as a duplicate. Please follow and comment on #6785 going forward.

**Duplicate — consolidated into #6785.** This ticket describes the same issue as #1367, #2409, #3615, #5192, #5497, #5712, and #6878: the global CLI options `--data-dir`, `--config-path`, and `-v` are missing from `main_callback()` in `src/cleveragents/cli/main.py`. All content from this ticket has been aggregated into **#6785**, which is now the canonical tracking issue. This ticket is being closed as a duplicate. Please follow and comment on #6785 going forward.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#3747
No description provided.