@phase2 @acms @strategy Feature: ACMS Pipeline Auto-Loading Strategies from Settings As a CleverAgents developer I want the ACMS pipeline to auto-load strategies from a Settings object's context.strategies configuration So that downstream code does not have to register every strategy by hand, and so that a Settings carrying strategy config cannot crash __init__ with an AttributeError on _strategies / _logger. # --------------------------------------------------------------------------- # Initialization order regression (init-order AttributeError fix) # --------------------------------------------------------------------------- @auto_load @init_order Scenario: Pipeline constructs cleanly when Settings carries an empty strategies sub-dict Given a mock Settings whose context dict contains an empty strategies sub-dict When I construct an ACMSPipeline with that Settings Then construction should succeed without raising And the resulting pipeline should expose its registered strategies @auto_load @init_order Scenario: Pipeline registers strategies declared in the Settings registry Given a mock Settings whose context.strategies enables two built-ins When I construct an ACMSPipeline with that Settings Then construction should succeed without raising And the pipeline strategies should include "simple-keyword" @auto_load Scenario: Pipeline tolerates a Settings without any context attribute Given a mock Settings without any context attribute When I construct an ACMSPipeline with that Settings Then construction should succeed without raising @auto_load Scenario: Pipeline tolerates a Settings whose context is a non-dict object Given a mock Settings whose context is a non-dict object When I construct an ACMSPipeline with that Settings Then construction should succeed without raising @auto_load @error_handling Scenario: Pipeline survives a malformed strategies config without crashing Given a mock Settings whose context.strategies references an invalid custom strategy module When I construct an ACMSPipeline with that Settings Then construction should succeed without raising # --------------------------------------------------------------------------- # _enforce_enabled_strategies — filter pipeline strategy set to enabled subset # --------------------------------------------------------------------------- @auto_load @enforce Scenario: Enabled list filters the pipeline strategy set Given a mock Settings whose context.strategies enables only "simple-keyword" When I construct an ACMSPipeline with that Settings Then the pipeline strategies should contain "simple-keyword" # --------------------------------------------------------------------------- # load_strategies_from_config helper (context_strategies.py) # --------------------------------------------------------------------------- @load_helper Scenario: load_strategies_from_config registers the three default built-ins When I call load_strategies_from_config with an empty config dict Then the resulting registry should contain "simple-keyword" And the resulting registry should contain "semantic-embedding" And the resulting registry should contain "breadth-depth-navigator" @load_helper Scenario: load_strategies_from_config honors an explicit enabled list When I call load_strategies_from_config with an enabled list of only "simple-keyword" Then the resulting registry should list only "simple-keyword" as enabled @load_helper Scenario: load_strategies_from_config defaults to DEFAULT_ENABLED_STRATEGIES when enabled is missing When I call load_strategies_from_config with no enabled key Then the resulting registry should list the default-enabled strategies @load_helper @custom Scenario: load_strategies_from_config registers a custom strategy from a module:ClassName string When I call load_strategies_from_config with a custom strategy mapping "my-keyword" to SimpleKeywordStrategy Then the resulting registry should contain "my-keyword"