next-issue 7.8.30 → 8.1.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
@@ -46,7 +46,7 @@ issue ends, the run fetches the open issues again and claims the oldest unseen
46
46
  one for the free slot. Each issue has its own worktree and branch. Step 3 below
47
47
  and the removal of a worktree or branch run for one issue at a time, so two
48
48
  issues never change the git refs or worktrees of the repository at once. An issue blocked by a running issue is skipped and not tried again in
49
- that run, even when the blocker closes before the run ends. `--max <n>` counts the handled issues across the run, and with `--once`
49
+ that run, even when the blocker closes before the run ends. `--max <n>` counts the handled issues across the run, so with `--max 1`
50
50
  the run handles one issue. For each issue:
51
51
 
52
52
  1. Claim the issue only when it holds the `status:todo` label and holds no
@@ -824,7 +824,7 @@ that waits for a person and for one that a stop left behind. The run starts no
824
824
  agent and makes no push, revert, label change, close or comment, so a change
825
825
  that already landed stays on the base branch. A worktree or branch that cannot be
826
826
  removed stays, and the run log says so. The issue shows as `skipped` (`closed`)
827
- in the summary and does not count for `--max` or `--once`. A `--watch` run does
827
+ in the summary and does not count for `--max`. A `--watch` run does
828
828
  not claim an issue again once it ended in `error` in that run, so it leaves such
829
829
  an issue for the next run to clean up.
830
830
 
@@ -838,7 +838,6 @@ an issue for the next run to clean up.
838
838
  | `stop` | Stop the worker of this repository, see [Worker](#worker) |
839
839
  | `logs` | Show the latest run log and follow it, see [Observability](#observability) |
840
840
  | `--force` | Replace an existing config file, with `init` |
841
- | `--once` | Stop after the first handled issue, with `start` |
842
841
  | `--max <n>` | Handle at most n issues, with `start` |
843
842
  | `--watch` | Keep running, and read the open issues again after each pass, with `start` |
844
843
  | `--hunt` | Hunt the repository for bugs alongside the issues, with `start`, see [Hunt for bugs](#hunt-for-bugs) |
@@ -848,7 +847,7 @@ an issue for the next run to clean up.
848
847
  | `--quiet` | Show only the milestones and the summary |
849
848
  | `--help` | Show the option list |
850
849
 
851
- `--once`, `--max <n>`, `--watch`, `--hunt` and `--reset` belong to `start`, and
850
+ `--max <n>`, `--watch`, `--hunt` and `--reset` belong to `start`, and
852
851
  any other command refuses them. `next-issue` with no command prints the option
853
852
  list on standard error, starts nothing and exits with 1.
854
853
 
@@ -858,7 +857,9 @@ of the run.
858
857
 
859
858
  Versions before 7.0.0 started a run with no command, as `next-issue` or
860
859
  `next-issue --once`. From 7.0.0 a run needs `next-issue start`, and the old
861
- form starts nothing and exits with 1.
860
+ form starts nothing and exits with 1. Later versions dropped `--once`:
861
+ `next-issue start --once` fails with `Unknown argument: --once` and exits with
862
+ 1, so use `next-issue start --max 1`.
862
863
 
863
864
  ## Watch for new issues
864
865
 
@@ -880,8 +881,7 @@ pass.
880
881
 
881
882
  After each pass that handled an issue, the harness prints the summary of that
882
883
  pass. The token totals in it cover that pass only. The exit code at the end
883
- covers all passes. `--max <n>` counts the handled issues across all passes,
884
- and `--once` is the same as `--max 1`.
884
+ covers all passes. `--max <n>` counts the handled issues across all passes.
885
885
 
886
886
  The watch stops:
887
887
 
@@ -937,7 +937,7 @@ affect another. The worker:
937
937
  - runs at most one run at a time. A client starts it with
938
938
  `{ "type": "start", "root": "<path>", "args": [...] }`. Each run is like
939
939
  `next-issue start` with those args, or with none when `args` is left out. It takes
940
- `--once`, `--max <n>`, `--watch`, `--hunt`, `--reset`, `--verbose` and
940
+ `--max <n>`, `--watch`, `--hunt`, `--reset`, `--verbose` and
941
941
  `--quiet`, and refuses a command (`start` too), `--json`, `--force`, `--help` or an
942
942
  unknown argument with an `error` message;
943
943
  - sends every client the progress of every run when it connects and on every
@@ -978,8 +978,8 @@ affect another. The worker:
978
978
  started with `--watch` alone starts with it off. Off lets a hunt that is
979
979
  going finish, so the issues it files stay, and starts no new hunt. On wakes
980
980
  the hunter at once, with no back-off wait. A run that does not watch
981
- (`--once`, or `--max` without `--watch`) refuses on with an `error` message
982
- that says why, and goes on unchanged. With no run going, the message gets
981
+ (one started with neither `--watch` nor `--hunt`) refuses on with an
982
+ `error` message that says why, and goes on unchanged. With no run going, the message gets
983
983
  an `error` and starts nothing. The setting lasts for the run only: a new run
984
984
  takes it from its own flags. Only runs of the worker can switch; a
985
985
  command-line run keeps what `--hunt` gave it. The progress of each run
package/dist/args.mjs CHANGED
@@ -6,7 +6,6 @@ const SWITCHES = new Map([
6
6
  ['--watch', 'watch'],
7
7
  ['--hunt', 'hunt'],
8
8
  ['--reset', 'reset'],
9
- ['--once', 'once'],
10
9
  ]);
11
10
  const LEVELS = new Map([
12
11
  ['--verbose', 'verbose'],
@@ -15,7 +14,6 @@ const LEVELS = new Map([
15
14
  export const USAGE = `next-issue <command> [options]
16
15
 
17
16
  start start a run: claim issues, fix them and push them to the base branch
18
- --once stop after the first handled issue
19
17
  --max <n> handle at most n issues
20
18
  --watch keep running and read the issues again after each pass
21
19
  --hunt hunt the repository for bugs and file issues alongside the issues, turns on --watch
@@ -31,7 +29,7 @@ export const USAGE = `next-issue <command> [options]
31
29
  --quiet show only the milestones and the summary
32
30
  --help show this text
33
31
  `;
34
- const RUN_FLAGS = new Set(['--once', '--max', '--watch', '--hunt', '--reset']);
32
+ const RUN_FLAGS = new Set(['--max', '--watch', '--hunt', '--reset']);
35
33
  export function parseArgs(argv) {
36
34
  const { args, flag, runFlag } = readArgs(argv);
37
35
  if (args.help) {
@@ -50,7 +48,6 @@ export function parseArgs(argv) {
50
48
  }
51
49
  function readArgs(argv) {
52
50
  const args = {
53
- once: false,
54
51
  help: false,
55
52
  json: false,
56
53
  reset: false,
package/dist/loop.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function runIssues(args, loop, seen = new Set()) {
2
- const limit = args.once ? Math.min(1, args.max ?? 1) : args.max;
2
+ const limit = args.max;
3
3
  const concurrency = loop.concurrency ?? 1;
4
4
  const reports = [];
5
5
  const running = new Map();
package/dist/watch.mjs CHANGED
@@ -91,11 +91,11 @@ async function huntIssues(hunter, hunting, running, failed, claims, refreshes, s
91
91
  }
92
92
  }
93
93
  async function watchPasses(args, failed, watch) {
94
- const limit = args.once ? 1 : args.max;
94
+ const limit = args.max;
95
95
  const reports = [];
96
96
  let step = 0;
97
97
  for (;;) {
98
- const pass = await runIssues({ once: false, max: limit === undefined ? undefined : limit - handled(reports) }, watch, new Set(failed));
98
+ const pass = await runIssues({ max: limit === undefined ? undefined : limit - handled(reports) }, watch, new Set(failed));
99
99
  addReports(reports, pass.reports);
100
100
  recordFailures(failed, pass.reports);
101
101
  if (handled(pass.reports) > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "7.8.30",
3
+ "version": "8.1.0",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",