@neriros/ralphy 3.3.1 → 3.3.2

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.
@@ -18928,8 +18928,8 @@ import { readFileSync } from "fs";
18928
18928
  import { resolve } from "path";
18929
18929
  function getVersion() {
18930
18930
  try {
18931
- if ("3.3.1")
18932
- return "3.3.1";
18931
+ if ("3.3.2")
18932
+ return "3.3.2";
18933
18933
  } catch {}
18934
18934
  const dirsToTry = [];
18935
18935
  try {
@@ -95184,6 +95184,14 @@ ${truncated}`);
95184
95184
 
95185
95185
  `);
95186
95186
  }
95187
+ async function safeSha(getHeadSha) {
95188
+ try {
95189
+ const sha = (await getHeadSha()).trim();
95190
+ return sha || null;
95191
+ } catch {
95192
+ return null;
95193
+ }
95194
+ }
95187
95195
  async function fixCiUntilGreen(deps, opts) {
95188
95196
  for (let attempt2 = 1;attempt2 <= opts.maxAttempts; attempt2++) {
95189
95197
  let pollN = 0;
@@ -95213,10 +95221,18 @@ async function fixCiUntilGreen(deps, opts) {
95213
95221
  \`\`\`
95214
95222
  ${logs}
95215
95223
  \`\`\``;
95224
+ const shaBefore = deps.getHeadSha ? await safeSha(deps.getHeadSha) : null;
95216
95225
  const code = await deps.runTaskWithSteering(steering);
95217
95226
  if (code !== 0) {
95218
95227
  deps.log(`! task loop exited code ${code} during CI fix attempt ${attempt2}`, "red");
95219
95228
  }
95229
+ if (shaBefore !== null) {
95230
+ const shaAfter = await safeSha(deps.getHeadSha);
95231
+ if (shaAfter !== null && shaAfter === shaBefore) {
95232
+ deps.log(`! worker produced no new commits on CI fix attempt ${attempt2} \u2014 failure looks external (e.g. rate-limited deploy). Giving up CI watch.`, "yellow");
95233
+ return { success: false, attempts: attempt2, reason: "no-progress" };
95234
+ }
95235
+ }
95220
95236
  try {
95221
95237
  deps.onPhase?.("ci-fix", `attempt ${attempt2}/${opts.maxAttempts} \xB7 pushing fix`);
95222
95238
  await deps.pushBranch();
@@ -95657,6 +95673,10 @@ async function fixConflictsAndCiLoop(ctx, prUrl, wantFixCi, checkPrConflict) {
95657
95673
  pushBranch: async () => {
95658
95674
  await ctx.cmd.run(["git", "push", "origin", ctx.branch], ctx.cwd);
95659
95675
  },
95676
+ getHeadSha: async () => {
95677
+ const r = await ctx.cmd.run(["git", "rev-parse", "HEAD"], ctx.cwd);
95678
+ return r.stdout.trim();
95679
+ },
95660
95680
  log: ctx.log,
95661
95681
  sleep: (ms) => new Promise((r) => setTimeout(r, ms))
95662
95682
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neriros/ralphy",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "An iterative AI task execution framework. Orchestrates multi-phase autonomous work using Claude or Codex engines.",
5
5
  "keywords": [
6
6
  "agent",