nightralph 0.0.31 → 0.0.33

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/index.js CHANGED
@@ -1513,14 +1513,21 @@ function killProcessGroup(pid) {
1513
1513
  try {
1514
1514
  process.kill(-pid, "SIGKILL");
1515
1515
  } catch {
1516
+ try {
1517
+ process.kill(pid, "SIGKILL");
1518
+ } catch {
1519
+ }
1516
1520
  }
1517
1521
  }
1518
1522
  __name(killProcessGroup, "killProcessGroup");
1519
1523
  var runningAgents = /* @__PURE__ */ new Set();
1520
1524
  function killRunningAgents() {
1525
+ let killed = 0;
1521
1526
  for (const pid of runningAgents) {
1522
1527
  killProcessGroup(pid);
1528
+ killed++;
1523
1529
  }
1530
+ return killed;
1524
1531
  }
1525
1532
  __name(killRunningAgents, "killRunningAgents");
1526
1533
  function spawnAgent(opts) {
@@ -2220,10 +2227,17 @@ async function runWaves(tickets, specBody, agentCmd, model, timeout, logsDir, di
2220
2227
  );
2221
2228
  }
2222
2229
  if (waveCompleted === 0) {
2230
+ const remaining3 = findReadyTickets(tickets).filter((t) => !failedNums.has(t.num));
2231
+ if (remaining3.length === 0) {
2232
+ d.log(
2233
+ "\nNo tickets completed this wave and no ready tickets remain. Stopping."
2234
+ );
2235
+ break;
2236
+ }
2223
2237
  d.log(
2224
- "\nNo tickets completed this wave. Stopping."
2238
+ `
2239
+ No tickets completed this wave. ${remaining3.length} ready ticket${remaining3.length === 1 ? "" : "s"} remain; continuing.`
2225
2240
  );
2226
- break;
2227
2241
  }
2228
2242
  }
2229
2243
  const remaining = tickets.filter(
@@ -2508,6 +2522,7 @@ async function runWavesIsolated(opts) {
2508
2522
  }
2509
2523
  }
2510
2524
  } else {
2525
+ failedNums.add(ticket.num);
2511
2526
  d.log(
2512
2527
  ` ${ticket.filename}: merge failed, staying ready-for-agent`
2513
2528
  );
@@ -2554,10 +2569,19 @@ Merge stopped at ${mergeResult.stoppedAt.branch}`
2554
2569
  }
2555
2570
  }
2556
2571
  if (waveCompleted === 0) {
2572
+ const remaining3 = findReadyTickets(
2573
+ opts.tickets
2574
+ ).filter((t) => !failedNums.has(t.num));
2575
+ if (remaining3.length === 0) {
2576
+ d.log(
2577
+ "\nNo tickets completed this wave and no ready tickets remain. Stopping."
2578
+ );
2579
+ break;
2580
+ }
2557
2581
  d.log(
2558
- "\nNo tickets completed this wave. Stopping."
2582
+ `
2583
+ No tickets completed this wave. ${remaining3.length} ready ticket${remaining3.length === 1 ? "" : "s"} remain; continuing.`
2559
2584
  );
2560
- break;
2561
2585
  }
2562
2586
  }
2563
2587
  const remaining = opts.tickets.filter(