Files
cleveragents-core/features/plan_merge_strategy.feature
T
HAL9000 6d4134938d
CI / lint (pull_request) Successful in 1m14s
CI / typecheck (pull_request) Successful in 1m29s
CI / security (pull_request) Successful in 1m30s
CI / quality (pull_request) Successful in 48s
CI / build (pull_request) Successful in 36s
CI / helm (pull_request) Successful in 41s
CI / push-validation (pull_request) Successful in 26s
CI / unit_tests (pull_request) Successful in 4m57s
CI / integration_tests (pull_request) Successful in 8m39s
CI / docker (pull_request) Successful in 1m45s
CI / coverage (pull_request) Successful in 9m4s
CI / status-check (pull_request) Successful in 3s
feat(plans): implement configurable merge strategy for three-way merge
ISSUES CLOSED: #9559
2026-06-03 12:16:30 -04:00

55 lines
2.6 KiB
Gherkin

Feature: Plan Merge Strategy Configuration
As a team lead
I want to configure how plan conflicts are resolved
So that my team can choose the appropriate conflict resolution behavior
Background:
Given a merge strategy service is initialized
Scenario: Prefer-parent strategy auto-resolves conflicts in favor of parent
Given the merge strategy is set to "prefer-parent"
When a conflict occurs with parent value "parent_data" and subplan value "subplan_data"
Then the conflict should be auto-resolved with value "parent_data"
And the strategy should support auto-resolution
Scenario: Prefer-subplan strategy auto-resolves conflicts in favor of subplan
Given the merge strategy is set to "prefer-subplan"
When a conflict occurs with parent value "parent_data" and subplan value "subplan_data"
Then the conflict should be auto-resolved with value "subplan_data"
And the strategy should support auto-resolution
Scenario: Manual strategy surfaces conflicts for user resolution
Given the merge strategy is set to "manual"
When a conflict occurs with parent value "parent_data" and subplan value "subplan_data"
Then the conflict should require manual resolution
And the strategy should not support auto-resolution
Scenario: Multiple conflicts are resolved according to strategy
Given the merge strategy is set to "prefer-parent"
When multiple conflicts occur:
| path | parent_value | subplan_value |
| field1 | value1 | value2 |
| field2 | value3 | value4 |
Then all conflicts should be resolved with parent values
Scenario: Manual strategy raises error when attempting auto-resolution
Given the merge strategy is set to "manual"
When a conflict occurs with parent value "parent_data" and subplan value "subplan_data"
And attempting to auto-resolve conflicts
Then an error should be raised indicating manual resolution is required
Scenario: Merge strategy can be created from string value
When a merge strategy is created from string "prefer-parent"
Then the strategy should be "prefer-parent"
And the strategy string representation should be "prefer-parent"
Scenario: Invalid merge strategy string raises error
When attempting to create a merge strategy from invalid string "invalid-strategy"
Then an error should be raised with message containing "Invalid merge strategy"
Scenario: No conflicts means no resolution needed
Given the merge strategy is set to "prefer-parent"
When there are no conflicts
Then the resolution should return an empty result
And no conflicts should be detected