fix(cli): add missing --yes flag to plan apply command #1127

Merged
hurui200320 merged 1 commits from fix/m4-plan-apply-yes-flag into master 2026-03-26 07:50:10 +00:00

1 Commits

Author SHA1 Message Date
hurui200320 63cc79ca4b fix(cli): add missing --yes flag to plan apply command
CI / build (pull_request) Successful in 16s
CI / lint (pull_request) Successful in 3m18s
CI / typecheck (pull_request) Successful in 3m54s
CI / quality (pull_request) Successful in 3m58s
CI / security (pull_request) Successful in 4m3s
CI / unit_tests (pull_request) Successful in 5m14s
CI / integration_tests (pull_request) Successful in 6m51s
CI / docker (pull_request) Successful in 1m12s
CI / e2e_tests (pull_request) Successful in 9m53s
CI / coverage (pull_request) Successful in 11m25s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 58m44s
Added the --yes/-y flag to the lifecycle_apply_plan command in
cleveragents.cli.commands.plan, matching the specification requirement
for agents plan apply [--yes|-y] <PLAN_ID>. Without --yes, a
confirmation prompt is now displayed showing the plan ID and name
before applying. With --yes, the apply proceeds immediately.

The implementation follows the same Typer Option pattern used by
rollback_plan, correct_plan, and other destructive CLI commands.
The confirmation prompt appears after plan resolution and read-only
validation but before any state-modifying operations.

Removed @tdd_expected_fail tags from both Behave
(tdd_plan_apply_yes_flag.feature) and Robot Framework
(tdd_plan_apply_yes_flag.robot) TDD tests per the Bug Fix Workflow,
leaving @tdd_bug and @tdd_bug_932 as permanent regression guards.

Updated all existing test invocations of lifecycle-apply across
Behave steps and Robot helpers to pass --yes, since the new
confirmation prompt would otherwise abort in non-interactive test
environments.

ISSUES CLOSED: #932
2026-03-26 15:34:34 +08:00