Commit Graph

6 Commits

Author SHA1 Message Date
HAL9000 afe89964df chore(tests): remove stale tdd_expected_fail tags from tests now passing on master
CI / push-validation (pull_request) Successful in 26s
CI / helm (pull_request) Successful in 50s
CI / lint (pull_request) Successful in 52s
CI / build (pull_request) Successful in 51s
CI / quality (pull_request) Successful in 52s
CI / security (pull_request) Successful in 1m15s
CI / typecheck (pull_request) Successful in 1m35s
CI / unit_tests (pull_request) Successful in 5m25s
CI / docker (pull_request) Successful in 1m34s
CI / integration_tests (pull_request) Failing after 10m26s
CI / coverage (pull_request) Failing after 18m51s
CI / status-check (pull_request) Has been cancelled
The tdd_expected_fail listener (robot/tdd_expected_fail_listener.py and
features/environment.py) inverts test results: a test tagged
@tdd_expected_fail that PASSES is forced to FAIL with the message
"Bug appears to be fixed. Remove the tdd_expected_fail tag…".

After rebasing onto master, 22 scenarios across 11 files were triggering
that forced-failure path because the underlying bugs (#4199, #4201,
#4202, #4203, #4205, #4206, #4243, #4252, #4301, #4303, #4304) have
been fixed on master but the @tdd_expected_fail tags were never removed.
This commit removes the stale tag (keeping @tdd_issue and
@tdd_issue_<N> for traceability, per the master-side pattern in
robot/tdd_skill_add_regression.robot:9 "tag removed after bug fix").

Files touched (lines: where the stale tag was):
  features/plan_cli_spec_alignment.feature (121, 128, 136)
  robot/a2a_facade.robot (40)
  robot/actor_cli_show.robot (13, 30)
  robot/actor_configuration.robot (8)
  robot/actor_context_export_import.robot (20, 71, 92)
  robot/cli_extensions.robot (61)
  robot/cli_formats.robot (14, 23, 30, 48, 57, 85)
  robot/cli_lifecycle_e2e.robot (77, 87)
  robot/config_project_scope.robot (37)
  robot/config_resolution.robot (13)
  robot/container_tool_exec.robot (137)

Verified locally: targeted unit_tests run on
features/plan_cli_spec_alignment.feature now passes 20/20 (was 17/20
with 3 scenarios forced-failed by the inversion).

ISSUES CLOSED: #3677
2026-06-03 03:22:59 -04:00
freemo 6e47abbd63 fix(cli): fix format_output() to use rich and color renderers instead of JSON fallback
The format_output() function in src/cleveragents/cli/formatting.py had two
routing bugs that caused incorrect output for the 'rich' and 'color' formats:

1. The 'rich' format had no explicit dispatch branch and silently fell through
   to the final JSON fallback, returning raw JSON instead of styled terminal
   output. Since 'rich' is the default CLI format (per ADR-021), this meant
   all commands using format_output() (version, info, diagnostics) produced
   JSON by default.

2. The 'color' format was incorrectly routed to _format_plain() instead of a
   color-aware renderer, producing plain text with no ANSI color codes.

Fix:
- Added _format_rich() helper that delegates to RichMaterializer via
  OutputSession, producing ANSI-styled terminal output consistent with
  format_output_session().
- Added _format_color() helper that delegates to ColorMaterializer via
  OutputSession, producing ANSI-colored terminal output.
- Added explicit OutputFormat.RICH dispatch in format_output() routing.
- Fixed OutputFormat.COLOR dispatch to use _format_color() instead of
  _format_plain().

Tests:
- Updated existing BDD scenario that was validating the buggy behavior
  (expected JSON for rich format) to now assert correct styled output.
- Added new BDD scenarios: 'rich format produces styled terminal output not
  JSON' and 'color format produces ANSI-colored output not plain text'.
- Added Robot Framework integration tests in cli_formats.robot and
  helper_cli_formats.py verifying end-to-end styled output for both formats.

All nox sessions pass: lint, typecheck, unit_tests, security_scan.

ISSUES CLOSED: #2921
2026-05-30 11:09:06 -04:00
freemo 8ea00f5185 fix: restore CI quality tests to passing state (#4175)
CI / unit_tests (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / typecheck (push) Has been cancelled
CI / security (push) Has been cancelled
CI / quality (push) Has been cancelled
CI / integration_tests (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
CI / build (push) Has been cancelled
CI / push-validation (push) Has been cancelled
CI / status-check (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / helm (push) Has been cancelled
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
2026-04-08 11:02:14 +00:00
freemo 4d31f0ed02 fix(cli): promote --format to global CLI callback option per spec
CI / lint (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 51s
CI / security (pull_request) Successful in 1m0s
CI / build (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 24s
CI / unit_tests (pull_request) Failing after 7m5s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 16m51s
CI / integration_tests (pull_request) Successful in 23m16s
CI / coverage (pull_request) Successful in 10m39s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 56m46s
Add `fmt: OutputFormat` parameter to `main_callback()` in
`src/cleveragents/cli/main.py` and store the selected format in
`ctx.obj["format"]` so all subcommands can read it without needing
their own per-command `--format` flag.

Remove per-command `--format` / `fmt` parameters from `version()`,
`info()`, and `diagnostics()` commands. These commands now read the
format from `ctx.obj.get("format", OutputFormat.RICH.value)`.

The specification states: "The framework supports six distinct output
formats, selectable via the global `--format` flag." This change
aligns the implementation with the spec by making `--format` a global
option on the root `agents` command (via the Typer callback).

All six formats (json, yaml, plain, rich, table, color) are supported
via the global flag and the `-f` shorthand.

Add Behave BDD scenarios covering global `--format` flag propagation
to subcommands for all six formats. Update Robot Framework integration
tests to exercise the global `--format` flag. Update existing tests
that used per-command `--format` for version/info/diagnostics to use
the global flag instead.

ISSUES CLOSED: #2908
2026-04-05 08:39:14 +00:00
freemo 48cff5cfe0 refactor(cli): rename plan lifecycle-list and lifecycle-apply to match specification
CI / build (push) Successful in 18s
CI / lint (push) Failing after 31s
CI / helm (push) Successful in 33s
CI / typecheck (push) Successful in 50s
CI / security (push) Failing after 51s
CI / coverage (push) Has been skipped
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Failing after 1m50s
CI / docker (push) Has been skipped
CI / quality (push) Successful in 3m43s
CI / integration_tests (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / status-check (push) Has been cancelled
Renames `plan lifecycle-list` to `plan list` and `plan lifecycle-apply` to `plan apply` to align with the specification's canonical command names. Removes legacy V2 plan commands that occupied those names.

- Renamed CLI command registrations from lifecycle-list/lifecycle-apply to list/apply
- Removed legacy V2 apply and list commands (~200 lines)
- Updated apply shortcut in main.py to delegate to v3 lifecycle
- Added defensive null check for plan existence in apply command
- Updated 63+ test, doc, and benchmark files for consistency

Closes #881

Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
2026-04-02 19:09:04 +00:00
Jeff (CTO) 156e3ffde9 feat(cli): stabilize action/plan output formats
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / lint (pull_request) Successful in 13s
CI / typecheck (pull_request) Successful in 27s
CI / security (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 4m38s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 9m35s
CI / docker (pull_request) Successful in 37s
CI / coverage (pull_request) Successful in 6m57s
2026-02-14 13:51:12 -05:00