@neriros/ralphy 2.16.1 → 2.16.3
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/dist/cli/index.js +32 -6
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -35029,8 +35029,8 @@ import { readFileSync as readFileSync2 } from "fs";
|
|
|
35029
35029
|
import { resolve } from "path";
|
|
35030
35030
|
function getVersion() {
|
|
35031
35031
|
try {
|
|
35032
|
-
if ("2.16.
|
|
35033
|
-
return "2.16.
|
|
35032
|
+
if ("2.16.3")
|
|
35033
|
+
return "2.16.3";
|
|
35034
35034
|
} catch {}
|
|
35035
35035
|
const dirsToTry = [];
|
|
35036
35036
|
try {
|
|
@@ -59481,6 +59481,9 @@ var MarkerSchema, GetIndicatorSchema, SetIndicatorSchema, IndicatorsSchema, Ralp
|
|
|
59481
59481
|
// Seconds between CI status polls.
|
|
59482
59482
|
"ciPollIntervalSeconds": 30,
|
|
59483
59483
|
|
|
59484
|
+
// CI check names to ignore when polling PR status (case-insensitive).
|
|
59485
|
+
// "ignoreCiChecks": ["Vercel", "codeql"],
|
|
59486
|
+
|
|
59484
59487
|
// Underlying engine: "claude" or "codex".
|
|
59485
59488
|
"engine": "claude",
|
|
59486
59489
|
|
|
@@ -59591,6 +59594,7 @@ var init_config = __esm(() => {
|
|
|
59591
59594
|
fixCiOnFailure: exports_external.boolean().default(false),
|
|
59592
59595
|
maxCiFixAttempts: exports_external.number().int().positive().default(5),
|
|
59593
59596
|
ciPollIntervalSeconds: exports_external.number().int().positive().default(30),
|
|
59597
|
+
ignoreCiChecks: exports_external.array(exports_external.string()).default([]),
|
|
59594
59598
|
engine: exports_external.enum(["claude", "codex"]).default("claude"),
|
|
59595
59599
|
model: exports_external.enum(["haiku", "sonnet", "opus"]).default("opus"),
|
|
59596
59600
|
linear: exports_external.object({
|
|
@@ -60450,7 +60454,7 @@ ${e.stdout ?? ""}`;
|
|
|
60450
60454
|
}
|
|
60451
60455
|
throw lastErr;
|
|
60452
60456
|
}
|
|
60453
|
-
async function getPrChecksStatus(prRef, runner, cwd2, onTransientRetry) {
|
|
60457
|
+
async function getPrChecksStatus(prRef, runner, cwd2, onTransientRetry, ignoreCiChecks = []) {
|
|
60454
60458
|
let out;
|
|
60455
60459
|
try {
|
|
60456
60460
|
out = await runGhWithRetry(["gh", "pr", "checks", prRef, "--json", PR_CHECKS_FIELDS], runner, cwd2, onTransientRetry);
|
|
@@ -60463,7 +60467,8 @@ ${e.stdout ?? ""}`;
|
|
|
60463
60467
|
return { bucket: "pass", failedRunIds: [] };
|
|
60464
60468
|
throw err;
|
|
60465
60469
|
}
|
|
60466
|
-
const
|
|
60470
|
+
const ignoredLower = ignoreCiChecks.map((n) => n.toLowerCase());
|
|
60471
|
+
const checks = JSON.parse(out.stdout || "[]").filter((c) => !ignoredLower.includes(c.name.toLowerCase())).filter((c) => c.bucket !== "skipping");
|
|
60467
60472
|
if (checks.some((c) => c.bucket === "pending")) {
|
|
60468
60473
|
return { bucket: "pending", failedRunIds: [] };
|
|
60469
60474
|
}
|
|
@@ -60789,7 +60794,7 @@ async function fixConflictsAndCiLoop(ctx, prUrl, wantFixCi, checkPrConflict) {
|
|
|
60789
60794
|
ctx.emit("ci-poll", "starting");
|
|
60790
60795
|
const result2 = await fixCiUntilGreen({
|
|
60791
60796
|
onPhase: (p, d) => ctx.emit(p, d),
|
|
60792
|
-
getStatus: () => getPrChecksStatus(prUrl, ctx.cmd, ctx.cwd, (n, ms, why) => ctx.log(` gh transient (try ${n}) \u2014 retry in ${Math.round(ms / 1000)}s \xB7 ${why}`, "yellow")),
|
|
60797
|
+
getStatus: () => getPrChecksStatus(prUrl, ctx.cmd, ctx.cwd, (n, ms, why) => ctx.log(` gh transient (try ${n}) \u2014 retry in ${Math.round(ms / 1000)}s \xB7 ${why}`, "yellow"), ctx.cfg.ignoreCiChecks),
|
|
60793
60798
|
getFailedLogs: (ids) => fetchFailedRunLogs(ids, ctx.cmd, ctx.cwd),
|
|
60794
60799
|
runTaskWithSteering: (steering) => runWorkerWithFixTask(ctx, "Fix failing CI checks", steering),
|
|
60795
60800
|
pushBranch: async () => {
|
|
@@ -61385,7 +61390,8 @@ PR: ${prUrl}` : ""
|
|
|
61385
61390
|
prBaseBranch: cfg.prBaseBranch,
|
|
61386
61391
|
maxCiFixAttempts: cfg.maxCiFixAttempts,
|
|
61387
61392
|
ciPollIntervalSeconds: cfg.ciPollIntervalSeconds,
|
|
61388
|
-
cleanupWorktreeOnSuccess: cfg.cleanupWorktreeOnSuccess
|
|
61393
|
+
cleanupWorktreeOnSuccess: cfg.cleanupWorktreeOnSuccess,
|
|
61394
|
+
ignoreCiChecks: cfg.ignoreCiChecks
|
|
61389
61395
|
},
|
|
61390
61396
|
respawnWorker: respawn
|
|
61391
61397
|
}, {
|
|
@@ -72619,6 +72625,13 @@ function writeAgentLog(text) {
|
|
|
72619
72625
|
return;
|
|
72620
72626
|
});
|
|
72621
72627
|
}
|
|
72628
|
+
function writePhaseLog(phaseLogFile, text) {
|
|
72629
|
+
const line = `[${new Date().toISOString()}] ${text}
|
|
72630
|
+
`;
|
|
72631
|
+
appendFile(phaseLogFile, line).catch(() => {
|
|
72632
|
+
return;
|
|
72633
|
+
});
|
|
72634
|
+
}
|
|
72622
72635
|
function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
72623
72636
|
const { exit } = use_app_default();
|
|
72624
72637
|
const { stdout } = use_stdout_default();
|
|
@@ -72662,10 +72675,16 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72662
72675
|
onWorkersChanged: () => setTick((t) => t + 1),
|
|
72663
72676
|
onWorkerStarted: (changeName, dir, logFile, changeDir) => {
|
|
72664
72677
|
writeAgentLog(`worker-started ${changeName} log=${logFile}`);
|
|
72678
|
+
const phaseLogFile = logFile.replace(/\.log$/, "-phases.log");
|
|
72679
|
+
mkdir4(dirname4(phaseLogFile), { recursive: true }).then(() => appendFile(phaseLogFile, `=== session ${SESSION_START} | worker-started ${new Date().toISOString()} ===
|
|
72680
|
+
`)).catch(() => {
|
|
72681
|
+
return;
|
|
72682
|
+
});
|
|
72665
72683
|
workerMetaRef.current.set(changeName, {
|
|
72666
72684
|
startedAt: Date.now(),
|
|
72667
72685
|
statesDir: dir,
|
|
72668
72686
|
logFile,
|
|
72687
|
+
phaseLogFile,
|
|
72669
72688
|
changeDir,
|
|
72670
72689
|
iter: 0,
|
|
72671
72690
|
phase: "working",
|
|
@@ -72679,6 +72698,10 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72679
72698
|
},
|
|
72680
72699
|
onWorkerExited: (changeName) => {
|
|
72681
72700
|
writeAgentLog(`worker-exited ${changeName}`);
|
|
72701
|
+
const m = workerMetaRef.current.get(changeName);
|
|
72702
|
+
if (m?.phaseLogFile) {
|
|
72703
|
+
writePhaseLog(m.phaseLogFile, `=== worker-exited ===`);
|
|
72704
|
+
}
|
|
72682
72705
|
workerMetaRef.current.delete(changeName);
|
|
72683
72706
|
},
|
|
72684
72707
|
onWorkerPhase: (changeName, phase, detail) => {
|
|
@@ -72691,6 +72714,9 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72691
72714
|
}
|
|
72692
72715
|
m.phase = phase;
|
|
72693
72716
|
m.phaseDetail = detail ?? "";
|
|
72717
|
+
if (m.phaseLogFile) {
|
|
72718
|
+
writePhaseLog(m.phaseLogFile, `${phase}${detail ? ` (${detail})` : ""}`);
|
|
72719
|
+
}
|
|
72694
72720
|
},
|
|
72695
72721
|
onWorkerOutput: (changeName, line) => {
|
|
72696
72722
|
const m = workerMetaRef.current.get(changeName);
|