next-issue 10.4.1 → 10.5.0

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 CHANGED
@@ -344,7 +344,7 @@ With `next-issue start --hunt`, which turns on `--watch`, the harness runs a hun
344
344
 
345
345
  With `huntCap` at 1 and no ready issue, a hunt files at most one issue. The hunter ends its reply with one `issue:` line for each issue it filed, or one `issue: none` line; a url that is not an issue of the repository of `remote` does not count as filed. When the `remote` url holds an old owner or name that GitHub redirects after a rename or transfer, the harness asks GitHub for the new one, so an issue url with the new name counts too. The run log holds one `hunt.issue` event with the `url` for each, or one with `none`. A hunt that fails writes a `hunt.error` event and the watch goes on. The hunter then waits before the next hunt, with a `hunt.wait` event and the same back-off, so a failure, or a hunt that files nothing, that repeats waits 1, 2, 3, 5, 10, then 10 minutes, and the back-off goes back to 1 minute after a hunt that files at least one issue. The next pass claims the new issues like any other. At the first `Ctrl-C` the hunter stops after its current hunt, and the watch ends once the hunt and the running issues end. A first `Ctrl-C` during the watch wait tells you so while a hunt runs, and the third press stops the hunter at once. The hunter stops too when the watch ends for another reason.
346
346
 
347
- In a run of the `serve` worker, a client can switch hunting and watching on or off while the run goes on, with no restart, for example with Hunt on or Watch on in the `/next-issue` menu of the pi extension, see [Worker](#worker). This works only for runs of the worker, not for a command-line run.
347
+ In a run of the `serve` worker, a client can switch hunting and watching on or off while the run goes on, with no restart, for example with Hunt on or Watch on in `/next-issue` of the pi extension, see [Worker](#worker). This works only for runs of the worker, not for a command-line run.
348
348
 
349
349
  ## Worker
350
350
 
@@ -364,7 +364,7 @@ In a run of the `serve` worker, a client can switch hunting and watching on or o
364
364
  - asks a watching run to check for new issues now when a client sends `{ "type": "refresh", "root": "<path>" }`. A run that waits between passes starts a new pass at once, and its next wait starts again at 1 minute; a waiting hunter checks the ready count again. A refresh while a pass runs, for a run that is stopping or does not watch, or with no run going, changes nothing and gets no answer;
365
365
  - exits, and removes its socket and lock files, when no run is going and no client is connected, or when no client connects in the 30 seconds after it starts;
366
366
  - waits up to 5 seconds for the lock when a worker that is closing still holds it;
367
- - closes once no run is going when a client with a newer version connects, so that the client can start the newer worker. A run that watches is stopped between issues for that, as `stop` with `issue` does: it claims nothing new, and its running issues and its current hunt finish. Its progress then holds `"upgrade": { "from": "<worker version>", "to": "<client version>" }`. A stop by a person drops that field, so no client starts the run again. A run that does not watch is left alone. Meanwhile the worker refuses every start with `the worker is restarting, try again soon`. A `start` with `"resume": true` gets no error when the worker refuses it;
367
+ - closes once no run is going when a client with a newer version connects, so that the client can start the newer worker. A run that watches is stopped between issues for that, as `stop` with `issue` does: it claims nothing new, and its running issues and its current hunt finish. Its progress then holds `"upgrade": { "from": "<worker version>", "to": "<client version>" }`. A stop by a person, or turning watching off, drops that field, so no client starts the run again. A run that does not watch is left alone. Meanwhile the worker refuses every start with `the worker is restarting, try again soon`. A `start` with `"resume": true` gets no error when the worker refuses it;
368
368
  - stops every agent and command and exits on `SIGTERM`, `SIGHUP` or `SIGINT`, and removes its socket and lock files;
369
369
  - keeps `.next-issue/worker.log`, where the extension writes the output of the worker, within 10 MiB: when it starts and once a minute while it runs, it cuts a log of more than 10 MiB to its newest 5 MiB, from the start of a line. It skips the cut while a command that writes to the log runs. The run logs under `.next-issue/runs/` hold the same events.
370
370
 
@@ -93,6 +93,7 @@ export function setHunting(run, on) {
93
93
  export function setWatching(run, on) {
94
94
  if (!on) {
95
95
  run.hunting.set(false);
96
+ dropUpgrade(run);
96
97
  }
97
98
  run.watching.set(on);
98
99
  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": "10.4.1",
3
+ "version": "10.5.0",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",