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>
This commit was merged in pull request #1188.
This commit is contained in:
2026-04-02 19:09:04 +00:00
committed by Forgejo
parent 908d5854a3
commit 48cff5cfe0
71 changed files with 562 additions and 943 deletions
+3 -3
View File
@@ -319,6 +319,6 @@ class OutputFormatRenderingSuite:
"""Benchmark plan status in YAML format."""
_runner.invoke(plan_app, ["status", "--format", "yaml"])
def time_plan_lifecycle_list_json(self) -> None:
"""Benchmark plan lifecycle-list in JSON format."""
_runner.invoke(plan_app, ["lifecycle-list", "--format", "json"])
def time_plan_list_json(self) -> None:
"""Benchmark plan list in JSON format."""
_runner.invoke(plan_app, ["list", "--format", "json"])
+4 -4
View File
@@ -3,7 +3,7 @@
Measures the performance of:
- plan use with automation profile and invariant flags
- plan use with actor override flags and validation
- plan status / lifecycle-list rendering with extended fields
- plan status / list rendering with extended fields
- action show rendering with optional actors/invariants/inputs_schema
"""
@@ -233,9 +233,9 @@ class PlanStatusWithExtendedFieldsSuite:
"""Benchmark plan status table rendering with extended fields."""
_runner.invoke(plan_app, ["status"])
def time_plan_lifecycle_list_table(self) -> None:
"""Benchmark lifecycle-list table rendering with extended fields."""
_runner.invoke(plan_app, ["lifecycle-list"])
def time_plan_list_table(self) -> None:
"""Benchmark list table rendering with extended fields."""
_runner.invoke(plan_app, ["list"])
class ActionShowExtendedSuite:
+3 -3
View File
@@ -220,12 +220,12 @@ class CLIRobotLifecycleSuite:
_runner.invoke(plan_app, ["execute", _PLAN_ULID])
def time_plan_apply(self) -> None:
"""Benchmark plan lifecycle-apply via CLI."""
_runner.invoke(plan_app, ["lifecycle-apply", "--yes", _PLAN_ULID])
"""Benchmark plan apply via CLI."""
_runner.invoke(plan_app, ["apply", "--yes", _PLAN_ULID])
def time_full_lifecycle_flow(self) -> None:
"""Benchmark the full create -> use -> execute -> apply flow."""
_runner.invoke(action_app, ["create", "--config", self._yaml_path])
_runner.invoke(plan_app, ["use", "local/bench-lifecycle-action", "proj-bench"])
_runner.invoke(plan_app, ["execute", _PLAN_ULID])
_runner.invoke(plan_app, ["lifecycle-apply", "--yes", _PLAN_ULID])
_runner.invoke(plan_app, ["apply", "--yes", _PLAN_ULID])
+5 -5
View File
@@ -4,7 +4,7 @@ Measures the performance of:
- Action create from YAML config
- Plan use with arguments and project links
- Plan execute phase transition
- Plan lifecycle-apply terminal transition
- Plan apply terminal transition
- Full lifecycle (action create -> plan use -> execute -> apply)
"""
@@ -190,7 +190,7 @@ class M1PlanExecuteSuite:
class M1PlanApplySuite:
"""Benchmark plan lifecycle-apply terminal transition."""
"""Benchmark plan apply terminal transition."""
def setup(self) -> None:
self._mock_service = MagicMock()
@@ -206,9 +206,9 @@ class M1PlanApplySuite:
def teardown(self) -> None:
self._patcher.stop()
def time_plan_lifecycle_apply(self) -> None:
"""Benchmark plan lifecycle-apply command."""
_runner.invoke(plan_app, ["lifecycle-apply", "--yes", _PLAN_ULID])
def time_plan_apply(self) -> None:
"""Benchmark plan apply command."""
_runner.invoke(plan_app, ["apply", "--yes", _PLAN_ULID])
class M1FixtureLoadSuite:
+4 -4
View File
@@ -145,7 +145,7 @@ class PlanCLIUseSuite:
class PlanCLIListSuite:
"""Benchmark plan lifecycle-list throughput."""
"""Benchmark plan list throughput."""
def setup(self) -> None:
self._mock_service = MagicMock()
@@ -163,15 +163,15 @@ class PlanCLIListSuite:
def time_list_all(self) -> None:
"""Benchmark listing all plans."""
_runner.invoke(plan_app, ["lifecycle-list"])
_runner.invoke(plan_app, ["list"])
def time_list_with_phase(self) -> None:
"""Benchmark listing with phase filter."""
_runner.invoke(plan_app, ["lifecycle-list", "--phase", "strategize"])
_runner.invoke(plan_app, ["list", "--phase", "strategize"])
def time_list_with_state(self) -> None:
"""Benchmark listing with state filter."""
_runner.invoke(plan_app, ["lifecycle-list", "--state", "queued"])
_runner.invoke(plan_app, ["list", "--state", "queued"])
class PlanCLIStatusSuite:
+10 -10
View File
@@ -3,7 +3,7 @@
Measures the performance of:
- Action CLI argument parsing (create, list, show, archive)
- Plan CLI argument parsing (use with various flag combinations)
- Plan lifecycle commands (execute, lifecycle-apply, status, cancel)
- Plan lifecycle commands (execute, apply, status, cancel)
These benchmarks focus on CLI overhead (argument parsing + routing)
rather than service layer execution time, since the service is mocked.
@@ -274,9 +274,9 @@ class PlanLifecycleCmdParsingSuite:
"""Benchmark plan execute."""
_runner.invoke(plan_app, ["execute", _PLAN_ULID])
def time_lifecycle_apply(self) -> None:
"""Benchmark plan lifecycle-apply."""
_runner.invoke(plan_app, ["lifecycle-apply", "--yes", _PLAN_ULID])
def time_apply(self) -> None:
"""Benchmark plan apply."""
_runner.invoke(plan_app, ["apply", "--yes", _PLAN_ULID])
def time_status_by_id(self) -> None:
"""Benchmark plan status with specific ID."""
@@ -290,13 +290,13 @@ class PlanLifecycleCmdParsingSuite:
"""Benchmark plan cancel with reason."""
_runner.invoke(plan_app, ["cancel", _PLAN_ULID, "--reason", "Benchmarking"])
def time_lifecycle_list(self) -> None:
"""Benchmark lifecycle-list."""
_runner.invoke(plan_app, ["lifecycle-list"])
def time_list(self) -> None:
"""Benchmark list."""
_runner.invoke(plan_app, ["list"])
def time_lifecycle_list_filtered(self) -> None:
"""Benchmark lifecycle-list with filters."""
def time_list_filtered(self) -> None:
"""Benchmark list with filters."""
_runner.invoke(
plan_app,
["lifecycle-list", "--phase", "strategize", "--state", "queued"],
["list", "--phase", "strategize", "--state", "queued"],
)