UAT: YAML configs do not interpolate ${ENV_VAR} placeholders #7012

Open
opened 2026-04-10 06:32:03 +00:00 by HAL9000 · 1 comment
Owner

What was tested

  • YAML configuration loaders for Automation Profiles, Tools, Validations, and LSP servers

Expected behavior (from spec)

  • docs/specification.md (Configuration > Design Principles) states that all configuration files support ${ENV_VAR} and ${ENV_VAR:default_value} interpolation
  • Supplying ${ENV_VAR} in any configuration YAML should resolve to the environment variable value (or default) before validation

Actual behavior

  • ${ENV_VAR} placeholders are passed through unchanged (or cause validation errors) when loading several configuration types
  • Example:
    import os
    from cleveragents.domain.models.core.automation_profile import AutomationProfile
    
    os.environ['AP_THRESHOLD'] = '0.25'
    with open('/tmp/profile.yaml', 'w') as fh:
        fh.write('name: local/demo
    

create_tool: 0.5
select_tool: 0.5
decompose_task: ${AP_THRESHOLD}
schema_version: "1.0"
')

AutomationProfile.from_yaml('/tmp/profile.yaml')

=> raises `ValidationError` because the loader sees the literal string `${AP_THRESHOLD}`
- Similar behaviour occurs for `agents tool add --config`, `agents validation add --config`, and `agents lsp add --config`; the resulting models keep `${VAR}` literals instead of resolving them

### Steps to reproduce
1. Export an environment variable (e.g. `export AP_THRESHOLD=0.25`)
2. Create an automation profile YAML containing `${AP_THRESHOLD}` as shown above
3. Call `AutomationProfile.from_yaml` (or run `agents automation-profile add --config profile.yaml`)
4. Observe that the placeholder is not interpolated and validation fails

### Code locations
- `src/cleveragents/domain/models/core/automation_profile.py` (`from_yaml` uses `yaml.safe_load` without interpolation)
- `src/cleveragents/cli/commands/tool.py` and `validation.py` (YAML loaded then passed directly to models)
- `src/cleveragents/cli/commands/lsp.py` (same pattern for LSP server configs)
### What was tested - YAML configuration loaders for Automation Profiles, Tools, Validations, and LSP servers ### Expected behavior (from spec) - docs/specification.md (Configuration > Design Principles) states that *all configuration files support `${ENV_VAR}` and `${ENV_VAR:default_value}` interpolation* - Supplying `${ENV_VAR}` in any configuration YAML should resolve to the environment variable value (or default) before validation ### Actual behavior - `${ENV_VAR}` placeholders are passed through unchanged (or cause validation errors) when loading several configuration types - Example: ```python import os from cleveragents.domain.models.core.automation_profile import AutomationProfile os.environ['AP_THRESHOLD'] = '0.25' with open('/tmp/profile.yaml', 'w') as fh: fh.write('name: local/demo create_tool: 0.5 select_tool: 0.5 decompose_task: ${AP_THRESHOLD} schema_version: "1.0" ') AutomationProfile.from_yaml('/tmp/profile.yaml') ``` => raises `ValidationError` because the loader sees the literal string `${AP_THRESHOLD}` - Similar behaviour occurs for `agents tool add --config`, `agents validation add --config`, and `agents lsp add --config`; the resulting models keep `${VAR}` literals instead of resolving them ### Steps to reproduce 1. Export an environment variable (e.g. `export AP_THRESHOLD=0.25`) 2. Create an automation profile YAML containing `${AP_THRESHOLD}` as shown above 3. Call `AutomationProfile.from_yaml` (or run `agents automation-profile add --config profile.yaml`) 4. Observe that the placeholder is not interpolated and validation fails ### Code locations - `src/cleveragents/domain/models/core/automation_profile.py` (`from_yaml` uses `yaml.safe_load` without interpolation) - `src/cleveragents/cli/commands/tool.py` and `validation.py` (YAML loaded then passed directly to models) - `src/cleveragents/cli/commands/lsp.py` (same pattern for LSP server configs)
HAL9000 self-assigned this 2026-04-10 06:48:00 +00:00
HAL9000 added this to the v3.4.0 milestone 2026-04-10 06:48:00 +00:00
Author
Owner

Verified — UAT bug: YAML configs don't interpolate environment variable placeholders. MoSCoW: Should-have. Priority: Medium.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Verified** — UAT bug: YAML configs don't interpolate environment variable placeholders. MoSCoW: Should-have. Priority: Medium. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#7012
No description provided.