Files
cleveragents-core/features/m1_sourcecode_smoke.feature
T
freemo 48cff5cfe0
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
refactor(cli): rename plan lifecycle-list and lifecycle-apply to match specification
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

105 lines
4.2 KiB
Gherkin

Feature: M1 source-code plan lifecycle smoke tests
As a developer working with the CleverAgents M1 milestone
I want to verify the source-code workflow end-to-end
So that actions, projects, resources, and plans integrate correctly
Background:
Given a m1 smoke test runner
And a m1 smoke mocked lifecycle service
# --- Fixture loading ---
Scenario: M1 smoke load git repo fixture
When I m1 smoke load the git repo fixture
Then the m1 smoke git repo fixture should have a minimal repo entry
And the m1 smoke minimal repo should contain expected files
Scenario: M1 smoke load git checkout resource fixture
When I m1 smoke load the git checkout resource fixture
Then the m1 smoke git checkout fixture should have a minimal entry
And the m1 smoke minimal checkout should have type "git-checkout"
Scenario: M1 smoke load action YAML fixture
When I m1 smoke load the action YAML fixture
Then the m1 smoke action fixture should define strategy actor "openai/gpt-4"
And the m1 smoke action fixture should define execution actor "openai/gpt-4"
# --- Action create ---
Scenario: M1 smoke action create from YAML config
Given a m1 smoke temporary action config file
When I m1 smoke invoke action create with the config
Then the m1 smoke action create should succeed
And the m1 smoke action output should contain "local/m1-source-review"
# --- Project and resource link ---
Scenario: M1 smoke create temp project and link resource
When I m1 smoke create a temp project "local/m1-smoke-proj"
Then the m1 smoke project creation should succeed
And the m1 smoke project output should contain "m1-smoke-proj"
Scenario: M1 smoke link resource to project
Given a m1 smoke project "local/m1-smoke-proj" exists
And a m1 smoke resource "local/m1-smoke-repo" exists
When I m1 smoke link resource "local/m1-smoke-repo" to project "local/m1-smoke-proj"
Then the m1 smoke link should succeed
# --- Plan use ---
Scenario: M1 smoke plan use creates plan in strategize phase
Given a m1 smoke action "local/m1-source-review" exists
When I m1 smoke invoke plan use with action "local/m1-source-review"
Then the m1 smoke plan use should succeed
And the m1 smoke plan should be in phase "strategize"
And the m1 smoke captured plan id should not be empty
Scenario: M1 smoke plan use with project argument
Given a m1 smoke action "local/m1-source-review" exists
When I m1 smoke invoke plan use linking project "local/m1-smoke-proj" to action "local/m1-source-review"
Then the m1 smoke plan use should succeed
Scenario: M1 smoke plan use with arguments
Given a m1 smoke action "local/m1-source-review" exists
When I m1 smoke invoke plan use passing arg "target_path=src/" to action "local/m1-source-review"
Then the m1 smoke plan use should succeed
# --- Plan execute ---
Scenario: M1 smoke plan execute transitions to execute phase
Given a m1 smoke plan exists in strategize phase
When I m1 smoke invoke plan execute
Then the m1 smoke plan execute should succeed
And the m1 smoke plan should be in phase "execute"
# --- Plan diff ---
Scenario: M1 smoke plan diff shows changeset
Given a m1 smoke plan exists in execute phase with changeset
When I m1 smoke invoke plan diff
Then the m1 smoke plan diff should succeed
# --- Plan apply ---
Scenario: M1 smoke plan apply transitions to applied terminal state
Given a m1 smoke plan exists in apply phase
When I m1 smoke invoke plan apply
Then the m1 smoke plan apply should succeed
And the m1 smoke plan should be in terminal state
# --- Negative cases ---
Scenario: M1 smoke plan use with unknown action fails
When I m1 smoke invoke plan use with action "local/nonexistent-action"
Then the m1 smoke plan use should fail
Scenario: M1 smoke plan execute on non-strategize plan fails
Given a m1 smoke plan exists in apply phase
When I m1 smoke invoke plan execute
Then the m1 smoke plan execute should fail
Scenario: M1 smoke plan use with invalid actor format fails
Given a m1 smoke action "local/m1-source-review" exists
When I m1 smoke invoke plan use with invalid strategy actor "bad-format"
Then the m1 smoke plan use should fail