Skip to content

A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.

Shell

fix(workflows): preserve comparisons with zero cost baselines

Rudy Celeklib37d1a1efa63
diff --git a/testing/testing-workflow-optimizer.md b/testing/testing-workflow-optimizer.md
index 286b903a..02b0decf 100644
--- a/testing/testing-workflow-optimizer.md
+++ b/testing/testing-workflow-optimizer.md
@@ -246,7 +246,7 @@ class WorkflowOptimizer:
def calculate_improvement_impact(self, current_metrics: WorkflowMetrics,
optimized_metrics: WorkflowMetrics) -> Dict:
- """Calculate quantified improvement impact"""
+ """Calculate impact; a zero cost baseline has no defined percentage."""
improvements = {
"cycle_time_reduction": {
"absolute": current_metrics.total_cycle_time - optimized_metrics.total_cycle_time,
@@ -255,8 +255,11 @@ class WorkflowOptimizer:
},
"cost_reduction": {
"absolute": current_metrics.cost_per_execution - optimized_metrics.cost_per_execution,
- "percentage": ((current_metrics.cost_per_execution - optimized_metrics.cost_per_execution)
- / current_metrics.cost_per_execution) * 100
+ "percentage": (
+ ((current_metrics.cost_per_execution - optimized_metrics.cost_per_execution)
+ / current_metrics.cost_per_execution) * 100
+ if current_metrics.cost_per_execution != 0 else None
+ )
},
"quality_improvement": {
"absolute": current_metrics.error_rate - optimized_metrics.error_rate,
@@ -457,4 +460,4 @@ You're successful when:
---
-**Instructions Reference**: Your comprehensive workflow optimization methodology is in your core training - refer to detailed process improvement techniques, automation strategies, and change management frameworks for complete guidance.
\ No newline at end of file
+**Instructions Reference**: Your comprehensive workflow optimization methodology is in your core training - refer to detailed process improvement techniques, automation strategies, and change management frameworks for complete guidance.