Apply remaining fixes not covered by the 4278ba91 commit:
1. src/cleveragents/cli/main.py:
info and diagnostics commands now call configure_structlog(WARNING)
before build_info_data()/build_diagnostics_data() when non-rich format
is requested. This prevents debug-level structlog messages from
corrupting --format json/yaml output in integration tests.
2. robot/helper_config_cli.py:
Call configure_structlog(WARNING) before importing cleveragents CLI
commands so plugin_manager debug messages don't pollute CliRunner
captured output (fixes Config List JSON Format test).
3. features/steps/aimodelscredentials_steps.py:
ModelProviderOption config checks now use getattr fallback so they
work both when context.model_config is set (via explicit 'I examine
the ModelProviderOption model_config' step) and when context.model_instance
is set (via 'I create a ModelProviderOption with only priority set to N').
4. features/steps/plan_namespaced_name_tdd_steps.py:
@when steps now set context.error and context.lsp_error in addition to
context.exception so the existing @then steps from service_steps.py
and lsp_registry_steps.py match and validate correctly.
No quality gates suppressed. All changes are to test and source files.
ISSUES CLOSED: #2597
Implement the complete configuration system with multi-level resolution
chain, typed key registry, and CLI integration per specification.
ConfigService changes:
- Expand _build_catalog() to register all 102 spec-aligned config keys
across 8 groups: core (14), server (4), actor (5), plan (8),
sandbox (5), index (12), context (43), provider (11)
- Each key carries exact dotted-dash name, Python type, default value,
explicit env var name per spec, project-scopability flag, and
description
- Fix _env_name() to convert dots and dashes to underscores
- Provider keys use standard env var names (e.g., OPENAI_API_KEY)
CLI commands rewiring:
- Rewrite config set/get/list to use ConfigService instead of Settings
- Add --verbose flag to config get showing full 5-level resolution chain
- Add --project flag to config set/get/list for project-scoped overrides
- Support both glob and regex patterns in config list
- Validate keys against ConfigService registry with actionable errors
- Retain backward-compatible helper functions delegating to ConfigService
Documentation:
- Add docs/reference/config_resolution.md covering resolution chain,
all 102 config keys, CLI commands, TOML format, and provider credentials
Testing:
- Update all 4 Behave feature files and step definitions to use new
spec-aligned key names, env vars, and defaults (119 scenarios passing)
- Add robot/config_resolution.robot with 10 integration test cases
- Add benchmarks/config_resolution_bench.py with 8 time + 2 memory suites
ISSUES CLOSED: #258