@neriros/ralphy 2.7.8 → 2.7.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.
- package/README.md +2 -0
- package/dist/cli/index.js +6 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -140,6 +140,8 @@ Use `setupScript` (run inside the worktree right after scaffolding) to install d
|
|
|
140
140
|
|
|
141
141
|
**`fixCiOnFailure`** (or `--fix-ci`) watches the PR's checks via `gh pr checks` and, on failure, fetches the failed-run logs (`gh run view --log-failed`), appends them to `proposal.md` under `## Steering`, re-spawns the task loop in the worktree, and pushes the new commits — repeating until checks go green or `maxCiFixAttempts` is hit (default 5, polling interval `ciPollIntervalSeconds` defaults to 30s). Requires `--create-pr`.
|
|
142
142
|
|
|
143
|
+
When `fixCiOnFailure` is enabled, the issue is **not** moved to `doneStatus` (and `doneLabel` is not applied, and the issue is not marked processed in `.ralph/agent-state.json`) until CI actually goes green. If the fix loop exhausts its attempts the worker is treated as failed for completion-marking purposes and the issue will be re-picked-up on the next poll (the resume-in-progress filter ensures that).
|
|
144
|
+
|
|
143
145
|
Every CLI flag is also configurable in `ralphy.config.json`; CLI values override config when both are set. The agent forwards `maxRuntimeMinutesPerTask` / `maxConsecutiveFailuresPerTask` / `iterationDelaySeconds` / `logRawStream` / `taskVerbose` to each spawned `ralph task` worker.
|
|
144
146
|
|
|
145
147
|
Failed workers (non-zero exit) are not marked processed, so they'll be retried on the next poll. SIGINT/SIGTERM cleanly stops polling and kills active workers. All Linear side effects are best-effort — failures log a warning but never block the task loop.
|
package/dist/cli/index.js
CHANGED
|
@@ -70448,12 +70448,14 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
70448
70448
|
stdin: "ignore"
|
|
70449
70449
|
});
|
|
70450
70450
|
const wantPr = args.createPr || cfg.createPrOnSuccess;
|
|
70451
|
+
const CI_FAILED_EXIT = 70;
|
|
70451
70452
|
const wrapped = proc.exited.then(async (code) => {
|
|
70452
70453
|
if (cfg.teardownScript) {
|
|
70453
70454
|
try {
|
|
70454
70455
|
await runScript("teardown", cfg.teardownScript, cwd2);
|
|
70455
70456
|
} catch {}
|
|
70456
70457
|
}
|
|
70458
|
+
let effectiveCode = code;
|
|
70457
70459
|
const ok = code === 0;
|
|
70458
70460
|
if (ok && wantPr) {
|
|
70459
70461
|
const branch = branchByChange.get(changeName);
|
|
@@ -70513,7 +70515,8 @@ ${stamped}
|
|
|
70513
70515
|
pollIntervalSeconds: cfg.ciPollIntervalSeconds
|
|
70514
70516
|
});
|
|
70515
70517
|
if (!result2.success) {
|
|
70516
|
-
appendLog(`! CI fix loop gave up after ${result2.attempts} attempts (${result2.reason ?? "unknown"})`, "red");
|
|
70518
|
+
appendLog(`! CI fix loop gave up after ${result2.attempts} attempts (${result2.reason ?? "unknown"}) \u2014 withholding done-status until CI passes`, "red");
|
|
70519
|
+
effectiveCode = CI_FAILED_EXIT;
|
|
70517
70520
|
}
|
|
70518
70521
|
}
|
|
70519
70522
|
}
|
|
@@ -70523,7 +70526,7 @@ ${stamped}
|
|
|
70523
70526
|
}
|
|
70524
70527
|
}
|
|
70525
70528
|
if (useWorktree && cwd2 !== projectRoot) {
|
|
70526
|
-
if (
|
|
70529
|
+
if (effectiveCode === 0 && cfg.cleanupWorktreeOnSuccess) {
|
|
70527
70530
|
try {
|
|
70528
70531
|
await removeWorktree(projectRoot, cwd2, bunGitRunner);
|
|
70529
70532
|
appendLog(` removed worktree ${cwd2}`, "gray");
|
|
@@ -70536,7 +70539,7 @@ ${stamped}
|
|
|
70536
70539
|
statesDirByChange.delete(changeName);
|
|
70537
70540
|
branchByChange.delete(changeName);
|
|
70538
70541
|
issueByChange.delete(changeName);
|
|
70539
|
-
return
|
|
70542
|
+
return effectiveCode;
|
|
70540
70543
|
});
|
|
70541
70544
|
return { exited: wrapped, kill: () => proc.kill() };
|
|
70542
70545
|
},
|