Commit Graph

9 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
hurui200320 2005b8ef82 feat(tests): replace all @skip tags with proper @tdd_expected_fail tags or remove them across the entire codebase (#7221)
CI / push-validation (push) Successful in 18s
CI / build (push) Successful in 19s
CI / helm (push) Successful in 24s
CI / lint (push) Successful in 29s
CI / security (push) Successful in 1m11s
CI / e2e_tests (push) Successful in 2m56s
CI / quality (push) Successful in 3m40s
CI / typecheck (push) Successful in 3m59s
CI / integration_tests (push) Successful in 4m3s
CI / unit_tests (push) Successful in 4m55s
CI / docker (push) Successful in 10s
CI / coverage (push) Successful in 10m44s
CI / status-check (push) Successful in 1s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Successful in 1h13m28s
## Summary

Replaces all 234 bare `@skip` occurrences across 82 Behave feature files with the correct TDD issue-capture tagging system described in CONTRIBUTING.md § Bug Fix Workflow.

Previously, the noxfile ran Behave with `--tags=not @skip`, silently excluding all `@skip`-tagged scenarios from every CI run. These tests never ran, never inverted results via the `@tdd_expected_fail` mechanism, and never contributed to coverage — defeating the purpose of TDD issue-capture testing. Every `@skip` occurrence had a commented-out hint line immediately above it showing the intended proper tags (e.g., `# @tdd_issue @tdd_issue_4272 @tdd_expected_fail @skip`), confirming they were all intended for conversion.

## Changes

### Mechanical conversion (234 replacements across 82 files)
- Extracted the proper TDD tags from the comment hint above each `@skip` line, removed `@skip` from the tag set, and replaced the `@skip` line with those tags.
- Removed the now-redundant comment hint lines alongside each replacement.

### Bug-fixed scenarios — `@tdd_expected_fail` removed (84 scenarios)
- After conversion, ran `nox -s unit_tests` to identify which newly-enabled `@tdd_expected_fail` scenarios now **pass** (their referenced bugs have already been fixed). Removed `@tdd_expected_fail` from those 84 scenarios and their corresponding feature-level tags, leaving only the permanent `@tdd_issue @tdd_issue_<N>` regression-guard tags.
- Affected features include: `tdd_tool_runner_env_precedence`, `tdd_automation_profile_session_leak`, `tls_certificate_check`, `project_create_persist`, `resource_type_bootstrap_*`, and 18 others.

### Noxfile cleanup
- Removed all four `--tags=not @skip` arguments from `noxfile.py` (unit_tests and coverage sessions). With zero `@skip` tags remaining in the codebase, this filter was dead code and its presence would mislead future maintainers into thinking `@skip` is still a supported escape mechanism.

### Regression guard files
- Split the regression guards into two focused files:
  - `tdd_regression_guards_exec_env.feature` for bug #4281 (exec-env precedence)
  - `tdd_regression_guards_session_list.feature` for bug #4271 (session list summary)
- Each file carries only its own `@tdd_issue` tags at the feature level, avoiding cross-contamination via Behave tag inheritance. The `Background` step (`session-list-summary mock`) only appears in the session-list file where it is actually needed.

### Duplicate tag cleanup
- Removed duplicate `@tdd_issue @tdd_issue_4287` tag lines in `tdd_skill_add_regression.feature` (lines 20 and 29).

### Inline comment for retained `@tdd_expected_fail`
- Added inline comment in `ci_workflow_validation.feature:134` explaining why this specific #4227 scenario retains `@tdd_expected_fail` despite #4227 being closed (CI YAML does not encode threshold as a machine-readable value).

### Known edge cases — `@tdd_expected_fail` retained (closed issues, fix on master, scenarios still fail)
The following issues are **closed** and their fixes **are on master**, but the specific test assertions still fail because the fixes address other aspects of the bugs. The `@tdd_expected_fail` tags are functionally correct and must remain until the specific scenario assertions pass:
- `tdd_exec_env_resolution_precedence.feature` — bug #1080 (closed 2026-03-31). The precedence-level-2-vs-4 scenario still fails.
- `session_list_summary_dedup.feature` — bug #3046 (closed 2026-04-05). The dedup-consistency scenarios still fail.
- `actor_add_update_enforcement.feature` — bug #2609 (closed 2026-04-05). The enforcement scenarios still fail.
- `ci_workflow_validation.feature:134` — #4227 (closed 2026-04-08). The CI YAML threshold assertion still fails.

## Verification

- `grep -r "@skip" features/ --include="*.feature"` → **zero results** ✓
- `grep -n "tags=not @skip" noxfile.py` → **zero results** ✓
- `nox -s unit_tests` → **629 features passed, 0 failed** ✓ (up from ~545 before this PR)
- CI all green (coverage ≥ 97%) ✓
- Integration tests (Robot Framework) do not use `@skip` — confirmed no action needed ✓
- E2E tests (Robot Framework) do not use `@skip` — confirmed no action needed ✓
- `CHANGELOG.md` updated with entry for this change ✓
- `CONTRIBUTORS.md` — Rui Hu already listed ✓

## Issues Addressed

Closes #7025

Co-authored-by: CleverThis <hal9000@cleverthis.com>
Reviewed-on: #7221
Reviewed-by: HAL 9000 <HAL9000@cleverthis.com>
Reviewed-by: HAL9001 <hal9001@cleverthis.com>
Co-authored-by: Rui Hu <rui.hu@cleverthis.com>
Co-committed-by: Rui Hu <rui.hu@cleverthis.com>
2026-04-13 04:56:01 +00: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 2a541bb1e1 fix(cli): add Name and Updated columns to agents plan list table output
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / e2e_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / benchmark-regression (push) Blocked by required conditions
CI / benchmark-publish (push) Waiting to run
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / helm (push) Waiting to run
CI / status-check (push) Blocked by required conditions
Reviewed and APPROVED. Closes #2611.
2026-04-05 21:11:36 +00:00
freemo 8891160bd8 fix(cli): add Name and Updated columns to agents plan list table output
CI / lint (pull_request) Successful in 28s
CI / typecheck (pull_request) Successful in 55s
CI / quality (pull_request) Successful in 35s
CI / security (pull_request) Successful in 53s
CI / build (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 22s
CI / unit_tests (pull_request) Failing after 6m42s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 18m37s
CI / integration_tests (pull_request) Failing after 23m29s
CI / coverage (pull_request) Successful in 10m58s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m9s
- Implemented Updated column in the plan list rich output by extending
  lifecycle_list_plans() in src/cleveragents/cli/commands/plan.py.
  The column is inserted after the existing Project column and before
  Elapsed to maintain logical grouping.
- Added updated_str using plan.timestamps.updated_at.strftime('%Y-%m-%d %H:%M')
  for a human-friendly timestamp in local time.
- Added three Behave scenarios in features/plan_cli_spec_alignment.feature
  to assert presence of Name, Updated, and Invariants columns.
- Added 'When I run plan list with no filters' step definition.
- Added list_columns() function to robot/helper_plan_cli_spec.py verifying
  all three columns with partial header checks due to terminal truncation.
- Added 'Plan List Rich Output Includes Required Columns' test case to
  robot/plan_cli_spec.robot.

ISSUES CLOSED: #2611
2026-04-05 18:15:02 +00:00
freemo fc7e47f66b fix(cli): remove --namespace/-n from agents plan list command
CI / lint (pull_request) Successful in 21s
CI / typecheck (pull_request) Successful in 49s
CI / quality (pull_request) Successful in 41s
CI / security (pull_request) Successful in 1m1s
CI / build (pull_request) Successful in 17s
CI / helm (pull_request) Successful in 23s
CI / unit_tests (pull_request) Successful in 6m45s
CI / e2e_tests (pull_request) Successful in 17m7s
CI / integration_tests (pull_request) Failing after 23m11s
CI / docker (pull_request) Successful in 1m24s
CI / coverage (pull_request) Successful in 10m54s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 56m52s
Remove the --namespace/-n option from the agents plan list CLI command
as it is not defined in the specification. The spec defines:

  agents plan list [--phase <PHASE>] [--state <STATE>]
                   [--project <PROJECT>] [--action <ACTION>] [<REGEX>]

Namespace filtering is already supported via the positional <REGEX>
argument (e.g. 'agents plan list "^myteam/"').

Changes:
- Remove namespace parameter from lifecycle_list_plans() function
- Remove namespace=namespace from service.list_plans() call
- Remove Namespace row from TUI Filters panel
- Update docstring examples to remove --namespace references
- Update filter panel condition to exclude namespace check
- Remove 4 namespace-related scenarios from plan_cli_spec_alignment.feature
- Remove corresponding step definitions from plan_cli_spec_alignment_steps.py

ISSUES CLOSED: #2986
2026-04-05 08:38:26 +00:00
freemo 52730b0846 fix(cli): add --namespace/-n option to agents plan list command
CI / benchmark-publish (pull_request) Has been skipped
CI / helm (pull_request) Successful in 30s
CI / build (pull_request) Successful in 32s
CI / quality (pull_request) Successful in 44s
CI / lint (pull_request) Successful in 3m18s
CI / typecheck (pull_request) Successful in 3m58s
CI / security (pull_request) Successful in 4m7s
CI / unit_tests (pull_request) Failing after 6m31s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Failing after 14m6s
CI / coverage (pull_request) Successful in 10m53s
CI / integration_tests (pull_request) Failing after 21m51s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-regression (pull_request) Successful in 55m57s
Add the missing --namespace/-n option to lifecycle_list_plans() in
plan.py, mirroring the existing implementation in list_actions() in
action.py. The service layer already supported namespace filtering;
only the CLI layer was missing the option.

Changes:
- Add namespace parameter to lifecycle_list_plans() with --namespace/-n
  option flags and 'Filter plans by namespace' help text
- Pass namespace through to service.list_plans(namespace=namespace, ...)
- Update TUI Filters panel to display 'Namespace: <value>' when provided
- Add usage examples to command docstring
- Add 4 Behave unit test scenarios covering --namespace/-n option
- Add 2 Robot Framework integration tests verifying namespace filtering

ISSUES CLOSED: #2165
2026-04-03 20:50:17 +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
freemo 65988669a6 feat(cli): align plan use/list/status flags
CI / coverage (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 26s
CI / security (pull_request) Successful in 22s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 4m31s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 9m18s
CI / coverage (pull_request) Successful in 6m54s
CI / docker (pull_request) Successful in 39s
- plan use: accept positional PROJECT args, add --automation-profile,
  --invariant (repeatable), and actor override flags
- lifecycle-list: add --state/--processing-state, --action filters,
  optional positional REGEX for name filtering, Action column in output
- plan status: enhanced detail view with processing state, project
  links, arguments order, automation profile provenance, actor
  overrides, automation level, and full timestamps
- Add docs/reference/plan_cli.md reference documentation
- Add Behave feature (17 scenarios) with mock service steps
- Add Robot smoke test (7 cases) with import-safe helper
- Add ASV benchmarks for plan use/list/status commands
2026-02-14 13:42:02 -05:00