codeharness 0.25.7 → 0.25.9
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.
|
@@ -3207,7 +3207,7 @@ function generateDockerfileTemplate(projectDir, stackOrDetections) {
|
|
|
3207
3207
|
}
|
|
3208
3208
|
|
|
3209
3209
|
// src/modules/infra/init-project.ts
|
|
3210
|
-
var HARNESS_VERSION = true ? "0.25.
|
|
3210
|
+
var HARNESS_VERSION = true ? "0.25.9" : "0.0.0-dev";
|
|
3211
3211
|
function failResult(opts, error) {
|
|
3212
3212
|
return {
|
|
3213
3213
|
status: "fail",
|
package/dist/index.js
CHANGED
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
validateDockerfile,
|
|
52
52
|
warn,
|
|
53
53
|
writeState
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-ZZUPN3HR.js";
|
|
55
55
|
|
|
56
56
|
// src/index.ts
|
|
57
57
|
import { Command } from "commander";
|
|
@@ -2122,6 +2122,14 @@ function startRenderer(options) {
|
|
|
2122
2122
|
if (cleaned) return;
|
|
2123
2123
|
switch (event.type) {
|
|
2124
2124
|
case "tool-start":
|
|
2125
|
+
if (state.activeTool) {
|
|
2126
|
+
const entry = {
|
|
2127
|
+
name: state.activeTool.name,
|
|
2128
|
+
args: state.activeToolArgs
|
|
2129
|
+
};
|
|
2130
|
+
const updated = [...state.completedTools, entry];
|
|
2131
|
+
state.completedTools = updated.length > MAX_COMPLETED_TOOLS ? updated.slice(updated.length - MAX_COMPLETED_TOOLS) : updated;
|
|
2132
|
+
}
|
|
2125
2133
|
state.activeTool = { name: event.name };
|
|
2126
2134
|
state.activeToolArgs = "";
|
|
2127
2135
|
state.lastThought = null;
|
|
@@ -2133,6 +2141,10 @@ function startRenderer(options) {
|
|
|
2133
2141
|
// Skip rerender — args only shown on completion
|
|
2134
2142
|
case "tool-complete":
|
|
2135
2143
|
if (state.activeTool) {
|
|
2144
|
+
const LONG_RUNNING_TOOLS = ["Agent", "Skill"];
|
|
2145
|
+
if (LONG_RUNNING_TOOLS.includes(state.activeTool.name)) {
|
|
2146
|
+
break;
|
|
2147
|
+
}
|
|
2136
2148
|
const entry = {
|
|
2137
2149
|
name: state.activeTool.name,
|
|
2138
2150
|
args: state.activeToolArgs
|
|
@@ -7575,7 +7587,7 @@ function registerTeardownCommand(program) {
|
|
|
7575
7587
|
} else if (otlpMode === "remote-routed") {
|
|
7576
7588
|
if (!options.keepDocker) {
|
|
7577
7589
|
try {
|
|
7578
|
-
const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-
|
|
7590
|
+
const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-3DQQM3KH.js");
|
|
7579
7591
|
stopCollectorOnly2();
|
|
7580
7592
|
result.docker.stopped = true;
|
|
7581
7593
|
if (!isJson) {
|
|
@@ -7607,7 +7619,7 @@ function registerTeardownCommand(program) {
|
|
|
7607
7619
|
info("Shared stack: kept running (other projects may use it)");
|
|
7608
7620
|
}
|
|
7609
7621
|
} else if (isLegacyStack) {
|
|
7610
|
-
const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-
|
|
7622
|
+
const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-3DQQM3KH.js");
|
|
7611
7623
|
let stackRunning = false;
|
|
7612
7624
|
try {
|
|
7613
7625
|
stackRunning = isStackRunning2(composeFile);
|
|
@@ -9506,7 +9518,7 @@ function registerAuditCommand(program) {
|
|
|
9506
9518
|
}
|
|
9507
9519
|
|
|
9508
9520
|
// src/index.ts
|
|
9509
|
-
var VERSION = true ? "0.25.
|
|
9521
|
+
var VERSION = true ? "0.25.9" : "0.0.0-dev";
|
|
9510
9522
|
function createProgram() {
|
|
9511
9523
|
const program = new Command();
|
|
9512
9524
|
program.name("codeharness").description("Makes autonomous coding agents produce software that actually works").version(VERSION).option("--json", "Output in machine-readable JSON format");
|
package/package.json
CHANGED
package/ralph/ralph.sh
CHANGED
|
@@ -832,7 +832,9 @@ execute_iteration() {
|
|
|
832
832
|
|
|
833
833
|
# If harness-run reported NO_WORK, don't count file changes as progress.
|
|
834
834
|
# Writing session-issues.md with "NO_WORK" creates git diffs but is NOT real progress.
|
|
835
|
-
|
|
835
|
+
# IMPORTANT: Only check non-JSON lines. The prompt text is echoed inside JSON objects
|
|
836
|
+
# and contains these strings as instructions — those are false positives.
|
|
837
|
+
if grep -v '^[[:space:]]*{' "$output_file" 2>/dev/null | grep -qE 'Result: NO_WORK'; then
|
|
836
838
|
files_changed=0
|
|
837
839
|
log_status "INFO" "NO_WORK detected — overriding files_changed to 0 for circuit breaker"
|
|
838
840
|
fi
|
|
@@ -1124,13 +1126,20 @@ main() {
|
|
|
1124
1126
|
# ── Check circuit breaker ──
|
|
1125
1127
|
|
|
1126
1128
|
if should_halt_execution; then
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1129
|
+
# Auto-reset: if there are actionable stories (sprint not complete),
|
|
1130
|
+
# the breaker was tripped by a previous session's no-ops. Reset and retry.
|
|
1131
|
+
if ! all_tasks_complete; then
|
|
1132
|
+
log_status "INFO" "Circuit breaker open but actionable stories exist — auto-resetting"
|
|
1133
|
+
reset_circuit_breaker "Auto-reset: actionable stories detected"
|
|
1134
|
+
else
|
|
1135
|
+
local cb_no_progress=0
|
|
1136
|
+
if [[ -f "$CB_STATE_FILE" ]]; then
|
|
1137
|
+
cb_no_progress=$(jq -r '.consecutive_no_progress // 0' "$CB_STATE_FILE" 2>/dev/null || echo "0")
|
|
1138
|
+
fi
|
|
1139
|
+
log_status "WARN" "Circuit breaker: no progress in ${cb_no_progress} iterations"
|
|
1140
|
+
update_status "$loop_count" "$(cat "$CALL_COUNT_FILE" 2>/dev/null || echo "0")" "circuit_breaker" "halted" "stagnation_detected"
|
|
1141
|
+
break
|
|
1130
1142
|
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
1143
|
fi
|
|
1135
1144
|
|
|
1136
1145
|
# ── Check rate limit ──
|