Files
cleveragents-core/robot/context_strategy_registry.robot
khyari hamza 1521c4ae8c feat(acms): add context strategy registry
Implement the ACMS context strategy registry per spec §25162-25233,
§28682-28708, §42628-42653, and §43167-43199.

- Define ContextStrategy protocol, StrategyCapabilities, BackendSet,
  PlanContext, StrategyConfig, ContextStrategyResult models
- Add 6 built-in stub strategies (simple-keyword, semantic-embedding,
  breadth-depth-navigator, arce, temporal-archaeology,
  plan-decision-context) with spec quality scores and feature flags
- Add StrategyRegistry with register, register_from_module (plugin
  discovery), enable/disable, per-strategy config, and validation
- Add ContextStrategyResult with deterministic fragment ordering
  (-relevance_score, uko_node)
- Add configuration-driven enabled list with per-project overrides
- Add per-strategy timeout, max-fragment, circuit-breaker config
- Add registry validation for resource types and backend capabilities
- Fix update_config to sync _enabled_order when toggling enabled flag
- Fix register_from_module to honour the name parameter as registry key
- Fix update_config to re-run Pydantic validators via model_validate
- Add docs/reference/context_strategies.md
- Add 55 BDD scenarios (Behave), 4 Robot integration tests,
  ASV benchmarks

ISSUES CLOSED: #191
2026-03-05 22:00:15 +00:00

36 lines
1.4 KiB
Plaintext

*** Settings ***
Documentation Integration smoke tests for context strategy registry
Library Process
Suite Setup Log Context Strategy Registry Robot Tests
*** Variables ***
${HELPER} ${CURDIR}/helper_context_strategy_registry.py
*** Test Cases ***
Register All Built-in Strategies
[Documentation] Register 6 built-in strategies with default enabled list
${result}= Run Process python3 ${HELPER} register-builtins
Log ${result.stdout}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} strategy-ok
Verify Protocol Conformance
[Documentation] All built-in strategies satisfy ContextStrategy protocol
${result}= Run Process python3 ${HELPER} protocol-check
Log ${result.stdout}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} strategy-ok
Test Can Handle With Backends
[Documentation] Verify can_handle returns correct scores per backend availability
${result}= Run Process python3 ${HELPER} can-handle
Log ${result.stdout}
Should Be Equal As Integers ${result.rc} 0
Validate Registry
[Documentation] Validate registry with all built-in strategies passes
${result}= Run Process python3 ${HELPER} validate
Log ${result.stdout}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} validation passed