codeharness 0.25.6 → 0.25.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/ralph/ralph.sh
CHANGED
|
@@ -1124,13 +1124,20 @@ main() {
|
|
|
1124
1124
|
# ── Check circuit breaker ──
|
|
1125
1125
|
|
|
1126
1126
|
if should_halt_execution; then
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1127
|
+
# Auto-reset: if there are actionable stories (sprint not complete),
|
|
1128
|
+
# the breaker was tripped by a previous session's no-ops. Reset and retry.
|
|
1129
|
+
if ! all_tasks_complete; then
|
|
1130
|
+
log_status "INFO" "Circuit breaker open but actionable stories exist — auto-resetting"
|
|
1131
|
+
reset_circuit_breaker "Auto-reset: actionable stories detected"
|
|
1132
|
+
else
|
|
1133
|
+
local cb_no_progress=0
|
|
1134
|
+
if [[ -f "$CB_STATE_FILE" ]]; then
|
|
1135
|
+
cb_no_progress=$(jq -r '.consecutive_no_progress // 0' "$CB_STATE_FILE" 2>/dev/null || echo "0")
|
|
1136
|
+
fi
|
|
1137
|
+
log_status "WARN" "Circuit breaker: no progress in ${cb_no_progress} iterations"
|
|
1138
|
+
update_status "$loop_count" "$(cat "$CALL_COUNT_FILE" 2>/dev/null || echo "0")" "circuit_breaker" "halted" "stagnation_detected"
|
|
1139
|
+
break
|
|
1130
1140
|
fi
|
|
1131
|
-
log_status "WARN" "Circuit breaker: no progress in ${cb_no_progress} iterations"
|
|
1132
|
-
update_status "$loop_count" "$(cat "$CALL_COUNT_FILE" 2>/dev/null || echo "0")" "circuit_breaker" "halted" "stagnation_detected"
|
|
1133
|
-
break
|
|
1134
1141
|
fi
|
|
1135
1142
|
|
|
1136
1143
|
# ── Check rate limit ──
|