Files
cleveragents-core/features/context_policy_strategy_config.feature
HAL9000 91d497ca03
CI / load-versions (pull_request) Successful in 8s
CI / push-validation (pull_request) Successful in 9s
CI / build (pull_request) Successful in 17s
CI / helm (pull_request) Successful in 18s
CI / lint (pull_request) Successful in 20s
CI / quality (pull_request) Successful in 20s
CI / typecheck (pull_request) Successful in 47s
CI / security (pull_request) Successful in 1m20s
CI / unit_tests (pull_request) Successful in 5m57s
CI / docker (pull_request) Successful in 2m17s
CI / integration_tests (pull_request) Successful in 8m51s
CI / coverage (pull_request) Successful in 11m41s
CI / status-check (pull_request) Successful in 1s
fix(context-policy): resolve AmbiguousStep conflict and fix ruff formatting
Rename step decorators in context_policy_strategy_config_steps.py from
'the strategy should be "{strategy}"' to 'the policy strategy should be
"{strategy}"' (and likewise for the None variant) to avoid collision with
the identically-patterned step already registered in
plan_merge_strategy_steps.py. Update the feature file to match.

Also apply ruff format to the three files flagged by CI lint gate:
- features/steps/context_policy_strategy_config_steps.py
- scripts/update_context_policy.py
- src/cleveragents/domain/models/core/context_policy.py

ISSUES CLOSED: #7572
2026-06-19 00:18:05 -04:00

62 lines
2.4 KiB
Gherkin

@context_policy @strategy_configuration
Feature: Context Policy Strategy Configuration
As a CleverAgents developer
I want to configure context assembly strategies in context policy YAML
So that I can control how context is assembled during ACMS phases
Scenario: Create context policy with basic strategy
Given a context policy with strategy "basic"
When I validate the context policy
Then the policy strategy should be "basic"
And the policy should be valid
Scenario: Create context policy with semantic strategy
Given a context policy with strategy "semantic"
When I validate the context policy
Then the policy strategy should be "semantic"
And the policy should be valid
Scenario: Create context policy with relevance_scoring strategy
Given a context policy with strategy "relevance_scoring"
When I validate the context policy
Then the policy strategy should be "relevance_scoring"
And the policy should be valid
Scenario: Create context policy with adaptive strategy
Given a context policy with strategy "adaptive"
When I validate the context policy
Then the policy strategy should be "adaptive"
And the policy should be valid
Scenario: Create context policy with fusion strategy
Given a context policy with strategy "fusion"
When I validate the context policy
Then the policy strategy should be "fusion"
And the policy should be valid
Scenario: Reject invalid strategy name
Given a context policy with strategy "invalid_strategy"
When I validate the context policy
Then the policy should be invalid
And the strategy error should mention "Invalid strategy"
Scenario: Create context policy with strategy config
Given a context policy with strategy "semantic"
And strategy config with parameter "threshold" set to 0.5
When I validate the context policy
Then the strategy_config should contain "threshold"
And the strategy_config["threshold"] should be 0.5
Scenario: Create context policy without strategy
Given a context policy without strategy
When I validate the context policy
Then the policy strategy should be None
And the policy should be valid
Scenario: Create context policy with strategy but no config
Given a context policy with strategy "basic"
And no strategy config
When I validate the context policy
Then the strategy_config should be None
And the policy should be valid