next-issue 14.4.1 → 14.4.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.
@@ -15,14 +15,14 @@ export function oneAtATime(root, work) {
15
15
  worktreeQueues.set(root, result.catch(() => undefined));
16
16
  return result;
17
17
  }
18
- export async function processStart(pid) {
18
+ export async function processStart(pid, zone = { TZ: 'UTC' }) {
19
19
  const stat = await readTextOrEmpty(`/proc/${pid}/stat`);
20
20
  if (stat !== '') {
21
21
  return stat.slice(stat.lastIndexOf(')') + 2).split(' ')[19];
22
22
  }
23
23
  try {
24
24
  const { stdout } = await promisify(execFile)('ps', ['-o', 'lstart=', '-p', String(pid)], {
25
- env: { ...process.env, LC_ALL: 'C' },
25
+ env: { ...process.env, LC_ALL: 'C', ...zone },
26
26
  });
27
27
  return stdout.trim() || undefined;
28
28
  }
@@ -40,7 +40,11 @@ async function holderOf(text) {
40
40
  if (started === '') {
41
41
  return isAlive(pid) ? pid : undefined;
42
42
  }
43
- return (await processStart(pid)) === started ? pid : undefined;
43
+ const now = await processStart(pid);
44
+ if (now === undefined) {
45
+ return isAlive(pid) ? pid : undefined;
46
+ }
47
+ return now === started || (await processStart(pid, {})) === started ? pid : undefined;
44
48
  }
45
49
  export async function lockHolder(lockPath) {
46
50
  return holderOf(await readTextOrEmpty(lockPath));
@@ -110,7 +110,10 @@ export function setHunting(run, on) {
110
110
  export function setWatching(run, on) {
111
111
  if (!on) {
112
112
  run.hunting.set(false);
113
- dropUpgrade(run);
113
+ if (dropUpgrade(run)) {
114
+ run.stop = undefined;
115
+ run.progress = { ...run.progress, status: 'running' };
116
+ }
114
117
  }
115
118
  run.watching.set(on);
116
119
  run.progress = { ...run.progress, watching: on, hunting: run.hunting.on() };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "14.4.1",
3
+ "version": "14.4.3",
4
4
  "description": "Autonomous issue harness driven by the Claude Agent SDK",
5
5
  "keywords": [
6
6
  "github",