Files
temp/features/actor_add_update_enforcement.feature
freemo 8ea00f5185 fix: restore CI quality tests to passing state (#4175)
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

42 lines
2.2 KiB
Gherkin

# Regression tests for bug #2609: actor add must reject re-adding an existing
# actor unless --update is provided.
Feature: agents actor add enforces --update flag for existing actors
As a user of the CleverAgents CLI
I want `agents actor add` to fail with a clear error when re-adding an existing actor
So that I cannot accidentally overwrite actor configurations without explicit intent
# @tdd_issue @tdd_issue_2609 @tdd_expected_fail @tdd_issue_4178 @skip
@skip
Scenario: Re-adding an existing actor without --update fails with error panel
Given an actor add CLI runner where the actor already exists
When I run actor add without the --update flag
Then the actor-add-enforcement exit code should be 1
And the actor-add-enforcement output should contain an error panel with "Actor already exists"
And the actor-add-enforcement output should contain "Use --update to replace the existing actor definition"
And the actor-add-enforcement output should contain the registration timestamp
# @tdd_issue @tdd_issue_2609 @tdd_expected_fail @tdd_issue_4178 @skip
@skip
Scenario: Re-adding an existing actor without --update shows error status line
Given an actor add CLI runner where the actor already exists
When I run actor add without the --update flag
Then the actor-add-enforcement exit code should be 1
And the actor-add-enforcement output should contain "Actor already registered"
And the actor-add-enforcement output should contain "use --update to replace"
# @tdd_issue @tdd_issue_2609 @tdd_expected_fail @tdd_issue_4178 @skip
@skip
Scenario: Re-adding an existing actor with --update succeeds
Given an actor add CLI runner where the actor already exists
When I run actor add with the --update flag
Then the actor-add-enforcement exit code should be 0
And the actor-add-enforcement output should contain "Actor updated"
# @tdd_issue @tdd_issue_2609 @tdd_expected_fail @tdd_issue_4178 @skip
@skip
Scenario: Adding a new actor without --update succeeds
Given an actor add CLI runner where the actor does not exist
When I run actor add without the --update flag
Then the actor-add-enforcement exit code should be 0
And the actor-add-enforcement output should contain "Actor added"