Refactor: Improve YAML parsing in yaml_template_engine.py #1396

Open
opened 2026-04-02 17:27:05 +00:00 by freemo · 0 comments
Owner

The _postprocess_rendered_yaml and _fix_common_yaml_issues methods in src/cleveragents/actor/yaml_template_engine.py are complex and fragile. They are trying to fix common YAML parsing errors by manipulating the rendered string. This is a sign of a deeper problem.

It would be better to address the root cause of the parsing errors instead of trying to fix them after the fact. This should be investigated and refactored to be more robust.

The `_postprocess_rendered_yaml` and `_fix_common_yaml_issues` methods in `src/cleveragents/actor/yaml_template_engine.py` are complex and fragile. They are trying to fix common YAML parsing errors by manipulating the rendered string. This is a sign of a deeper problem. It would be better to address the root cause of the parsing errors instead of trying to fix them after the fact. This should be investigated and refactored to be more robust.
freemo self-assigned this 2026-04-02 18:45:15 +00:00
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#1396
No description provided.